public abstract class AbstractIncrementalDFABuilder<I> extends AbstractDeterministicAutomaton<net.automatalib.incremental.dfa.State,I,net.automatalib.incremental.dfa.State> implements UniversalGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord,Acceptance,I>, DOTPlottableGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord>, IncrementalConstruction<DFA<?,I>,I>
Modifier and Type | Field and Description |
---|---|
protected int |
alphabetSize |
protected net.automatalib.incremental.dfa.State |
init |
protected Alphabet<I> |
inputAlphabet |
protected Map<net.automatalib.incremental.dfa.StateSignature,net.automatalib.incremental.dfa.State> |
register |
protected net.automatalib.incremental.dfa.State |
sink |
Constructor and Description |
---|
AbstractIncrementalDFABuilder(Alphabet<I> inputAlphabet) |
Modifier and Type | Method and Description |
---|---|
protected net.automatalib.incremental.dfa.State |
clone(net.automatalib.incremental.dfa.State other,
Acceptance acc)
Clones a state, changing the signature.
|
protected net.automatalib.incremental.dfa.State |
clone(net.automatalib.incremental.dfa.State other,
Acceptance acc,
int idx,
net.automatalib.incremental.dfa.State succ) |
protected net.automatalib.incremental.dfa.State |
clone(net.automatalib.incremental.dfa.State other,
int idx,
net.automatalib.incremental.dfa.State succ)
Clones a state, changing the signature.
|
<T> MutableMapping<net.automatalib.incremental.dfa.State,T> |
createDynamicNodeMapping() |
<T> MutableMapping<net.automatalib.incremental.dfa.State,T> |
createStaticNodeMapping() |
Word<I> |
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.
|
I |
getEdgeProperty(net.automatalib.incremental.dfa.EdgeRecord edge)
Retrieves the property of a given edge.
|
GraphDOTHelper<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord> |
getGraphDOTHelper() |
net.automatalib.incremental.dfa.State |
getInitialState()
Retrieves the initial state of this transition system.
|
Alphabet<I> |
getInputAlphabet()
Retrieves the input alphabet of this construction.
|
Acceptance |
getNodeProperty(net.automatalib.incremental.dfa.State node)
Retrieves the property of a given node.
|
Collection<net.automatalib.incremental.dfa.State> |
getNodes()
Retrieves an (unmodifiable) collection of the nodes in this graph.
|
Collection<net.automatalib.incremental.dfa.EdgeRecord> |
getOutgoingEdges(net.automatalib.incremental.dfa.State node)
Retrieves the outgoing edges of a given node.
|
protected abstract net.automatalib.incremental.dfa.State |
getState(Word<I> word) |
Collection<net.automatalib.incremental.dfa.State> |
getStates()
Retrieves all states of the transition system.
|
net.automatalib.incremental.dfa.State |
getSuccessor(net.automatalib.incremental.dfa.State transition)
Retrieves the successor state of a given transition.
|
net.automatalib.incremental.dfa.State |
getTarget(net.automatalib.incremental.dfa.EdgeRecord edge)
Retrieves, for a given edge, its target node.
|
net.automatalib.incremental.dfa.State |
getTransition(net.automatalib.incremental.dfa.State state,
I input)
Retrieves the transition triggered by the given input symbol.
|
boolean |
hasDefinitiveInformation(Word<I> word)
Checks whether this class has definitive information about a given word.
|
protected net.automatalib.incremental.dfa.State |
hiddenClone(net.automatalib.incremental.dfa.State other) |
protected void |
hide(net.automatalib.incremental.dfa.State state) |
void |
insert(Word<I> word)
Inserts a word into the set of accepted words.
|
abstract void |
insert(Word<I> word,
boolean accepting) |
abstract Acceptance |
lookup(Word<I> word) |
NodeIDs<net.automatalib.incremental.dfa.State> |
nodeIDs() |
protected net.automatalib.incremental.dfa.State |
replaceOrRegister(net.automatalib.incremental.dfa.State state)
Returns the canonical state for the given state's signature, or registers the
state as canonical if no state with that signature exists.
|
protected net.automatalib.incremental.dfa.State |
replaceOrRegister(net.automatalib.incremental.dfa.StateSignature sig)
Returns (and possibly creates) the canonical state for the given signature.
|
int |
size()
Retrieves the size (number of states) of this transition system.
|
DFA<?,I> |
toAutomaton()
Creates an automaton model from the current state of the construction.
|
protected net.automatalib.incremental.dfa.State |
unhide(net.automatalib.incremental.dfa.State state,
Acceptance acc,
int idx,
net.automatalib.incremental.dfa.State succ) |
protected net.automatalib.incremental.dfa.State |
unhide(net.automatalib.incremental.dfa.State state,
int idx,
net.automatalib.incremental.dfa.State succ) |
protected void |
updateInitSignature(Acceptance acc) |
protected void |
updateInitSignature(Acceptance acc,
int idx,
net.automatalib.incremental.dfa.State succ) |
protected void |
updateInitSignature(int idx,
net.automatalib.incremental.dfa.State succ) |
protected net.automatalib.incremental.dfa.State |
updateSignature(net.automatalib.incremental.dfa.State state,
Acceptance acc)
Updates the signature for a given state.
|
protected net.automatalib.incremental.dfa.State |
updateSignature(net.automatalib.incremental.dfa.State state,
Acceptance acc,
int idx,
net.automatalib.incremental.dfa.State succ) |
protected net.automatalib.incremental.dfa.State |
updateSignature(net.automatalib.incremental.dfa.State state,
int idx,
net.automatalib.incremental.dfa.State succ)
Updates the signature for a given state.
|
iterator, stateIDs
getInitialStates, getInitialStates, getState, getState, getSuccessor, getSuccessor, getSuccessor, getSuccessor, getTransitions, getTransitions
createDynamicStateMapping, createDynamicStateMapping, createStaticStateMapping, createStaticStateMapping, getStates, getStates, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, powersetView, powersetView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, iterator, spliterator
getTransitions, powersetView
getState, getSuccessor, getSuccessor
createDynamicStateMapping, createStaticStateMapping, getInitialStates, getStates, getSuccessors, getSuccessors, getSuccessors
protected final Map<net.automatalib.incremental.dfa.StateSignature,net.automatalib.incremental.dfa.State> register
protected final Alphabet<I> inputAlphabet
protected final int alphabetSize
protected final net.automatalib.incremental.dfa.State init
protected net.automatalib.incremental.dfa.State sink
public AbstractIncrementalDFABuilder(Alphabet<I> inputAlphabet)
public abstract Acceptance lookup(Word<I> word)
public abstract void insert(Word<I> word, boolean accepting) throws ConflictException
ConflictException
public final void insert(Word<I> word) throws ConflictException
word
- the word to insertConflictException
- if the word is already contained in the set of definitely
rejected wordspublic int size()
SimpleAutomaton
size
in interface SimpleAutomaton<net.automatalib.incremental.dfa.State,I>
size
in interface Graph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord>
size
in class AbstractDeterministicAutomaton<net.automatalib.incremental.dfa.State,I,net.automatalib.incremental.dfa.State>
public Collection<net.automatalib.incremental.dfa.State> getNodes()
Graph
public Collection<net.automatalib.incremental.dfa.EdgeRecord> getOutgoingEdges(net.automatalib.incremental.dfa.State node)
IndefiniteGraph
getOutgoingEdges
in interface IndefiniteGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord>
node
- the node.Collection
of all outgoing edges, or null
if
the node has no outgoing edges.public net.automatalib.incremental.dfa.State getTarget(net.automatalib.incremental.dfa.EdgeRecord edge)
IndefiniteGraph
getTarget
in interface IndefiniteGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord>
edge
- the edge.public Acceptance getNodeProperty(net.automatalib.incremental.dfa.State node)
UniversalIndefiniteGraph
getNodeProperty
in interface UniversalIndefiniteGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord,Acceptance,I>
node
- the nodepublic I getEdgeProperty(net.automatalib.incremental.dfa.EdgeRecord edge)
UniversalIndefiniteGraph
getEdgeProperty
in interface UniversalIndefiniteGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord,Acceptance,I>
edge
- the edgepublic net.automatalib.incremental.dfa.State getTransition(net.automatalib.incremental.dfa.State state, I input)
DeterministicTransitionSystem
getTransition
in interface DeterministicTransitionSystem<net.automatalib.incremental.dfa.State,I,net.automatalib.incremental.dfa.State>
state
- the source state.input
- the input symbol.null
if no transition is triggered.TransitionSystem.getTransitions(Object, Object)
public net.automatalib.incremental.dfa.State getSuccessor(net.automatalib.incremental.dfa.State transition)
TransitionSystem
getSuccessor
in interface TransitionSystem<net.automatalib.incremental.dfa.State,I,net.automatalib.incremental.dfa.State>
transition
- the transition.public net.automatalib.incremental.dfa.State getInitialState()
SimpleDTS
getInitialState
in interface SimpleDTS<net.automatalib.incremental.dfa.State,I>
SimpleTS.getInitialStates()
public Collection<net.automatalib.incremental.dfa.State> getStates()
SimpleAutomaton
getStates
in interface SimpleAutomaton<net.automatalib.incremental.dfa.State,I>
public Alphabet<I> getInputAlphabet()
IncrementalConstruction
getInputAlphabet
in interface IncrementalConstruction<DFA<?,I>,I>
public Word<I> findSeparatingWord(DFA<?,I> target, Collection<? extends I> inputs, boolean omitUndefined)
IncrementalConstruction
findSeparatingWord
in interface IncrementalConstruction<DFA<?,I>,I>
target
- the target automaton modelinputs
- the set of input symbols to consideromitUndefined
- if this is set to true, then undefined transitions in
the target model 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).public DFA<?,I> toAutomaton()
IncrementalConstruction
toAutomaton
in interface IncrementalConstruction<DFA<?,I>,I>
public boolean hasDefinitiveInformation(Word<I> word)
IncrementalConstruction
hasDefinitiveInformation
in interface IncrementalConstruction<DFA<?,I>,I>
word
- the wordpublic GraphDOTHelper<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord> getGraphDOTHelper()
getGraphDOTHelper
in interface DOTPlottableGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord>
public <T> MutableMapping<net.automatalib.incremental.dfa.State,T> createStaticNodeMapping()
createStaticNodeMapping
in interface IndefiniteGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord>
public <T> MutableMapping<net.automatalib.incremental.dfa.State,T> createDynamicNodeMapping()
createDynamicNodeMapping
in interface IndefiniteGraph<net.automatalib.incremental.dfa.State,net.automatalib.incremental.dfa.EdgeRecord>
protected net.automatalib.incremental.dfa.State replaceOrRegister(net.automatalib.incremental.dfa.StateSignature sig)
sig
- the signatureprotected net.automatalib.incremental.dfa.State replaceOrRegister(net.automatalib.incremental.dfa.State state)
state
- the stateprotected void updateInitSignature(Acceptance acc)
protected net.automatalib.incremental.dfa.State updateSignature(net.automatalib.incremental.dfa.State state, Acceptance acc)
state
- the stateacc
- the new acceptance valueprotected void updateInitSignature(int idx, net.automatalib.incremental.dfa.State succ)
protected void updateInitSignature(Acceptance acc, int idx, net.automatalib.incremental.dfa.State succ)
protected net.automatalib.incremental.dfa.State updateSignature(net.automatalib.incremental.dfa.State state, int idx, net.automatalib.incremental.dfa.State succ)
state
- the stateidx
- the index of the transition to changesucc
- the new successor for the above indexprotected net.automatalib.incremental.dfa.State updateSignature(net.automatalib.incremental.dfa.State state, Acceptance acc, int idx, net.automatalib.incremental.dfa.State succ)
protected net.automatalib.incremental.dfa.State clone(net.automatalib.incremental.dfa.State other, Acceptance acc)
other
- the state to cloneacc
- the new acceptance valueprotected net.automatalib.incremental.dfa.State hiddenClone(net.automatalib.incremental.dfa.State other)
protected void hide(net.automatalib.incremental.dfa.State state)
protected net.automatalib.incremental.dfa.State unhide(net.automatalib.incremental.dfa.State state, Acceptance acc, int idx, net.automatalib.incremental.dfa.State succ)
protected net.automatalib.incremental.dfa.State unhide(net.automatalib.incremental.dfa.State state, int idx, net.automatalib.incremental.dfa.State succ)
protected net.automatalib.incremental.dfa.State clone(net.automatalib.incremental.dfa.State other, int idx, net.automatalib.incremental.dfa.State succ)
other
- the state to cloneidx
- the index of the transition to changesucc
- the new successor stateprotected net.automatalib.incremental.dfa.State clone(net.automatalib.incremental.dfa.State other, Acceptance acc, int idx, net.automatalib.incremental.dfa.State succ)
Copyright © 2015. All Rights Reserved.