Python Finite Automata library
Asked Answered
W

2

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.

Wack answered 13/9, 2011 at 9:19 Comment(1)
Just native "sets" are doing union, intersection, ... :: docs.python.org/library/sets.htmlMessmate
K
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?
Kimes answered 13/9, 2011 at 9:41 Comment(3)
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.Wack
I suggest you add those requirements to your original post, then.Kimes
@Wack Did you find a solution? If not, I would be happy to accept any contributions to python-automata.Perplexity
H
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.

Hygiene answered 2/5, 2012 at 21:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.