Set::FAA Set of Discrete Finite Automata | |
Download |
Set::FA Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Publisher Name:
- Ron Savage
- Publisher web site:
- http://search.cpan.org/~rsavage/
Set::FA Tags
Set::FA Description
A Set of Discrete Finite Automata Set::FA is a Perl module that provides a mechanism to define and run a set of DFAs.Synopsis #!/usr/bin/perl use strict; use warnings; use Set::FA; use Set::FA::Element; # -------------------------- my(@a) = map { Set::FA::Element -> new ( accepting => , id => "a.$_", start => 'ping', transitions => , , , , ], ) } (0 .. 2); my(@b) = map { Set::FA::Element -> new ( accepting => , id => "b.$_", start => 'ping', transitions => , , , , ], ) } (0 .. 4); my($set) = Set::FA -> new(@a, @b); my($sub_a) = $set -> accept('aaabbaaabdogbbbbbababa'); my($sub_b) = $set -> final; print 'Size of $sub_a: ', $sub_a -> size, ' (expect 3). ', 'Size of @a: ', scalar @a, ' (expect 3). ', 'Size of $sub_b: ', $sub_b -> size, ' (expect 5). ', 'Size of @b: ', scalar @b, ' (expect 5). ', "\n", Requirements: · Perl
Set::FA Related Software