public class BricsDFA extends AbstractBricsAutomaton implements DFA<State,Character>
DFA
.
This adapter is backed by the Brics automaton, so changes to the Automaton
are reflected. Please note that
any changes which result in a loss of determinism will result in incorrect behavior exposed by this class until
determinism is restored.
AbstractBricsAutomaton.GraphView
UniversalDeterministicAutomaton.FullIntAbstraction<T,SP,TP>, UniversalDeterministicAutomaton.IntAbstraction<T,SP,TP>, UniversalDeterministicAutomaton.StateIntAbstraction<I,T,SP,TP>
FiniteStateAcceptor.FSAGraphView<S,I,A extends FiniteStateAcceptor<S,I>>
automaton
STATE_PROPERTIES, TRANSITION_PROPERTIES
Constructor and Description |
---|
BricsDFA(Automaton automaton)
Constructor.
|
BricsDFA(Automaton automaton,
boolean totalize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
State |
getInitialState()
Retrieves the initial state of this transition system.
|
State |
getSuccessor(State state,
Character input)
Retrieves the successor state reachable by the given input symbol.
|
State |
getTransition(State state,
Character input)
Retrieves the transition triggered by the given input symbol.
|
getBricsAutomaton, getInitialStates, getStates, getTransitions, graphView, isAccepting
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accepts, computeOutput, computeStateOutput, computeSuffixOutput, isAccepting
fullIntAbstraction, fullIntAbstraction, stateIntAbstraction
getTransitionProperty
getSuccessors, getTransitions, transToSet
getInitialStates, getState, getStates, getSuccessor, getSuccessors, stateToSet
transitionGraphView
getStateProperty, getSuccessor, getTransitionProperty, isAccepting
powersetView
createDynamicStateMapping, createStaticStateMapping, getStates, iterator, size, stateIDs
getSuccessors
forEach, spliterator
public BricsDFA(Automaton automaton)
Automaton
is not deterministic, it will be automatically determinized by
invoking Automaton.determinize()
.
Note: Brics automata may only be partially defined (especially when created from regular expressions). If
you plan to use this wrapper in any structural analysis (e.g. for determining equivalence), consider using
BricsDFA(Automaton, boolean)
instead.
automaton
- the Brics automaton to wrap.public BricsDFA(Automaton automaton, boolean totalize)
Automaton
is not deterministic, it will be automatically determinized by
invoking Automaton.determinize()
.
If the parameter totalize
is set to true
, an additional sink state will be added to the automaton
and all otherwise undefined transitions will transition the automaton into the sink. Note: this mutates
the original automaton
.
automaton
- the Brics automaton to wrap.totalize
- flag, indicating whether the automaton should have a total transition function.public State getInitialState()
SimpleDTS
getInitialState
in interface SimpleDTS<State,Character>
SimpleTS.getInitialStates()
public State getSuccessor(State state, Character input)
SimpleDTS
getSuccessor
in interface DeterministicTransitionSystem<State,Character,State>
getSuccessor
in interface SimpleDTS<State,Character>
state
- the source state.input
- the input symbol.null
if no state is reachable by
this symbol.TransitionSystem.getSuccessors(Object, Object)
public State getTransition(State state, Character input)
DeterministicTransitionSystem
getTransition
in interface DeterministicTransitionSystem<State,Character,State>
state
- the source state.input
- the input symbol.null
if no transition is triggered.TransitionSystem.getTransitions(Object, Object)
Copyright © 2020. All rights reserved.