DFA::Simple

DFA::Simple is a Perl module to implement simple Discrete Finite Automata.
Download

DFA::Simple Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Randall Maas
  • Publisher web site:
  • http://search.cpan.org/~randym/DFA-Simple-0.32/Simple.pm

DFA::Simple Tags


DFA::Simple Description

DFA::Simple is a Perl module to implement simple Discrete Finite Automata. DFA::Simple is a Perl module to implement simple Discrete Finite Automata.SYNOPSIS my $Obj = new DFA::Simpleor my $Obj = new DFA::Simple $Transitions;or my $Obj = new DFA::Simple $Actions, $StateRules; $Obj->Actions = ; my $Trans = $LP->Actions; $Obj->StateRules = ; my $StateRules = $LP->StateRules; my $Obj = new DFA::Simple $Actions,;This creates a simple automaton with a finite number of individual states. The short version is that state numbers are just indices into the array.The state basically binds the rest of the machine together:1. There might be something you want done whenever you enter a given state (Transition Table) 2. There might be something you want done whenever you leave a given state (Transition Table) 3. You can go to some states from the current state (Action table) 4. There are tests to decide whether you should go to that new state (Action table) 5. There are conditional tasks you can do while sitting in that new state (Action table)This structure may remind you of the SysV run-level concepts. It is very similar.At run time you don't typically feed any state numbers to the finite machine; you ignore them. Rather your program may read inputs or such. The tests for the state transition would examine this input, or some other variables to decide which new state to go to. Whenever your code has gotten enough input, it would call the Check_For_NextState() method. This method runs through the tests, and carries out the state transitions ("firing the rules"). Requirements: · Perl


DFA::Simple Related Software