public class ValidationByAutomaton<L> extends Object
It is constructed from a visibly pushdown automaton (VPA). Such an automaton can be constructed by hand or learned through an active learning algorithm (see the learning module in the repository).
A JSON document is accepted if there is a path from the initial location with empty stack to an accepting location with empty stack.
Due to the permutations, it is not possible in general to know the exact current locations in the VPA. Therefore, the permutation automaton performs a kind of subset construction. This means that the permutation automaton is deterministic, i.e., it is never required to backtrack while reading a document.
Constructor and Description |
---|
ValidationByAutomaton(net.automatalib.automata.vpda.OneSEVPA<L,JSONSymbol> automaton) |
ValidationByAutomaton(net.automatalib.automata.vpda.OneSEVPA<L,JSONSymbol> automaton,
KeyGraph<L> graph) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(List<JSONSymbol> input) |
boolean |
accepts(net.automatalib.words.Word<JSONSymbol> input) |
ValidationState<L> |
getInitialState() |
long |
getMaximalTimePathsKeyGraph() |
long |
getMaximalTimeSuccessorArray() |
long |
getMaximalTimeSuccessorObject() |
long |
getNumberOfTimesPathsKeyGraphComputed() |
long |
getNumberOfTimesSuccessorArray() |
long |
getNumberOfTimesSuccessorObject() |
ValidationState<L> |
getState(Iterable<JSONSymbol> input) |
ValidationState<L> |
getSuccessor(ValidationState<L> state,
JSONSymbol currentSymbol,
JSONSymbol nextSymbol) |
long |
getTotalTimePathsKeyGraph() |
long |
getTotalTimeSuccessorArray() |
long |
getTotalTimeSuccessorObject() |
boolean |
isAccepting(ValidationState<L> state) |
void |
resetTimeAndNumber() |
public ValidationByAutomaton(net.automatalib.automata.vpda.OneSEVPA<L,JSONSymbol> automaton)
public ValidationByAutomaton(net.automatalib.automata.vpda.OneSEVPA<L,JSONSymbol> automaton, KeyGraph<L> graph)
public ValidationState<L> getInitialState()
public boolean isAccepting(ValidationState<L> state)
public long getMaximalTimePathsKeyGraph()
public long getNumberOfTimesPathsKeyGraphComputed()
public long getTotalTimePathsKeyGraph()
public long getMaximalTimeSuccessorObject()
public long getNumberOfTimesSuccessorObject()
public long getTotalTimeSuccessorObject()
public long getMaximalTimeSuccessorArray()
public long getNumberOfTimesSuccessorArray()
public long getTotalTimeSuccessorArray()
public void resetTimeAndNumber()
public boolean accepts(List<JSONSymbol> input)
public boolean accepts(net.automatalib.words.Word<JSONSymbol> input)
public ValidationState<L> getState(Iterable<JSONSymbol> input)
public ValidationState<L> getSuccessor(ValidationState<L> state, JSONSymbol currentSymbol, JSONSymbol nextSymbol)
Copyright © 2022. All rights reserved.