finite_automata – finite automata library

Table of Contents

  1. Introduction

  2. Dependencies

  3. Installation

  4. Usage

  5. Development

1. Introduction

This is a library for describing and visualizing finite automata.

2. Dependencies

3. Installation

Rubygems:

You might need to use sudo.

gem install finite\_automata

Not Rubygems:

  1. 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

Martin Velez

Copyright

Copyright © 2012 Martin Velez

License

GPL

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