I
- input symbol classO
- output symbol classpublic class IncrementalMealyBuilder<I,O> extends AbstractDeterministicAutomaton<State,I,TransitionRecord> implements TransitionOutput<TransitionRecord,O>, UniversalGraph<State,TransitionRecord,Void,TransitionEdge.Property<I,O>>, DOTPlottableGraph<State,TransitionRecord>, IncrementalConstruction<MealyMachine<?,I,?,O>,I>
Constructor and Description |
---|
IncrementalMealyBuilder(Alphabet<I> inputAlphabet)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<V> MutableMapping<State,V> |
createDynamicNodeMapping() |
<V> MutableMapping<State,V> |
createStaticNodeMapping() |
Word<I> |
findSeparatingWord(MealyMachine<?,I,?,O> 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.
|
TransitionEdge.Property<I,O> |
getEdgeProperty(TransitionRecord edge)
Retrieves the property of a given edge.
|
GraphDOTHelper<State,TransitionRecord> |
getGraphDOTHelper() |
State |
getInitialState()
Retrieves the initial state of this transition system.
|
Alphabet<I> |
getInputAlphabet()
Retrieves the input alphabet of this construction.
|
Void |
getNodeProperty(State node)
Retrieves the property of a given node.
|
Collection<State> |
getNodes()
Retrieves an (unmodifiable) collection of the nodes in this graph.
|
Collection<TransitionRecord> |
getOutgoingEdges(State node)
Retrieves the outgoing edges of a given node.
|
Collection<State> |
getStates()
Retrieves all states of the transition system.
|
State |
getSuccessor(TransitionRecord transition)
Retrieves the successor state of a given transition.
|
State |
getTarget(TransitionRecord edge)
Retrieves, for a given edge, its target node.
|
TransitionRecord |
getTransition(State state,
I input)
Retrieves the transition triggered by the given input symbol.
|
O |
getTransitionOutput(TransitionRecord transition) |
boolean |
hasDefinitiveInformation(Word<I> word)
Checks whether this class has definitive information about a given word.
|
void |
insert(Word<I> word,
Word<O> outputWord)
Incorporates a pair of input/output words into the stored information.
|
boolean |
isComplete(Word<I> word)
Checks whether there exists secured information about the output
for the given word.
|
boolean |
lookup(Word<I> word,
WordBuilder<O> output)
Retrieves the output word for the given input word.
|
NodeIDs<State> |
nodeIDs() |
int |
size()
Retrieves the size (number of states) of this transition system.
|
CompactMealy<I,O> |
toAutomaton()
Creates an automaton model from the current state of the construction.
|
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
public IncrementalMealyBuilder(Alphabet<I> inputAlphabet)
inputAlphabet
- the input alphabet to usepublic int size()
SimpleAutomaton
size
in interface SimpleAutomaton<State,I>
size
in interface Graph<State,TransitionRecord>
size
in class AbstractDeterministicAutomaton<State,I,TransitionRecord>
public boolean isComplete(Word<I> word)
word
- the input wordpublic boolean lookup(Word<I> word, WordBuilder<O> output)
word
- the input wordoutput
- a WordBuilder
for constructing the output wordword.length() == output.size()
will hold), false otherwise.public void insert(Word<I> word, Word<O> outputWord)
word
- the input wordoutputWord
- the corresponding output wordConflictException
- if this information conflicts with information already storedpublic State getSuccessor(TransitionRecord transition)
TransitionSystem
getSuccessor
in interface TransitionSystem<State,I,TransitionRecord>
transition
- the transition.public State getInitialState()
SimpleDTS
getInitialState
in interface SimpleDTS<State,I>
SimpleTS.getInitialStates()
public Void getNodeProperty(State node)
UniversalIndefiniteGraph
getNodeProperty
in interface UniversalIndefiniteGraph<State,TransitionRecord,Void,TransitionEdge.Property<I,O>>
node
- the nodepublic TransitionEdge.Property<I,O> getEdgeProperty(TransitionRecord edge)
UniversalIndefiniteGraph
getEdgeProperty
in interface UniversalIndefiniteGraph<State,TransitionRecord,Void,TransitionEdge.Property<I,O>>
edge
- the edgepublic Collection<TransitionRecord> getOutgoingEdges(State node)
IndefiniteGraph
getOutgoingEdges
in interface IndefiniteGraph<State,TransitionRecord>
node
- the node.Collection
of all outgoing edges, or null
if
the node has no outgoing edges.public State getTarget(TransitionRecord edge)
IndefiniteGraph
getTarget
in interface IndefiniteGraph<State,TransitionRecord>
edge
- the edge.public O getTransitionOutput(TransitionRecord transition)
getTransitionOutput
in interface TransitionOutput<TransitionRecord,O>
public TransitionRecord getTransition(State state, I input)
DeterministicTransitionSystem
getTransition
in interface DeterministicTransitionSystem<State,I,TransitionRecord>
state
- the source state.input
- the input symbol.null
if no transition is triggered.TransitionSystem.getTransitions(Object, Object)
public GraphDOTHelper<State,TransitionRecord> getGraphDOTHelper()
getGraphDOTHelper
in interface DOTPlottableGraph<State,TransitionRecord>
public Collection<State> getStates()
SimpleAutomaton
getStates
in interface SimpleAutomaton<State,I>
public Collection<State> getNodes()
Graph
getNodes
in interface Graph<State,TransitionRecord>
public Alphabet<I> getInputAlphabet()
IncrementalConstruction
getInputAlphabet
in interface IncrementalConstruction<MealyMachine<?,I,?,O>,I>
public Word<I> findSeparatingWord(MealyMachine<?,I,?,O> target, Collection<? extends I> inputs, boolean omitUndefined)
IncrementalConstruction
findSeparatingWord
in interface IncrementalConstruction<MealyMachine<?,I,?,O>,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 CompactMealy<I,O> toAutomaton()
IncrementalConstruction
toAutomaton
in interface IncrementalConstruction<MealyMachine<?,I,?,O>,I>
public boolean hasDefinitiveInformation(Word<I> word)
IncrementalConstruction
hasDefinitiveInformation
in interface IncrementalConstruction<MealyMachine<?,I,?,O>,I>
word
- the wordpublic NodeIDs<State> nodeIDs()
nodeIDs
in interface Graph<State,TransitionRecord>
public <V> MutableMapping<State,V> createStaticNodeMapping()
createStaticNodeMapping
in interface IndefiniteGraph<State,TransitionRecord>
public <V> MutableMapping<State,V> createDynamicNodeMapping()
createDynamicNodeMapping
in interface IndefiniteGraph<State,TransitionRecord>
Copyright © 2015. All Rights Reserved.