EdgeAnnotatedDFA

trait EdgeAnnotatedDFA[S, T, A, -Z <: (EdgeAnnotatedAutomatonStyle)] extends EdgeAnnotatedFA[S, T, A, Z] with UnindexedEdgeAnnotatedDFA[S, T, A, Z] with DFA[S, T, Z]

Implementation of a edge-annotated DFA.

Type Params
S

The type of all states of the automaton

T

The type of labels on (non-epsilon) transitions of the automaton

Value Params
finalStateIndices

Set of the indices of the final states of the automaton

initialStateIndex

Index of the initial state of the automaton.

trait DFA[S, T, Z]
trait UnindexedDFA[S, T, Z]
trait EdgeAnnotatedFA[S, T, A, Z]
trait FA[S, T, Z]
trait UnindexedFA[S, T, Z]
trait Pretty
trait Graphable[S, T, Z]
class Object
trait Matchable
class Any
trait EdgeAnnotatedDFA[S, T, A, Z]

Value members

Abstract methods

def annotationIndex(srcIdx: Int, labelIdx: Int): Option[A]

Return the annotation (if any) on the transition from the state at index srcIdx with the label with index labelIdx.

Return the annotation (if any) on the transition from the state at index srcIdx with the label with index labelIdx.

Inherited methods

def accepts(string: Seq[T]): Boolean

Returns true if this automaton accepts the given string.

Returns true if this automaton accepts the given string.

Inherited from
UnindexedFA
def annotated(src: S, label: T, dest: S): Boolean

Check whether there is an annotation on the transition from src to dest labelled label.

Check whether there is an annotation on the transition from src to dest labelled label.

Inherited from
UnindexedEdgeAnnotatedFA
def annotation(src: S, label: T): Option[A]

Return the annotation (if any) on the transition from the given state and with the given label.

Return the annotation (if any) on the transition from the given state and with the given label.

Inherited from
UnindexedEdgeAnnotatedDFA
def annotation(src: S, label: T, dest: S): Option[A]

Return the annotation (if any) on the transition from src to dest labelled label.

Return the annotation (if any) on the transition from src to dest labelled label.

Inherited from
UnindexedEdgeAnnotatedFA
def annotationIndex(srcIdx: Int, labelIdx: Int, destIdx: Int): Option[A]

Return the annotation (if any) on the transition from the state at index srcIdx to the state at index destIdx via the label with index labelIdx.

Return the annotation (if any) on the transition from the state at index srcIdx to the state at index destIdx via the label with index labelIdx.

Inherited from
EdgeAnnotatedFA
def eAnnotated(src: S, dest: S): Boolean

Check whether there is an annotation on the unlabeled transition from src to dest. For automata without e-transitions, this method will always return false.

Check whether there is an annotation on the unlabeled transition from src to dest. For automata without e-transitions, this method will always return false.

Inherited from
UnindexedEdgeAnnotatedFA
def eAnnotation(src: S, dest: S): Option[A]

Return the annotation (if any) on the e-transition from src to dest. For automata without e-transitions, this method will always return None.

Return the annotation (if any) on the e-transition from src to dest. For automata without e-transitions, this method will always return None.

Inherited from
UnindexedEdgeAnnotatedFA
def eAnnotationIndex(srcIdx: Int, destIdx: Int): Option[A]

Return the annotation (if any) on the unlabelled transition from the state at index srcIdx to the state with index destIdx.

Return the annotation (if any) on the unlabelled transition from the state at index srcIdx to the state with index destIdx.

Inherited from
EdgeAnnotatedFA

Return the pairs comprising all unlabelled transitions.

Return the pairs comprising all unlabelled transitions.

Inherited from
UnindexedFA

Return the indices of the final states.

Return the indices of the final states.

Inherited from
FA

Returns the Set of final states in this automaton.

Returns the Set of final states in this automaton.

Inherited from
UnindexedFA
def foreachETransition(action: (S, S) => Unit { def apply(s1: S, s2: S): Unit; }): Unit

Perform some action for each epsilon transition in the automaton. Note that in many (deterministic) automata, this method is a no-op, but in included for an easy consistency.

Perform some action for each epsilon transition in the automaton. Note that in many (deterministic) automata, this method is a no-op, but in included for an easy consistency.

Inherited from
UnindexedFA
def foreachEdgeAnnotation(action: (S, S, A) => Any): Unit

Perform an action for every annotated unlabelled edge in this automaton.

Perform an action for every annotated unlabelled edge in this automaton.

Inherited from
UnindexedEdgeAnnotatedFA
def foreachEdgeAnnotation(action: (S, T, S, A) => Any): Unit

Perform an action for every annotated labelled edge in this automaton.

Perform an action for every annotated labelled edge in this automaton.

Inherited from
UnindexedEdgeAnnotatedFA
def foreachFinalState(action: S => Unit { def apply(s: S): Unit; }): Unit

Perform some action for each final state in the automaton.

Perform some action for each final state in the automaton.

Inherited from
UnindexedFA
def foreachInitialState(action: S => Unit { def apply(s: S): Unit; }): Unit

Perform some action for each initial state in the automaton.

Perform some action for each initial state in the automaton.

Inherited from
UnindexedFA
def foreachState(action: S => Unit { def apply(s: S): Unit; }): Unit

Perform some action for each state in the automaton.

Perform some action for each state in the automaton.

Inherited from
UnindexedFA
def foreachTransition(action: (S, T, S) => Unit { def apply(s1: S, t: T, s2: S): Unit; }): Unit

Perform some action for each transition in the automaton.

Perform some action for each transition in the automaton.

Inherited from
UnindexedFA

Return the index of a state, or None.

Return the index of a state, or None.

Inherited from
FA

Return the index of a label, or None.

Return the index of a label, or None.

Inherited from
FA
def graphviz(sourceFile: String, outputFile: String)(using options: Z[S, T, A]): Unit

Use Graphviz to render this object as specified.

Use Graphviz to render this object as specified.

Inherited from
Graphable
def graphviz(fileRoot: String)(using options: Z[S, T, A]): Unit

Use Graphviz to render this object (in the default format) to the given file.

Use Graphviz to render this object (in the default format) to the given file.

Inherited from
Graphable
def indexOf: Map[S, Int]

Return the index of a state. Since this is a Map, a call on a value which is not a state will throw an exception; use getIndexOf for a safe version.

Return the index of a state. Since this is a Map, a call on a value which is not a state will throw an exception; use getIndexOf for a safe version.

Inherited from
FA

Return whether there is an annotation associated "before" the initial state.

Return whether there is an annotation associated "before" the initial state.

Inherited from
UnindexedEdgeAnnotatedDFA

Return any annotation associated "before" the initial state.

Return any annotation associated "before" the initial state.

Inherited from
UnindexedEdgeAnnotatedDFA

Returns the initial state.

Returns the initial state.

Inherited from
UnindexedDFA

Returns the index of the initial state.

Returns the index of the initial state.

Inherited from
DFA

Return the indices of the initial states.

Return the indices of the initial states.

Inherited from
FA

Returns the Set of initial states in this automaton.

Returns the Set of initial states in this automaton.

Inherited from
UnindexedFA

Returns whether the given state s is final in this automaton.

Returns whether the given state s is final in this automaton.

Inherited from
UnindexedFA

Returns whether the given state s is initial in this automaton.

Returns whether the given state s is initial in this automaton.

Inherited from
UnindexedFA
def isState(s: S): Boolean

Returns true if s is used as a state

Returns true if s is used as a state

Inherited from
UnindexedFA
def label(i: Int): T

Label at a particular index.

Label at a particular index.

Inherited from
FA

Index of a particular label. Since this is a Map, a call on a value which is not a label will throw an exception; use getIndexOf for a safe version.

Index of a particular label. Since this is a Map, a call on a value which is not a label will throw an exception; use getIndexOf for a safe version.

Inherited from
FA
override
Definition Classes
Inherited from
FA
def map[S2, T2](stateMap: S => S2, transitionMap: T => T2): UnindexedFA[S2, T2, Z]

Derive a new isomorphic automaton from this one by applying transforms to the states and transitions. This method does not check that either map is injective: if they are not, then the result may be unpredictable.

Derive a new isomorphic automaton from this one by applying transforms to the states and transitions. This method does not check that either map is injective: if they are not, then the result may be unpredictable.

Inherited from
UnindexedFA
def mapStates[S2](stateMap: S => S2): UnindexedFA[S2, T, Z]

Derive a new isomorphic automaton from this one by applying transforms to the states. This method does not check that the stateMap is injective: if it is not, then the result may have separate states which cannot be distinguished.

Derive a new isomorphic automaton from this one by applying transforms to the states. This method does not check that the stateMap is injective: if it is not, then the result may have separate states which cannot be distinguished.

Inherited from
UnindexedFA
def mapTransitions[T2](transitionMap: T => T2): UnindexedFA[S, T2, Z]

Derive a new isomorphic automaton from this one by applying transforms to the transitions. This method does not check that the transitionMap is injective: if it is not, then the result may have separate transitions which cannot be distinguished.

Derive a new isomorphic automaton from this one by applying transforms to the transitions. This method does not check that the transitionMap is injective: if it is not, then the result may have separate transitions which cannot be distinguished.

Inherited from
UnindexedFA
def pretty: Doc
Inherited from
Pretty
def size: Int

Number of states in the automaton

Number of states in the automaton

Inherited from
UnindexedFA
def state(i: Int): S

Return the state at a particular index.

Return the state at a particular index.

Inherited from
FA
override
Definition Classes
Inherited from
FA
def toDOT(using graphvizOptions: Z[S, T, A]): String

Return the inner lines of a digraph block (or other Graphviz style) to render this object.

Return the inner lines of a digraph block (or other Graphviz style) to render this object.

Inherited from
Graphable
def transition(s: S, t: T): Option[S]

Returns the state, if any, into which the automaton could transition starting from s via a transition labelled t.

Returns the state, if any, into which the automaton could transition starting from s via a transition labelled t.

Inherited from
UnindexedDFA
def transitionIndex(si: Int, ti: Int): Option[Int]

Returns the index of the state, if any, which is the target of a transition from the state numbered si via the transition numbered ti

Returns the index of the state, if any, which is the target of a transition from the state numbered si via the transition numbered ti

Inherited from
DFA

Return the triples comprising all labelled transitions.

Return the triples comprising all labelled transitions.

Inherited from
UnindexedFA
def transitions(s: S, t: T): Set[S]

Returns the (possibly empty, and in deterministic implementations at most singleton) set of states into which the automaton could transition starting from s via a transition labelled t.

Returns the (possibly empty, and in deterministic implementations at most singleton) set of states into which the automaton could transition starting from s via a transition labelled t.

Inherited from
UnindexedFA