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.
automaton
STATE_PROPERTIES, TRANSITION_PROPERTIES
Constructor and Description |
---|
BricsDFA(Automaton automaton)
Constructor.
|
BricsDFA(Automaton automaton,
boolean mayDeterminize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Iterable<Character> input)
Determines whether the given input word is accepted by this acceptor.
|
State |
getInitialState()
Retrieves the initial state of this transition system.
|
State |
getState(Iterable<Character> input)
Retrieves the state reachable by the given sequence of input symbols
from the initial state.
|
State |
getSuccessor(State state,
Character input)
Retrieves the successor state reachable by the given input symbol.
|
State |
getSuccessor(State state,
Iterable<Character> input)
Retrieves the successor state reachable by the given sequence of
input symbols.
|
Set<State> |
getSuccessors(State state,
Character input)
Retrieves the set of successors for the given input symbol.
|
State |
getTransition(State state,
Character input)
Retrieves the transition triggered by the given input symbol.
|
Collection<State> |
getTransitions(State state,
Character input)
Retrieves the transitions that can be triggered by the given
input symbol.
|
createDynamicNodeMapping, createStaticNodeMapping, getBricsAutomaton, getEdgeProperty, getGraphDOTHelper, getInitialStates, getNodeProperty, getNodes, getOutgoingEdges, getStates, getTarget, isAccepting, nodeIDs
computeOutput, computeOutput, computeSuffixOutput, computeSuffixOutput, getStateProperty, getStateProperty, getSuccessor, getSuccessor, getTransitionProperty, getTransitionProperty
iterator, iterator, size, size, stateIDs, stateIDs
createDynamicStateMapping, createDynamicStateMapping, createStaticStateMapping, createStaticStateMapping, getStates, getStates, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, powersetView, powersetView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAccepting
getStateProperty, getTransitionProperty
computeOutput
getStates, size, stateIDs
forEach, iterator, spliterator
getSuccessor, powersetView
createDynamicStateMapping, createStaticStateMapping, getInitialStates, getStates, getSuccessors, getSuccessors
computeSuffixOutput
public BricsDFA(Automaton automaton)
IllegalArgumentException
.automaton
- the Brics automaton to wrap.public BricsDFA(Automaton automaton, boolean mayDeterminize)
BricsDFA(Automaton)
. Otherwise, if the specified automaton is not deterministic,
it is determinized beforehand by invoking Automaton.determinize()
.automaton
- the Brics automaton to wrap.mayDeterminize
- whether or not a possible nondeterministic automaton may be
determinized.public boolean accepts(Iterable<Character> input)
AcceptorTS
accepts
in interface AcceptorTS<State,Character>
input
- the input word.true
if the input word is accepted,
false
otherwise.public State getInitialState()
SimpleDTS
getInitialState
in interface SimpleDTS<State,Character>
SimpleTS.getInitialStates()
public State getSuccessor(State state, Character input)
SimpleDTS
getSuccessor
in interface SimpleDTS<State,Character>
state
- the source state.input
- the input symbol.null
if no state is reachable by this symbol.SimpleTS.getSuccessors(Object, Object)
public State getSuccessor(State state, Iterable<Character> input)
SimpleDTS
getSuccessor
in interface SimpleDTS<State,Character>
state
- the source state.input
- the input symbol.null
if no state is reachable by this symbol.SimpleTS.getSuccessors(Object, Iterable)
public State getState(Iterable<Character> input)
SimpleDTS
getState
in interface SimpleDTS<State,Character>
input
- the input word.null
if no state is reachable by this word.SimpleTS.getStates(Iterable)
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)
public Collection<State> getTransitions(State state, Character input)
TransitionSystem
getTransitions
in interface TransitionSystem<State,Character,State>
getTransitions
in class AbstractBricsAutomaton
state
- the source state.input
- the input symbol.null
if no transitions
are triggered by this input symbol.public Set<State> getSuccessors(State state, Character input)
SimpleTS
getSuccessors
in interface SimpleTS<State,Character>
getSuccessors
in class AbstractTS<State,Character,State>
state
- the source state.input
- the input symbol.null
if no successor states are reachable by this input.Copyright © 2015. All Rights Reserved.