Package net.automatalib.automaton.fsa
Class CompactDFA<I>
- java.lang.Object
-
- net.automatalib.automaton.base.AbstractCompact<I,T,SP,TP>
-
- net.automatalib.automaton.base.AbstractCompactDeterministic<I,Integer,SP,Void>
-
- net.automatalib.automaton.base.AbstractCompactSimpleDeterministic<I,Boolean>
-
- net.automatalib.automaton.fsa.CompactDFA<I>
-
- All Implemented Interfaces:
Iterable<Integer>
,SupportsGrowingAlphabet<I>
,Automaton<Integer,I,Integer>
,DetOutputAutomaton<Integer,I,Integer,Boolean>
,DetSuffixOutputAutomaton<Integer,I,Integer,Boolean>
,FiniteRepresentation
,InputAlphabetHolder<I>
,Output<I,Boolean>
,OutputAutomaton<Integer,I,Integer,Boolean>
,StateIDs<Integer>
,StateLocalInput<Integer,I>
,SuffixOutput<I,Boolean>
,DeterministicAutomaton<Integer,I,Integer>
,DeterministicAutomaton.FullIntAbstraction<Integer>
,DeterministicAutomaton.IntAbstraction<Integer>
,DeterministicAutomaton.StateIntAbstraction<I,Integer>
,FiniteAlphabetAutomaton<Integer,I,Integer>
,DFA<Integer,I>
,FiniteStateAcceptor<Integer,I>
,MutableDFA<Integer,I>
,MutableFSA<Integer,I>
,NFA<Integer,I>
,MutableAutomaton<Integer,I,Integer,Boolean,Void>
,MutableDeterministic<Integer,I,Integer,Boolean,Void>
,MutableDeterministic.FullIntAbstraction<Integer,Boolean,Void>
,MutableDeterministic.IntAbstraction<Integer,Boolean,Void>
,MutableDeterministic.StateIntAbstraction<I,Integer,Boolean,Void>
,SimpleAutomaton<Integer,I>
,SimpleDeterministicAutomaton<Integer,I>
,SimpleDeterministicAutomaton.FullIntAbstraction
,SimpleDeterministicAutomaton.IntAbstraction
,SimpleDeterministicAutomaton.StateIntAbstraction<I>
,UniversalAutomaton<Integer,I,Integer,Boolean,Void>
,UniversalDeterministicAutomaton<Integer,I,Integer,Boolean,Void>
,UniversalDeterministicAutomaton.FullIntAbstraction<Integer,Boolean,Void>
,UniversalDeterministicAutomaton.IntAbstraction<Integer,Boolean,Void>
,UniversalDeterministicAutomaton.StateIntAbstraction<I,Integer,Boolean,Void>
,UniversalFiniteAlphabetAutomaton<Integer,I,Integer,Boolean,Void>
,GraphViewable
,AcceptorTS<Integer,I>
,DeterministicAcceptorTS<Integer,I>
,DeterministicTransitionSystem<Integer,I,Integer>
,SimpleDTS<Integer,I>
,SimpleTS<Integer,I>
,TransitionSystem<Integer,I,Integer>
,UniversalDTS<Integer,I,Integer,Boolean,Void>
,UniversalTransitionSystem<Integer,I,Integer,Boolean,Void>
public class CompactDFA<I> extends AbstractCompactSimpleDeterministic<I,Boolean> implements MutableDFA<Integer,I>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompactDFA.Creator<I>
-
Nested classes/interfaces inherited from class net.automatalib.automaton.base.AbstractCompact
AbstractCompact.Payload
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.DeterministicAutomaton
DeterministicAutomaton.FullIntAbstraction<T>, DeterministicAutomaton.IntAbstraction<T>, DeterministicAutomaton.StateIntAbstraction<I,T>
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.fsa.FiniteStateAcceptor
FiniteStateAcceptor.FSAGraphView<S,I,A extends FiniteStateAcceptor<S,I>>
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.MutableDeterministic
MutableDeterministic.FullIntAbstraction<T,SP,TP>, MutableDeterministic.IntAbstraction<T,SP,TP>, MutableDeterministic.StateIntAbstraction<I,T,SP,TP>
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.UniversalDeterministicAutomaton
UniversalDeterministicAutomaton.FullIntAbstraction<T,SP,TP>, UniversalDeterministicAutomaton.IntAbstraction<T,SP,TP>, UniversalDeterministicAutomaton.StateIntAbstraction<I,T,SP,TP>
-
-
Field Summary
-
Fields inherited from class net.automatalib.automaton.base.AbstractCompactSimpleDeterministic
transitions
-
Fields inherited from class net.automatalib.automaton.base.AbstractCompact
DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, INVALID_STATE
-
Fields inherited from interface net.automatalib.automaton.fsa.FiniteStateAcceptor
STATE_PROPERTIES, TRANSITION_PROPERTIES
-
Fields inherited from interface net.automatalib.automaton.simple.SimpleDeterministicAutomaton.IntAbstraction
INVALID_STATE
-
-
Constructor Summary
Constructors Modifier Constructor Description CompactDFA(Alphabet<I> alphabet)
CompactDFA(Alphabet<I> alphabet, float resizeFactor)
CompactDFA(Alphabet<I> alphabet, int stateCapacity)
CompactDFA(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)
protected
CompactDFA(Alphabet<I> alphabet, CompactDFA<?> other)
CompactDFA(CompactDFA<I> other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
addState(boolean accepting)
void
clear()
Removes all states and transitions.void
flipAcceptance()
Boolean
getStateProperty(int stateId)
Retrieves the state property of a given (abstracted) state.boolean
isAccepting(int stateId)
boolean
isAccepting(Integer state)
Checks whether the given state is accepting.void
setAccepting(int state, boolean accepting)
void
setAccepting(Integer state, boolean accepting)
void
setStateProperty(int stateId, @Nullable Boolean property)
<I2> CompactDFA<I2>
translate(Alphabet<I2> newAlphabet)
-
Methods inherited from class net.automatalib.automaton.base.AbstractCompactSimpleDeterministic
createTransition, getIntSuccessor, getState, getSuccessor, getTransition, getTransitionProperty, removeAllTransitions, setTransition, setTransition, setTransition, setTransitionProperty, updateTransitionStorage
-
Methods inherited from class net.automatalib.automaton.base.AbstractCompactDeterministic
addIntInitialState, createTransition, fullIntAbstraction, getInitialState, getIntInitialState, getLocalInputs, getStateProperty, getSuccessor, getTransition, getTransition, powersetView, setInitialState, setInitialState, setStateProperty, setTransition, setTransition, setTransition, stateIntAbstraction
-
Methods inherited from class net.automatalib.automaton.base.AbstractCompact
addAlphabetSymbol, addIntState, addState, getInputAlphabet, getState, getStateId, getStates, getSymbolIndex, numInputs, size, stateIDs, toId, toMemoryIndex, toState, updateStateStorage, updateStateStorage, updateTransitionStorage, updateTransitionStorage, updateTransitionStorage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.ts.acceptor.AcceptorTS
getStateProperty, getSuccessor, getTransitionProperty
-
Methods inherited from interface net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction
getSuccessor
-
Methods inherited from interface net.automatalib.automaton.DeterministicAutomaton.StateIntAbstraction
getSuccessor
-
Methods inherited from interface net.automatalib.ts.DeterministicTransitionSystem
getSuccessor, getSuccessors, getTransition, getTransitions
-
Methods inherited from interface net.automatalib.automaton.fsa.DFA
accepts, computeOutput, computeStateOutput, computeSuffixOutput, isAccepting
-
Methods inherited from interface net.automatalib.automaton.FiniteAlphabetAutomaton
getTransitions, graphView
-
Methods inherited from interface net.automatalib.automaton.fsa.FiniteStateAcceptor
computeOutput, computeSuffixOutput, transitionGraphView
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface net.automatalib.automaton.MutableAutomaton
addTransition, addTransitions, removeAllTransitions
-
Methods inherited from interface net.automatalib.automaton.MutableDeterministic
addTransition, fullIntAbstraction, fullIntAbstraction, removeAllTransitions, removeTransition, setInitial, setInitialState, setTransition, setTransition, setTransitions, stateIntAbstraction
-
Methods inherited from interface net.automatalib.automaton.MutableDeterministic.IntAbstraction
addIntInitialState, addIntState, addIntState
-
Methods inherited from interface net.automatalib.automaton.fsa.MutableFSA
addInitialState, addInitialState, addInitialState, addState, addState, copyTransition, createTransition, setStateProperty, setTransitionProperty
-
Methods inherited from interface net.automatalib.automaton.simple.SimpleAutomaton
createDynamicStateMapping, createStaticStateMapping, getStates, iterator, size, stateIDs
-
Methods inherited from interface net.automatalib.automaton.simple.SimpleDeterministicAutomaton.FullIntAbstraction
numInputs
-
Methods inherited from interface net.automatalib.ts.simple.SimpleDTS
getInitialState, getInitialStates, getState, getStates, getSuccessor, getSuccessors, getSuccessors
-
Methods inherited from interface net.automatalib.ts.simple.SimpleTS
getSuccessors
-
Methods inherited from interface net.automatalib.ts.TransitionSystem
powersetView
-
Methods inherited from interface net.automatalib.automaton.UniversalDeterministicAutomaton.FullIntAbstraction
getTransitionProperty
-
Methods inherited from interface net.automatalib.automaton.UniversalDeterministicAutomaton.StateIntAbstraction
getTransitionProperty
-
Methods inherited from interface net.automatalib.ts.UniversalDTS
getTransitionProperty
-
Methods inherited from interface net.automatalib.automaton.UniversalFiniteAlphabetAutomaton
transitionGraphView
-
-
-
-
Constructor Detail
-
CompactDFA
public CompactDFA(CompactDFA<I> other)
-
CompactDFA
protected CompactDFA(Alphabet<I> alphabet, CompactDFA<?> other)
-
-
Method Detail
-
translate
public <I2> CompactDFA<I2> translate(Alphabet<I2> newAlphabet)
-
flipAcceptance
public void flipAcceptance()
- Specified by:
flipAcceptance
in interfaceMutableFSA<Integer,I>
-
setAccepting
public void setAccepting(Integer state, boolean accepting)
- Specified by:
setAccepting
in interfaceMutableFSA<Integer,I>
-
setAccepting
public void setAccepting(int state, boolean accepting)
-
addState
public Integer addState(boolean accepting)
- Specified by:
addState
in interfaceMutableFSA<Integer,I>
-
clear
public void clear()
Description copied from interface:MutableAutomaton
Removes all states and transitions.
-
setStateProperty
public void setStateProperty(int stateId, @Nullable Boolean property)
- Specified by:
setStateProperty
in interfaceMutableDeterministic.IntAbstraction<Integer,Boolean,Void>
- Specified by:
setStateProperty
in classAbstractCompact<I,Integer,Boolean,Void>
-
getStateProperty
public Boolean getStateProperty(int stateId)
Description copied from interface:UniversalDeterministicAutomaton.IntAbstraction
Retrieves the state property of a given (abstracted) state.- Specified by:
getStateProperty
in interfaceUniversalDeterministicAutomaton.IntAbstraction<Integer,Boolean,Void>
- Parameters:
stateId
- the integer representing the state of which to retrieve the property- Returns:
- the property for the given state
-
isAccepting
public boolean isAccepting(int stateId)
-
isAccepting
public boolean isAccepting(Integer state)
Description copied from interface:AcceptorTS
Checks whether the given state is accepting.- Specified by:
isAccepting
in interfaceAcceptorTS<Integer,I>
- Parameters:
state
- the state- Returns:
true
if the state is accepting,false
otherwise.
-
-