EdgeAnnotatedDFA

trait EdgeAnnotatedDFA[S, T, A, Z <: (EdgeAnnotatedAutomatonStyle)] extends EdgeAnnotatedDFA[S, T, A, Z] with DFA[S, T, Z] with UnindexedEdgeAnnotatedFA[S, T, A, 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 FA[S, T, Z]
trait UnindexedDFA[S, T, Z]
trait UnindexedFA[S, T, Z]
trait EdgeAnnotatedDFA[S, T, A, Z]
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

Value members

Abstract methods

def assembleDFA[S0, T0, A0](stateSeq: IndexedSeq[S0], transitionsSeq: IndexedSeq[T0], initialStateIndex: Int, finalStateIndices: Set[Int], transitionsMatrix: Array[Array[Int]], initialAnnotation: Option[A0], edgeAnnotations: Array[Array[Option[A0]]]): EdgeAnnotatedDFA[S0, T0, A0, Z]
protected

Internal storage for the annotations on labelled edges.

Internal storage for the annotations on labelled edges.

Concrete methods

override
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.

Definition Classes
override
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.

Definition Classes
override
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.

Definition Classes
override
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.

Definition Classes
override
def assembleDFA[S0, T0](stateSeq: IndexedSeq[S0], transitionsSeq: IndexedSeq[T0], initialStateIndex: Int, finalStateIndices: Set[Int], transitionsMatrix: Array[Array[Int]]): EdgeAnnotatedDFA[S0, T0, A, Z]
Definition Classes
override
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.

Definition Classes
override
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.

Definition Classes

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

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

Definition Classes
def map[S2, T2, A2](stateMap: S => S2, transitionMap: T => T2, annMap: A => A2): EdgeAnnotatedDFA[S2, T2, A2, Z]
def mapAnnotations[A2](annMap: A => A2): EdgeAnnotatedDFA[S, T, A2, Z]
override protected
def plotInitialStateMarker(sb: StringBuilder, style: Z[S, T, A], s: S, idx: Int): Unit

Add decorations for an initial state. Overridden in the org.maraist.fa.full.EdgeAnnotatedDFA for showing initial annotations.

Add decorations for an initial state. Overridden in the org.maraist.fa.full.EdgeAnnotatedDFA for showing initial annotations.

Definition Classes
override protected
def prettyHeader: Doc
override protected
Definition Classes

Inherited methods

override
def accepts(string: Seq[T]): Boolean
Definition Classes
Inherited from
DFA
protected
def afterStatePlot(sb: StringBuilder, style: Z[S, T, A], stateList: IndexedSeq[S], stateMap: Map[S, Int]): Unit
Inherited from
UnindexedFA
override
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.

Definition Classes
Inherited from
UnindexedEdgeAnnotatedFA
protected
def assemblePrettyTransition(before: Doc, arrow: Doc, after: Doc): Doc
Inherited from
UnindexedFA
override protected
Definition Classes
Inherited from
FA
def dump(out: PrintStream): Unit
Inherited from
UnindexedFA
override
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.

Definition Classes
Inherited from
UnindexedEdgeAnnotatedFA
override
Definition Classes
Inherited from
UnindexedDFA
protected
def edgeText(style: Z[S, T, A], si0: Int, s0: S, si1: Int, s1: S): String
Inherited from
UnindexedFA
protected
def edgeText(style: Z[S, T, A], si0: Int, s0: S, ti0: Int, t: T, si1: Int, s1: S): String
Inherited from
UnindexedFA

Return the indices of the final states.

Return the indices of the final states.

Inherited from
FA
override
Definition Classes
Inherited from
FA
protected
Inherited from
UnindexedFA
override
def foreachETransition(action: (S, S) => Unit { def apply(s1: S, s2: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedDFA
override
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.

Definition Classes
Inherited from
UnindexedEdgeAnnotatedFA
override
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.

Definition Classes
Inherited from
UnindexedEdgeAnnotatedFA
override
def foreachFinalState(action: S => Unit { def apply(s: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedFA
override
def foreachInitialState(action: S => Unit { def apply(s: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedFA
override
def foreachState(action: S => Unit { def apply(s: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedFA
override
def foreachTransition(action: (S, T, S) => Unit { def apply(s1: S, t: T, s2: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedFA
override
Definition Classes
FA -> FA
Inherited from
FA
override
Definition Classes
FA -> FA
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
protected
def initPlot(sb: StringBuilder, states: Int, labels: Int): Unit
Inherited from
UnindexedFA

Return any annotation associated "before" the initial state.

Return any annotation associated "before" the initial state.

Inherited from
UnindexedEdgeAnnotatedDFA

Returns the index of the initial state.

Returns the index of the initial state.

Inherited from
DFA
override
Definition Classes
DFA -> FA
Inherited from
DFA
protected
def internalsToDOT(stateList: IndexedSeq[S], stateMap: Map[S, Int], theLabels: IndexedSeq[T], sb: StringBuilder)(using style: Z[S, T, A]): Unit

Internal routine used by [[#toDOT]]. Subclesses may override, but still call super.internalsToDOT, to extend the Graphviz representation of a DFA.

Internal routine used by [[#toDOT]]. Subclesses may override, but still call super.internalsToDOT, to extend the Graphviz representation of a DFA.

Inherited from
UnindexedFA
override
Definition Classes
Inherited from
FA
override
Definition Classes
Inherited from
FA
override
def isState(s: S): Boolean
Definition Classes
Inherited from
FA
override
def label(i: Int): T
Definition Classes
FA -> FA
Inherited from
FA
override
Definition Classes
Inherited from
FA
override
def map[S2, T2](stateMap: S => S2, transitionMap: T => T2): DFA[S2, T2, Z]
Definition Classes
Inherited from
DFA
override
def mapStates[S2](stateMap: S => S2): DFA[S2, T, Z]
Definition Classes
Inherited from
DFA
override
def mapTransitions[T2](transitionMap: T => T2): DFA[S, T2, Z]
Definition Classes
Inherited from
DFA
override protected
def plotPresentEdge(sb: StringBuilder, style: Z[S, T, A], stateList: IndexedSeq[S], stateMap: Map[S, Int], si0: Int, s0: S, si1: Int, s1: S): Unit
override protected
def plotPresentEdge(sb: StringBuilder, style: Z[S, T, A], stateList: IndexedSeq[S], stateMap: Map[S, Int], si0: Int, s0: S, ti0: Int, t: T, si1: Int, s1: S): Unit
protected
def plotState(sb: StringBuilder, style: Z[S, T, A], si: Int, s: S, isInitial: Boolean, isFinal: Boolean): Unit
Inherited from
UnindexedFA
protected
def plotTransitions(stateList: IndexedSeq[S], stateMap: Map[S, Int], theLabels: IndexedSeq[T], sb: StringBuilder, style: Z[S, T, A]): Unit
Inherited from
UnindexedFA
def pretty: Doc
Inherited from
UnindexedFA
protected
def prettyETransition(src: S, dest: S): Doc
Inherited from
UnindexedFA
override protected
def prettyETransitionArrow(src: S, dest: S): Doc
protected
def prettyFooter: Doc
Inherited from
UnindexedFA
protected
def prettyState(s: S): Doc
Inherited from
UnindexedFA
override protected
def prettyStateInTransition(state: S): Doc
Definition Classes
Inherited from
FA
override protected
def prettyStateLeader(s: S): Doc
Definition Classes
Inherited from
FA
protected
def prettyStates: Doc
Inherited from
UnindexedFA
protected
def prettyTransition(src: S, label: T, dest: S): Doc
Inherited from
UnindexedFA
override protected
def prettyTransitionArrow(src: S, label: T, dest: S): Doc
override
def size: Int
Definition Classes
Inherited from
FA
override
def state(i: Int): S
Definition Classes
FA -> FA
Inherited from
FA
override
Definition Classes
Inherited from
FA
override
def toDOT(using Z[S, T, A]): String
Definition Classes
FA -> UnindexedFA -> Graphable
Inherited from
FA
override
def transition(s: S, t: T): Option[S]
Definition Classes
Inherited from
DFA
override
def transitionIndex(si: Int, ti: Int): Option[Int]
Definition Classes
DFA -> DFA
Inherited from
DFA
override
Definition Classes
Inherited from
UnindexedFA
override
def transitions(s: S, t: T): Set[S]
Definition Classes
Inherited from
UnindexedDFA

Inherited fields

override
val indexOf: Map[S, Int]
Inherited from
FA
override
Inherited from
DFA
override
Inherited from
DFA
override
Inherited from
FA
protected
Inherited from
FA
protected
Inherited from
DFA
protected
Inherited from
FA