previousnext
ASTL homeSTL home

Deterministic Finite Automaton

Description

This type of automaton adds some retrictions. First, you can only have one initial state. Second, from a given state and by a given letter, you can only reach one state.
A DFA example:
click to see the code...

Model of

automaton

Exported types

Those are exactly the same as defined in automaton.

public members

Those have been defined in automaton, they are reprinted here with their exacts arguments and return types for DFA
name return and arguments description
null_state State ...
begin const_iterator () return an iterator on the first state of the automaton
end const_iterator () return a past the end iterator on the automaton
new_state State () return a handler on a freshly allocated state
new_state T (unsigned long n, T x) With T being an output iterator, return x with n handlers on newly allocated states
del_state void (State) remove the corresponding referenced state
copy_state void (State from, State to) overwrite state from with state to
duplicate_state State (State q) copies q into a newly allocated State
(as would copy_state(q, new_state()))
state_count unsigned long () returns current number of states
set_trans void (State s, const Alphabet& l, State aim) adds a transition between states s and aim, labelled by l
del_trans void (State s, const Alphabet& l) removes the transition by l from state s
change_trans void (State s, const Alphabet& l, State new_aim) ensures that the transition of s labelled by l now leads to new_aim
delta1 State (State s, const Alphabet& l) returns the state reachable from s by l
delta2 Edges (State s) returns the set of all outgoing transitions of s
trans_count unsigned long returns the current number of outgoing transitions
initial void (State s) set s as an initial state
initial State () returns the initial state, null_state if undefined
final bool (State s) returns the finality of the state referenced by s
final set_F::reference (State s) return a reference on the finality of s
tag Tag& (State s) returns a reference on the tag of state s

DFA implementations


DFA extension