Module net.automatalib.core
Package net.automatalib.automaton.base
Class AbstractFastMutable<S extends AbstractFastState<?>,I,T,SP,TP>
java.lang.Object
net.automatalib.automaton.base.AbstractFastMutable<S,I,T,SP,TP>
- All Implemented Interfaces:
Iterable<S>,SupportsGrowingAlphabet<I>,Automaton<S,,I, T> FiniteRepresentation,InitialStates<S>,InputAlphabetHolder<I>,Shrinkable<S>,StateIDs<S>,StateLocalInput<S,,I> FiniteAlphabetAutomaton<S,,I, T> MutableAutomaton<S,,I, T, SP, TP> SimpleAutomaton<S,,I> UniversalAutomaton<S,,I, T, SP, TP> UniversalFiniteAlphabetAutomaton<S,,I, T, SP, TP> GraphViewable,SimpleTS<S,,I> TransitionSystem<S,,I, T> UniversalTransitionSystem<S,I, T, SP, TP>
- Direct Known Subclasses:
AbstractFastMutableDet,AbstractFastMutableNondet
public abstract class AbstractFastMutable<S extends AbstractFastState<?>,I,T,SP,TP>
extends Object
implements MutableAutomaton<S,I,T,SP,TP>, Shrinkable<S>, UniversalFiniteAlphabetAutomaton<S,I,T,SP,TP>, StateIDs<S>, SupportsGrowingAlphabet<I>, StateLocalInput<S,I>
Shared functionality for (non-) deterministic mutable automata.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.automatalib.automaton.Automaton
Automaton.RegularAutomaton<S,I, T> Nested classes/interfaces inherited from interface net.automatalib.automaton.MutableAutomaton
MutableAutomaton.RegularAutomaton<S,I, T, SP, TP> Nested classes/interfaces inherited from interface net.automatalib.automaton.UniversalAutomaton
UniversalAutomaton.RegularAutomaton<S,I, T, SP, TP> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlphabetSymbol(I symbol) Notifies the data structure that a new symbol should be added to the alphabet.Adds a new state with the given property to the automaton.voidclear()Removes all states and transitions.<V> MutableMapping<S,V> Creates aMutableMappingallowing to associate arbitrary data with this transition system's states.protected abstract ScreateState(@Nullable SP property) getState(int id) Return for a given id the state of the automaton identified by it.intgetStateId(S state) Returns for a given state of the automaton an integer uniquely identifying the state.Retrieves all states of the transition system.voidremoveAllTransitions(S state) voidremoveState(S state, @Nullable S replacement) Removes a state from the automaton.stateIDs()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.automatalib.automaton.FiniteAlphabetAutomaton
getTransitions, graphViewMethods inherited from interface net.automatalib.automaton.concept.InitialStates
getInitialStatesMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.automatalib.automaton.MutableAutomaton
addInitialState, addInitialState, addState, addTransition, addTransition, addTransitions, copyTransition, createTransition, removeAllTransitions, removeTransition, setInitial, setStateProperty, setTransitionProperty, setTransitionsMethods inherited from interface net.automatalib.automaton.concept.Shrinkable
removeStateMethods inherited from interface net.automatalib.automaton.simple.SimpleAutomaton
createStaticStateMapping, iterator, sizeMethods inherited from interface net.automatalib.ts.simple.SimpleTS
getStates, getSuccessorsMethods inherited from interface net.automatalib.automaton.concept.StateLocalInput
getLocalInputsMethods inherited from interface net.automatalib.ts.TransitionSystem
getSuccessor, getSuccessors, getTransitions, powersetViewMethods inherited from interface net.automatalib.automaton.UniversalAutomaton
transitionGraphViewMethods inherited from interface net.automatalib.automaton.UniversalFiniteAlphabetAutomaton
transitionGraphViewMethods inherited from interface net.automatalib.ts.UniversalTransitionSystem
getStateProperty, getTransitionProperty
-
Field Details
-
inputAlphabet
-
-
Constructor Details
-
AbstractFastMutable
-
-
Method Details
-
getStateId
Description copied from interface:StateIDsReturns for a given state of the automaton an integer uniquely identifying the state. The returned ids should be within the range of the number of states of the automaton so that they can be used for array-based indexing.- Specified by:
getStateIdin interfaceStateIDs<S extends AbstractFastState<?>>- Parameters:
state- the state whose id should be retrieved- Returns:
- the (positive) id of the given automaton state
-
getState
Description copied from interface:StateIDsReturn for a given id the state of the automaton identified by it.- Specified by:
getStatein interfaceStateIDs<S extends AbstractFastState<?>>- Parameters:
id- the id of the state to be returned- Returns:
- the automaton state identified by the given
id.
-
addState
Description copied from interface:MutableAutomatonAdds a new state with the given property to the automaton.- Specified by:
addStatein interfaceMutableAutomaton<S extends AbstractFastState<?>,I, T, SP, TP> - Parameters:
property- the property of the new state- Returns:
- the newly created state
-
removeAllTransitions
- Specified by:
removeAllTransitionsin interfaceMutableAutomaton<S extends AbstractFastState<?>,I, T, SP, TP>
-
createState
-
removeState
Description copied from interface:ShrinkableRemoves a state from the automaton. All ingoing transitions to this state are redirected to the given replacement state. If anullreplacement is given, then this method behaves like the aboveShrinkable.removeState(Object).- Specified by:
removeStatein interfaceShrinkable<S extends AbstractFastState<?>>- Parameters:
state- the state to removereplacement- the replacement state, ornull
-
clear
public void clear()Description copied from interface:MutableAutomatonRemoves all states and transitions.- Specified by:
clearin interfaceMutableAutomaton<S extends AbstractFastState<?>,I, T, SP, TP>
-
getInputAlphabet
- Specified by:
getInputAlphabetin interfaceInputAlphabetHolder<S extends AbstractFastState<?>>
-
createDynamicStateMapping
Description copied from interface:SimpleTSCreates aMutableMappingallowing to associate arbitrary data with this transition system's states. The returned mapping maintains the association even when the transition system is modified.- Specified by:
createDynamicStateMappingin interfaceSimpleAutomaton<S extends AbstractFastState<?>,I> - Specified by:
createDynamicStateMappingin interfaceSimpleTS<S extends AbstractFastState<?>,I> - Type Parameters:
V- the value type of the mapping- Returns:
- the mutable mapping
-
addAlphabetSymbol
Description copied from interface:SupportsGrowingAlphabetNotifies the data structure that a new symbol should be added to the alphabet. Behavior depends on the implementation:- After adding a new symbol, the symbol-related data may either be initialized with default values or undefined.
- Duplicate symbols may: (1) be handled accordingly, (2) be ignored or (3) result in an error.
GrowingAlphabet) to handle potentially shared state across multiple instances. If the needed requirements are not met, aGrowingAlphabetNotSupportedExceptioncan be thrown.- Specified by:
addAlphabetSymbolin interfaceSupportsGrowingAlphabet<S extends AbstractFastState<?>>- Parameters:
symbol- the symbol to add to the alphabet.
-
getStates
Description copied from interface:SimpleAutomatonRetrieves all states of the transition system. Implementing classes should return an unmodifiable collection- Specified by:
getStatesin interfaceSimpleAutomaton<S extends AbstractFastState<?>,I> - Returns:
- all states in the transition system
-
stateIDs
- Specified by:
stateIDsin interfaceSimpleAutomaton<S extends AbstractFastState<?>,I>
-