I
- input symbol typeT
- transition typeSP
- state property typeTP
- transition property typepublic abstract class AbstractCompactDeterministic<I,T,SP,TP> extends AbstractCompact<I,T,SP,TP> implements MutableDeterministic<Integer,I,T,SP,TP>, MutableDeterministic.StateIntAbstraction<I,T,SP,TP>, MutableDeterministic.FullIntAbstraction<T,SP,TP>, Serializable
AbstractCompact
for deterministic automata. This class provides default
implementations for several of the MutableDeterministic.FullIntAbstraction
concepts, such that subclasses
only need to care about the primitive-based implementations.AbstractCompact.Payload
MutableDeterministic.FullIntAbstraction<T,SP,TP>, MutableDeterministic.IntAbstraction<T,SP,TP>, MutableDeterministic.StateIntAbstraction<I,T,SP,TP>
MutableDeterministic.StateIntAbstraction.DefaultAbstraction<S,I,T,SP,TP,A extends MutableDeterministic<S,I,T,SP,TP>>
MutableDeterministic.FullIntAbstraction.DefaultAbstraction<I,T,SP,TP,A extends MutableDeterministic.StateIntAbstraction<I,T,SP,TP>>
DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, INVALID_STATE
INVALID_STATE
Constructor and Description |
---|
AbstractCompactDeterministic(Alphabet<I> alphabet,
AbstractCompactDeterministic<?,?,?,?> other) |
AbstractCompactDeterministic(Alphabet<I> alphabet,
int stateCapacity,
float resizeFactor) |
Modifier and Type | Method and Description |
---|---|
int |
addIntInitialState(SP property) |
void |
clear()
Removes all states and transitions.
|
T |
createTransition(Integer successor,
TP properties) |
MutableDeterministic.FullIntAbstraction<T,SP,TP> |
fullIntAbstraction(Alphabet<I> alphabet)
Retrieves a
SimpleDeterministicAutomaton.FullIntAbstraction of this automaton, using the mapping induced by the given alphabet as the
abstraction for the input symbols. |
@Nullable Integer |
getInitialState()
Retrieves the initial state of this transition system.
|
int |
getIntInitialState()
Retrieves the initial state of the (abstracted) automaton as an integer.
|
Collection<I> |
getLocalInputs(Integer state)
Returns the collection of input symbols for which a successor state is defined.
|
SP |
getStateProperty(Integer state)
Retrieves the state property for the given state.
|
Integer |
getSuccessor(T transition)
Retrieves the successor state of a given transition.
|
T |
getTransition(Integer state,
I input)
Retrieves the transition triggered by the given input symbol.
|
T |
getTransition(int state,
I input)
Retrieves the outgoing transition for an (abstracted) source state and input symbol, or returns
null
if the automaton has no transition for this state and input. |
DeterministicPowersetView<Integer,I,T> |
powersetView()
Retrieves a "powerset view" of this transition system.
|
void |
setInitialState(int stateId) |
void |
setInitialState(@Nullable Integer state)
Sets the initial state to the given state.
|
void |
setStateProperty(Integer state,
SP property) |
void |
setTransition(Integer state,
I input,
T transition)
Sets the transition for the given state and input symbol.
|
void |
setTransition(int state,
I input,
int successor,
TP property) |
void |
setTransition(int state,
I input,
T transition) |
MutableDeterministic.StateIntAbstraction<I,T,SP,TP> |
stateIntAbstraction()
Retrieves a
SimpleDeterministicAutomaton.StateIntAbstraction of this automaton. |
addAlphabetSymbol, addIntState, addState, getInputAlphabet, getState, getStateId, getStates, getSymbolIndex, numInputs, setStateProperty, size, stateIDs, toId, toMemoryIndex, toState, updateStateStorage, updateStateStorage, updateTransitionStorage, updateTransitionStorage, updateTransitionStorage, updateTransitionStorage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTransition, fullIntAbstraction, removeAllTransitions, removeTransition, setInitial, setTransition, setTransitions
getTransitionProperty
getSuccessor, getSuccessors, getTransitions, transToSet
getInitialStates, getState, getStates, getSuccessor, getSuccessors, stateToSet
addInitialState, addInitialState, addState, addState, addTransition, addTransitions, copyTransition, removeAllTransitions, setTransitionProperty
transitionGraphView
createDynamicStateMapping, createStaticStateMapping, getStates, iterator, size, stateIDs
forEach, spliterator
getTransitionProperty
getSuccessors
getTransitionProperty
getSuccessor
setTransition, setTransition
addIntInitialState, addIntState, addIntState, createTransition, setStateProperty, setTransitionProperty
getTransitionProperty
getStateProperty, getTransitionProperty
getSuccessor, getTransition
getIntSuccessor
numInputs
size
transitionGraphView
graphView
public AbstractCompactDeterministic(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)
public AbstractCompactDeterministic(Alphabet<I> alphabet, AbstractCompactDeterministic<?,?,?,?> other)
public void setInitialState(@Nullable Integer state)
MutableDeterministic
null
can be
passed.setInitialState
in interface MutableDeterministic<Integer,I,T,SP,TP>
state
- the new initial state, or null
.public void setInitialState(int stateId)
setInitialState
in interface MutableDeterministic.IntAbstraction<T,SP,TP>
public SP getStateProperty(Integer state)
UniversalTransitionSystem
getStateProperty
in interface UniversalTransitionSystem<Integer,I,T,SP,TP>
state
- the state.public int getIntInitialState()
SimpleDeterministicAutomaton.IntAbstraction
SimpleDeterministicAutomaton.IntAbstraction.INVALID_STATE
is returned.getIntInitialState
in interface SimpleDeterministicAutomaton.IntAbstraction
SimpleDeterministicAutomaton.IntAbstraction.INVALID_STATE
.public @Nullable Integer getInitialState()
SimpleDTS
getInitialState
in interface SimpleDTS<Integer,I>
SimpleTS.getInitialStates()
public T getTransition(int state, I input)
DeterministicAutomaton.StateIntAbstraction
null
if the automaton has no transition for this state and input.getTransition
in interface DeterministicAutomaton.StateIntAbstraction<I,T>
state
- the integer representing the source stateinput
- the input symbolnull
public T getTransition(Integer state, I input)
DeterministicTransitionSystem
getTransition
in interface DeterministicTransitionSystem<Integer,I,T>
state
- the source state.input
- the input symbol.null
if no transition is triggered.TransitionSystem.getTransitions(Object, Object)
public void setTransition(Integer state, I input, T transition)
MutableDeterministic
setTransition
in interface MutableDeterministic<Integer,I,T,SP,TP>
state
- the source stateinput
- the triggering input symboltransition
- the transitionpublic void setTransition(int state, I input, T transition)
setTransition
in interface MutableDeterministic.StateIntAbstraction<I,T,SP,TP>
public void setTransition(int state, I input, int successor, TP property)
setTransition
in interface MutableDeterministic.StateIntAbstraction<I,T,SP,TP>
public void setStateProperty(Integer state, SP property)
setStateProperty
in interface MutableAutomaton<Integer,I,T,SP,TP>
public T createTransition(Integer successor, TP properties)
createTransition
in interface MutableAutomaton<Integer,I,T,SP,TP>
public int addIntInitialState(SP property)
addIntInitialState
in interface MutableDeterministic.IntAbstraction<T,SP,TP>
public Integer getSuccessor(T transition)
TransitionSystem
getSuccessor
in interface TransitionSystem<Integer,I,T>
transition
- the transition.public void clear()
MutableAutomaton
public MutableDeterministic.FullIntAbstraction<T,SP,TP> fullIntAbstraction(Alphabet<I> alphabet)
SimpleDeterministicAutomaton
SimpleDeterministicAutomaton.FullIntAbstraction
of this automaton, using the mapping induced by the given alphabet as the
abstraction for the input symbols.
This method is provided for convenience. It is equivalent to calling fullIntAbstraction(alphabet.size(),
alphabet)
.
fullIntAbstraction
in interface DeterministicAutomaton<Integer,I,T>
fullIntAbstraction
in interface MutableDeterministic<Integer,I,T,SP,TP>
fullIntAbstraction
in interface SimpleDeterministicAutomaton<Integer,I>
fullIntAbstraction
in interface UniversalDeterministicAutomaton<Integer,I,T,SP,TP>
alphabet
- the alphabet inducing the abstractionSimpleDeterministicAutomaton.FullIntAbstraction
public MutableDeterministic.StateIntAbstraction<I,T,SP,TP> stateIntAbstraction()
SimpleDeterministicAutomaton
SimpleDeterministicAutomaton.StateIntAbstraction
of this automaton.stateIntAbstraction
in interface DeterministicAutomaton<Integer,I,T>
stateIntAbstraction
in interface MutableDeterministic<Integer,I,T,SP,TP>
stateIntAbstraction
in interface SimpleDeterministicAutomaton<Integer,I>
stateIntAbstraction
in interface UniversalDeterministicAutomaton<Integer,I,T,SP,TP>
SimpleDeterministicAutomaton.StateIntAbstraction
public DeterministicPowersetView<Integer,I,T> powersetView()
TransitionSystem
powersetView
in interface TransitionSystem<Integer,I,T>
public Collection<I> getLocalInputs(Integer state)
StateLocalInput
getLocalInputs
in interface StateLocalInput<Integer,I>
getLocalInputs
in class AbstractCompact<I,T,SP,TP>
state
- the state for which the defined inputs should be returnedCopyright © 2020. All rights reserved.