Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    DFA::Kleene 1.0

    Download button

    No screenshots available
    Downloads: 403  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Steffen Beyer | More programs
    Perl Artistic License / FREE
    May 17th, 2007, 08:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    DFA::Kleene description

    DFA::Kleene is a Kleene's Algorithm for Deterministic Finite Automata.

    DFA::Kleene is a Kleene's Algorithm for Deterministic Finite Automata.

    Calculates the "language" (set of words) accepted (= recognized) by a Deterministic Finite Automaton.

    SYNOPSIS

    use DFA::Kleene qw(initialize define_accepting_states define_delta kleene example);

    use DFA::Kleene qw(:all);

    &initialize(6,"ab");

    Define the number of states (state #1 is the "start" state!) of your Deterministic Finite Automaton and the alphabet used (as a string containing all characters which are part of the alphabet).

    &define_accepting_states(2,3,4,5);

    Define which states are "accepting states" in your Deterministic Finite Automaton (list of state numbers).

    &define_delta(1,'a',4);

    Define the state transition function "delta" (arguments are: "from" state, character (or empty string!) read during the transition, "to" state).
    You need several calls to this function in order to build a complete transition table describing your Deterministic Finite Automaton.

    @language = &kleene();

    Returns a (sorted) list of regular expressions describing the language (= set of patterns) recognized ("accepted") by your Deterministic Finite Automaton.
    &example();

    Calculates the language of a sample Deterministic Finite Automaton.
    Prints a (sorted) list of regular expressions which should be equivalent to the following regular expression:

    (a(a)*b)*a(a)*(b)*

    This is the same as

    ((a+)b)*(a+)b*

    The routines in this module allow you to define a Deterministic Finite Automaton and to compute the "language" (set of "words" or "patterns") accepted (= recognized) by it.

    Actually, a list of regular expressions is generated which describe the same language (set of patterns) as the one accepted by your Deterministic Finite Automaton.

    The output generated by this module can easily be modified to produce Perl-style regular expressions which can actually be used to recognize words (= patterns) contained in the language defined by your Deterministic Finite Automaton.

    Other modules in this series (variants of Kleene's algorithm):

    Math::MatrixBool (see "Kleene()")
    Math::MatrixReal (see "kleene()")

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Kleene Algorithm | Finite Automata | Perl module | DFA::Kleene | Kleene | Algorithm

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM