FLAT::DFA - Deterministic finite automata
A FLAT::DFA object is a finite automata whose transitions are labeled with single characters. Furthermore, each state has exactly one outgoing transition for each available label/character.
In addition to implementing the interface specified in FLAT and FLAT::NFA, FLAT::DFA objects provide the following DFA-specific methods:
Because a DFA, by definition, must have only ONE starting state, this allows one to unset the current start state so that a new one may be set.
This method returns a FLAT::DFA (though in theory an NFA) that is lacking a transition for all symbols from all states. This method eliminates all transitions from all states that lead to a sink state; it also eliminates the sink state.
This has no affect on testing if a string is valid using FLAT::DFA::is_valid_string, discussed below.
FLAT::DFA::is_valid_string
This method minimizes the number of states and transitions in the given DFA. The modifies the current/calling DFA object.
This method tests if the given string is accepted by the DFA.
FLAT is written by Mike Rosulek <mike at mikero dot com> and B. Estarde <estradb at gmail dot com>.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install FLAT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FLAT
CPAN shell
perl -MCPAN -e shell install FLAT
For more information on module installation, please visit the detailed CPAN module installation guide.