Module net.automatalib.incremental
Class IncrementalPCDFADAGBuilder<I>
java.lang.Object
net.automatalib.incremental.dfa.AbstractIncrementalDFABuilder<I>
net.automatalib.incremental.dfa.dag.IncrementalPCDFADAGBuilder<I>
- Type Parameters:
I- input symbol class
- All Implemented Interfaces:
SupportsGrowingAlphabet<I>,InputAlphabetHolder<I>,IncrementalDFABuilder<I>,IncrementalConstruction<DFA<?,I>, I>
The prefix-closed version of
IncrementalDFADAGBuilder. Contrary to the regular lookup semantics, where an
exact response to a lookup can only be given, if the exact word has been observed before, the prefix-closed semantics
behave as follows:
- prefixes of previously observed accepted words will result in a
Acceptance.TRUEresponse as well. - continuations of previously observed rejected words will result in a
Acceptance.FALSEresponse as well.
-
Field Summary
Fields inherited from class net.automatalib.incremental.dfa.AbstractIncrementalDFABuilder
alphabetSize, inputAlphabet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlphabetSymbol(I symbol) Notifies the data structure that a new symbol should be added to the alphabet.Graph<?,?> asGraph()Retrieves a graph view of the current state of the construction.Retrieves a transition system view of the current state of the construction.findSeparatingWord(DFA<?, I> target, Collection<? extends I> inputs, boolean omitUndefined) Checks the current state of the construction against a given target model, and returns a word exposing a difference if there is one.voidInserts a new word into the automaton, with a given acceptance value.Looks up the tri-state acceptance value for a given word.Methods inherited from class net.automatalib.incremental.dfa.AbstractIncrementalDFABuilder
getInputAlphabetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.automatalib.incremental.dfa.IncrementalDFABuilder
hasDefinitiveInformation, insert
-
Constructor Details
-
IncrementalPCDFADAGBuilder
-
-
Method Details
-
lookup
Description copied from interface:IncrementalDFABuilderLooks up the tri-state acceptance value for a given word.- Parameters:
word- the word- Returns:
- the tri-state acceptance value for this word.
-
insert
Description copied from interface:IncrementalDFABuilderInserts a new word into the automaton, with a given acceptance value.- Parameters:
word- the word to insertaccepting- whether this word should be marked as accepting
-
addAlphabetSymbol
Description copied from interface:SupportsGrowingAlphabetNotifies the data structure that a new symbol should be added to the alphabet. Behavior depends on the implementation:- After adding a new symbol, the symbol-related data may either be initialized with default values or undefined.
- Duplicate symbols may: (1) be handled accordingly, (2) be ignored or (3) result in an error.
GrowingAlphabet) to handle potentially shared state across multiple instances. If the needed requirements are not met, aGrowingAlphabetNotSupportedExceptioncan be thrown.- Specified by:
addAlphabetSymbolin interfaceSupportsGrowingAlphabet<I>- Overrides:
addAlphabetSymbolin classAbstractIncrementalDFABuilder<I>- Parameters:
symbol- the symbol to add to the alphabet.
-
findSeparatingWord
public @Nullable Word<I> findSeparatingWord(DFA<?, I> target, Collection<? extends I> inputs, boolean omitUndefined) Description copied from interface:IncrementalConstructionChecks the current state of the construction against a given target model, and returns a word exposing a difference if there is one.- Parameters:
target- the target automaton modelinputs- the set of input symbols to consideromitUndefined- if this is set totrue, then undefined transitions in thetargetmodel will be interpreted as "unspecified/don't know" and omitted in the equivalence test. Otherwise, they will be interpreted in the usual manner (e.g., non-accepting sink in case of DFAs).- Returns:
- a separating word, or
nullif no difference could be found.
-
asTransitionSystem
Description copied from interface:IncrementalConstructionRetrieves a transition system view of the current state of the construction. The transition system model should be backed by the construction, i.e., subsequent changes will be reflected in the transition system.- Returns:
- a transition system view on the current state of the construction
-
asGraph
Description copied from interface:IncrementalConstructionRetrieves a graph view of the current state of the construction. The graph model should be backed by the construction, i.e., subsequent changes will be reflected in the graph model.- Returns:
- a graph view on the current state of the construction
-