Module de.learnlib.algorithm.ttt
Package de.learnlib.algorithm.ttt.base
Class AbstractTTTHypothesis<S extends TTTState<I,D>,I,D,T>
- java.lang.Object
-
- de.learnlib.algorithm.ttt.base.AbstractTTTHypothesis<S,I,D,T>
-
- Type Parameters:
S
- state class typeI
- input symbol typeD
- output domain typeT
- transition type
- All Implemented Interfaces:
Iterable<S>
,net.automatalib.alphabet.SupportsGrowingAlphabet<I>
,net.automatalib.automaton.Automaton<S,I,T>
,net.automatalib.automaton.concept.FiniteRepresentation
,net.automatalib.automaton.concept.InputAlphabetHolder<I>
,net.automatalib.automaton.concept.StateIDs<S>
,net.automatalib.automaton.DeterministicAutomaton<S,I,T>
,net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<T>
,net.automatalib.automaton.DeterministicAutomaton.IntAbstraction<T>
,net.automatalib.automaton.FiniteAlphabetAutomaton<S,I,T>
,net.automatalib.automaton.simple.SimpleAutomaton<S,I>
,net.automatalib.automaton.simple.SimpleDeterministicAutomaton<S,I>
,net.automatalib.automaton.simple.SimpleDeterministicAutomaton.FullIntAbstraction
,net.automatalib.automaton.simple.SimpleDeterministicAutomaton.IntAbstraction
,net.automatalib.graph.concept.GraphViewable
,net.automatalib.ts.DeterministicTransitionSystem<S,I,T>
,net.automatalib.ts.simple.SimpleDTS<S,I>
,net.automatalib.ts.simple.SimpleTS<S,I>
,net.automatalib.ts.TransitionSystem<S,I,T>
- Direct Known Subclasses:
TTTHypothesisDFA
,TTTHypothesisMealy
,TTTHypothesisMoore
public abstract class AbstractTTTHypothesis<S extends TTTState<I,D>,I,D,T> extends Object implements net.automatalib.automaton.DeterministicAutomaton<S,I,T>, net.automatalib.automaton.FiniteAlphabetAutomaton<S,I,T>, net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<T>, net.automatalib.automaton.concept.StateIDs<S>, net.automatalib.alphabet.SupportsGrowingAlphabet<I>
Hypothesis DFA for theTTT algorithm
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AbstractTTTHypothesis.GraphView
static class
AbstractTTTHypothesis.TTTEdge<I,D>
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.DeterministicAutomaton
net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<T extends Object>, net.automatalib.automaton.DeterministicAutomaton.IntAbstraction<T extends Object>, net.automatalib.automaton.DeterministicAutomaton.StateIntAbstraction<I extends Object,T extends Object>
-
-
Constructor Summary
Constructors Constructor Description AbstractTTTHypothesis(net.automatalib.alphabet.Alphabet<I> alphabet)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addAlphabetSymbol(I symbol)
S
createState(TTTTransition<I,D> parent)
net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<T>
fullIntAbstraction(net.automatalib.alphabet.Alphabet<I> alphabet)
S
getInitialState()
net.automatalib.alphabet.Alphabet<I>
getInputAlphabet()
TTTTransition<I,D>
getInternalTransition(TTTState<I,D> state, int input)
TTTTransition<I,D>
getInternalTransition(TTTState<I,D> state, I input)
Retrieves the internal transition (i.e., theTTTTransition
object) for a given state and input.int
getIntInitialState()
int
getIntSuccessor(T trans)
S
getState(int id)
int
getStateId(S state)
Collection<S>
getStates()
T
getTransition(int stateId, int symIdx)
@Nullable T
getTransition(S state, I input)
AbstractTTTHypothesis.GraphView
graphView()
S
initialize()
Initializes the automaton, adding an initial state.boolean
isInitialized()
Checks whether this automaton was initialized (i.e.,initialize()
has been called).protected abstract T
mapTransition(TTTTransition<I,D> internalTransition)
protected abstract S
newState(int alphabetSize, TTTTransition<I,D> parent, int id)
int
numInputs()
int
size()
net.automatalib.automaton.concept.StateIDs<S>
stateIDs()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.automaton.DeterministicAutomaton
fullIntAbstraction, stateIntAbstraction
-
Methods inherited from interface net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction
getSuccessor
-
Methods inherited from interface net.automatalib.ts.DeterministicTransitionSystem
getSuccessor, getSuccessors, getTransitions, powersetView
-
Methods inherited from interface net.automatalib.automaton.FiniteAlphabetAutomaton
getTransitions, transitionGraphView
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface net.automatalib.automaton.simple.SimpleAutomaton
createDynamicStateMapping, createStaticStateMapping, iterator
-
-
-
-
Constructor Detail
-
AbstractTTTHypothesis
public AbstractTTTHypothesis(net.automatalib.alphabet.Alphabet<I> alphabet)
Constructor.- Parameters:
alphabet
- the input alphabet
-
-
Method Detail
-
getInitialState
public S getInitialState()
-
getTransition
public T getTransition(int stateId, int symIdx)
-
getInternalTransition
public TTTTransition<I,D> getInternalTransition(TTTState<I,D> state, I input)
Retrieves the internal transition (i.e., theTTTTransition
object) for a given state and input. This method is required since theDFA
interface requires the return value ofgetTransition(TTTState, Object)
to refer to the successor state directly.- Parameters:
state
- the source stateinput
- the input symbol triggering the transition- Returns:
- the transition object
-
getInternalTransition
public TTTTransition<I,D> getInternalTransition(TTTState<I,D> state, int input)
-
mapTransition
protected abstract T mapTransition(TTTTransition<I,D> internalTransition)
-
initialize
public S initialize()
Initializes the automaton, adding an initial state. Whether the initial state is accepting needs to be known at this point.- Returns:
- the initial state of this newly initialized automaton
-
isInitialized
public boolean isInitialized()
Checks whether this automaton was initialized (i.e.,initialize()
has been called).- Returns:
true
if this automaton was initialized,false
otherwise.
-
createState
public S createState(TTTTransition<I,D> parent)
-
newState
protected abstract S newState(int alphabetSize, TTTTransition<I,D> parent, int id)
-
getInputAlphabet
public net.automatalib.alphabet.Alphabet<I> getInputAlphabet()
-
graphView
public AbstractTTTHypothesis.GraphView graphView()
-
getIntInitialState
public int getIntInitialState()
- Specified by:
getIntInitialState
in interfacenet.automatalib.automaton.simple.SimpleDeterministicAutomaton.IntAbstraction
-
numInputs
public int numInputs()
- Specified by:
numInputs
in interfacenet.automatalib.automaton.simple.SimpleDeterministicAutomaton.FullIntAbstraction
-
getIntSuccessor
public int getIntSuccessor(T trans)
-
fullIntAbstraction
public net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<T> fullIntAbstraction(net.automatalib.alphabet.Alphabet<I> alphabet)
-
addAlphabetSymbol
public void addAlphabetSymbol(I symbol)
-
getStates
public Collection<S> getStates()
-
size
public int size()
-
getStateId
public int getStateId(S state)
-
getState
public S getState(int id)
-
-