Package owl.automaton
Class AbstractImmutableAutomaton<S,A extends OmegaAcceptance>
- java.lang.Object
-
- owl.automaton.AbstractImmutableAutomaton<S,A>
-
- All Implemented Interfaces:
Automaton<S,A>
- Direct Known Subclasses:
AbstractImmutableAutomaton.NonDeterministicEdgeMapAutomaton
,AbstractImmutableAutomaton.NonDeterministicEdgesAutomaton
,AbstractImmutableAutomaton.NonDeterministicEdgeTreeAutomaton
,AbstractImmutableAutomaton.SemiDeterministicEdgesAutomaton
,EmptyAutomaton
,SingletonAutomaton
public abstract class AbstractImmutableAutomaton<S,A extends OmegaAcceptance> extends Object implements Automaton<S,A>
This abstract class implements storage and retrieval of commonly fixed values, and overrides the default implementations forAutomaton.states()
,Automaton.accept(Visitor)
in order to cache the set of reachable states for later use. Subclassing classes are excepted to implement an immutable automaton and to posses a fixed transition relation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractImmutableAutomaton.NonDeterministicEdgeMapAutomaton<S,A extends OmegaAcceptance>
This class provides a skeleton implementation to create a non-deterministic on-the-fly constructed automaton that usesValuationSet
as the main representation of the transition relation.static class
AbstractImmutableAutomaton.NonDeterministicEdgesAutomaton<S,A extends OmegaAcceptance>
This class provides a skeleton implementation to create a non-deterministic on-the-fly constructed automaton.static class
AbstractImmutableAutomaton.NonDeterministicEdgeTreeAutomaton<S,A extends OmegaAcceptance>
This class provides a skeleton implementation to create a non-deterministic on-the-fly constructed automaton that usesValuationTree
as the main representation of the transition relation.static class
AbstractImmutableAutomaton.SemiDeterministicEdgesAutomaton<S,A extends OmegaAcceptance>
This class provides a skeleton implementation to create a semi-deterministic on-the-fly constructed automaton.-
Nested classes/interfaces inherited from interface owl.automaton.Automaton
Automaton.EdgeMapVisitor<S>, Automaton.EdgeTreeVisitor<S>, Automaton.EdgeVisitor<S>, Automaton.PreferredEdgeAccess, Automaton.Property, Automaton.Visitor<S>
-
-
Field Summary
Fields Modifier and Type Field Description protected A
acceptance
protected ValuationSetFactory
factory
protected Set<S>
initialStates
-
Constructor Summary
Constructors Constructor Description AbstractImmutableAutomaton(ValuationSetFactory factory, Set<S> initialStates, A acceptance)
Constructor which fixes alphabet, initial states, and acceptance condition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Automaton.EdgeMapVisitor<S> visitor)
void
accept(Automaton.EdgeTreeVisitor<S> visitor)
void
accept(Automaton.EdgeVisitor<S> visitor)
A
acceptance()
Returns the acceptance condition of this automaton.protected Set<S>
cache()
ValuationSetFactory
factory()
Returns the backing engine for the symbolic representation of edges.Set<S>
initialStates()
Returns the set of initial states, which can potentially be empty.S
onlyInitialState()
Returns the initial state.Set<S>
states()
The set of all from the initial states reachable states in this automaton.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface owl.automaton.Automaton
accept, edge, edgeMap, edges, edges, edgeTree, is, name, predecessors, preferredEdgeAccess, size, successor, successors, successors
-
-
-
-
Field Detail
-
acceptance
protected final A extends OmegaAcceptance acceptance
-
factory
protected final ValuationSetFactory factory
-
-
Constructor Detail
-
AbstractImmutableAutomaton
public AbstractImmutableAutomaton(ValuationSetFactory factory, Set<S> initialStates, A acceptance)
Constructor which fixes alphabet, initial states, and acceptance condition. The transition relation is given by subclassing and overriding suitable methods.- Parameters:
factory
- The alphabet.initialStates
- The initial states.acceptance
- The acceptance condition.
-
-
Method Detail
-
acceptance
public final A acceptance()
Description copied from interface:Automaton
Returns the acceptance condition of this automaton.- Specified by:
acceptance
in interfaceAutomaton<S,A extends OmegaAcceptance>
- Returns:
- The acceptance.
-
factory
public final ValuationSetFactory factory()
Description copied from interface:Automaton
Returns the backing engine for the symbolic representation of edges. Only this engine might be used for the access to edges.- Specified by:
factory
in interfaceAutomaton<S,A extends OmegaAcceptance>
- Returns:
- The symbolic engine used to generate ValuationSets.
-
onlyInitialState
public final S onlyInitialState()
Description copied from interface:Automaton
Returns the initial state. Throws anNoSuchElementException
if there is no andIllegalStateException
if there are multiple initial states.- Specified by:
onlyInitialState
in interfaceAutomaton<S,A extends OmegaAcceptance>
- Returns:
- The unique initial state.
- See Also:
Automaton.initialStates()
-
initialStates
public final Set<S> initialStates()
Description copied from interface:Automaton
Returns the set of initial states, which can potentially be empty.- Specified by:
initialStates
in interfaceAutomaton<S,A extends OmegaAcceptance>
- Returns:
- The set of initial states.
-
states
public final Set<S> states()
Description copied from interface:Automaton
The set of all from the initial states reachable states in this automaton.- Specified by:
states
in interfaceAutomaton<S,A extends OmegaAcceptance>
- Returns:
- All reachable states
-
accept
public final void accept(Automaton.EdgeVisitor<S> visitor)
- Specified by:
accept
in interfaceAutomaton<S,A extends OmegaAcceptance>
-
accept
public final void accept(Automaton.EdgeMapVisitor<S> visitor)
- Specified by:
accept
in interfaceAutomaton<S,A extends OmegaAcceptance>
-
accept
public final void accept(Automaton.EdgeTreeVisitor<S> visitor)
- Specified by:
accept
in interfaceAutomaton<S,A extends OmegaAcceptance>
-
-