I
- input symbol typeSP
- state property typepublic abstract class AbstractCompactSimpleDeterministic<I,SP> extends AbstractCompactDeterministic<I,Integer,SP,Void>
AbstractCompactDeterministic
for transition-property-less automata. As a
result, transitions may be represented as integers (where a transition object effectively is the successor).
Provides further default implementations for FullIntAbstraction
concepts.
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>>
Modifier and Type | Field and Description |
---|---|
protected int[] |
transitions |
DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, INVALID_STATE
INVALID_STATE
Constructor and Description |
---|
AbstractCompactSimpleDeterministic(Alphabet<I> alphabet,
AbstractCompactSimpleDeterministic<?,?> other) |
AbstractCompactSimpleDeterministic(Alphabet<I> alphabet,
int stateCapacity,
float resizeFactor) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all states and transitions.
|
Integer |
createTransition(int successor,
Void property) |
int |
getIntSuccessor(Integer transition)
Retrieves the (abstracted) successor of a transition object.
|
@Nullable Integer |
getState(Iterable<? extends I> input)
Retrieves the state reachable by the given sequence of input symbols from the initial state.
|
@Nullable Integer |
getSuccessor(Integer state,
Iterable<? extends I> input)
Retrieves the successor state reachable by the given sequence of input symbols.
|
@Nullable Integer |
getTransition(int state,
int input)
Retrieves the outgoing transition for an (abstracted) source state and (abstracted) input symbol, or returns
null if the automaton has no transition for this state and input. |
Void |
getTransitionProperty(Integer transition)
Retrieves the transition property for the given state.
|
void |
removeAllTransitions(Integer state) |
void |
setTransition(int state,
int inputIdx,
int succ) |
void |
setTransition(int state,
int input,
@Nullable Integer transition) |
void |
setTransition(int state,
int input,
int successor,
Void property) |
void |
setTransitionProperty(Integer transition,
Void property) |
protected void |
updateTransitionStorage(AbstractCompact.Payload payload)
Implementing classes should override this method in order to react to changes to the layout of their array-based
transition data, e.g. due to calls to
MutableAutomaton.addState() or AbstractCompact.addAlphabetSymbol(Object) . |
addIntInitialState, createTransition, fullIntAbstraction, getInitialState, getIntInitialState, getLocalInputs, getStateProperty, getSuccessor, getTransition, getTransition, powersetView, setInitialState, setInitialState, setStateProperty, setTransition, setTransition, setTransition, stateIntAbstraction
addAlphabetSymbol, addIntState, addState, getInputAlphabet, getState, getStateId, getStates, getSymbolIndex, numInputs, setStateProperty, size, stateIDs, toId, toMemoryIndex, toState, updateStateStorage, updateStateStorage, 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, getStates, getSuccessors, stateToSet
addInitialState, addInitialState, addState, addState, addTransition, addTransitions, copyTransition
transitionGraphView
createDynamicStateMapping, createStaticStateMapping, getStates, iterator, size, stateIDs
forEach, spliterator
getSuccessors
getTransitionProperty
getSuccessor
addIntInitialState, addIntState, addIntState, setStateProperty
getTransitionProperty
getStateProperty
getSuccessor
numInputs
size
transitionGraphView
graphView
public AbstractCompactSimpleDeterministic(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)
public AbstractCompactSimpleDeterministic(Alphabet<I> alphabet, AbstractCompactSimpleDeterministic<?,?> other)
public @Nullable Integer getState(Iterable<? extends I> input)
SimpleDTS
input
- the input word.null
if no state is reachable by this word.SimpleTS.getStates(Iterable)
public @Nullable Integer getSuccessor(Integer state, Iterable<? extends I> input)
SimpleDTS
state
- the source state.input
- the input symbol.null
if no state is
reachable by this symbol.SimpleTS.getSuccessors(Object, Iterable)
public @Nullable Integer getTransition(int state, int input)
DeterministicAutomaton.FullIntAbstraction
null
if the automaton has no transition for this state and input.state
- the integer representing the source stateinput
- the integer representing the input symbolnull
protected void updateTransitionStorage(AbstractCompact.Payload payload)
AbstractCompact
MutableAutomaton.addState()
or AbstractCompact.addAlphabetSymbol(Object)
.
Subclasses may use one of the AbstractCompact.updateTransitionStorage(Object[], IntFunction, Object, Payload)
... methods
to conveniently delegate this task to this base class. This leaves subclasses only with the task to invoke the
provided update methods for each of their local array storages.
updateTransitionStorage
in class AbstractCompact<I,Integer,SP,Void>
payload
- the payload containing the necessary information for the update operation. This object must be passed
as-is to the AbstractCompact.updateTransitionStorage(Object[], IntFunction, Object, Payload)
... methods.public void removeAllTransitions(Integer state)
public void setTransition(int state, int input, int successor, Void property)
public void setTransition(int state, int inputIdx, int succ)
public Void getTransitionProperty(Integer transition)
UniversalTransitionSystem
transition
- the transition.public void clear()
MutableAutomaton
public int getIntSuccessor(Integer transition)
DeterministicAutomaton.IntAbstraction
transition
- the transition objectCopyright © 2020. All rights reserved.