finite_automata – finite automata library
Table of Contents
-
Introduction
-
Dependencies
-
Installation
-
Usage
-
Development
1. Introduction
This is a library for describing and visualizing finite automata.
2. Dependencies
-
Ruby 1.9.2 or greater
3. Installation
Rubygems:
You might need to use sudo.
gem install finite\_automata
Not Rubygems:
-
Download finite_automata
4. Usage
Example 1
This example is found in the examples directory.
#!/usr/bin/env ruby
require 'finite_automata'
dfa = DFA.new
dfa.states = [:q1,:q2,:q3]
dfa.alphabet = [0,1]
dfa.state_transitions = {:q1 => {0 => :q1, 1 => :q2},
:q2 => {0 => :q3, 1 => :q2},
:q3 => {0 => :q2, 1 => :q2} }
dfa.start_state = :q1
dfa.accepting_states = [:q2]
5. Development
- Author
- Copyright
-
Copyright © 2012 Martin Velez
- License
Source
Bitbucket is hosting this code.
http://bitbucket.org/martinvelez/finite_automata/src
Issues and Bug Reports
Provide feedback, get help, request features, and reports bugs here:
https://bitbucket.org/martinvelez/finite_automata/issues?status=new?status=open