7

What would be the most complete finite automata library for Python, which is able to do the basic manipulations such as:

  • Minimization,
  • Determinization of Nondeterministic Finite automata
  • Union, Intersection, and Product of the languages generated by these automata, etc.

All the libraries that I'm finding are either incomplete or do not work plug-and-play-wise.

Michael Foukarakis
  • 39,737
  • 6
  • 87
  • 123
asker
  • 71
  • 1
  • 3
  • Just native "sets" are doing union, intersection, ... :: http://docs.python.org/library/sets.html – Louis Sep 13 '11 at 09:21

2 Answers2

3

python-automata seems to be able to do all the things you're asking.

  • What is it missing?
  • Perhaps you'd want to contribute a missing feature yourself?
Michael Foukarakis
  • 39,737
  • 6
  • 87
  • 123
  • 1
    Missing a representation of nondeterministic finite automata, and a function to transform such NFA into a DFA. Its also missing a function to make homomorphisms: map an alphabet Sigma into a alphabet Sigma'. I would contribute myself if I am sure that there is no other library doing that already. Since all these operations are standard I believe somebody has already written such a library. – asker Sep 13 '11 at 09:52
  • I suggest you add those requirements to your original post, then. – Michael Foukarakis Sep 13 '11 at 09:56
  • @asker Did you find a solution? If not, I would be happy to accept any contributions to python-automata. – Andrew B. Feb 10 '12 at 20:55
1

If you don't mind using a underlying C++ library you could try OpenFst with these Python bindings. PyFsa has the optimization algoritms you listed.

Paul Dixon
  • 4,201
  • 7
  • 28
  • 27