v6.0.0
Automata v6 is a major new release with new features and a few breaking changes that keep the library moving forward. Big thanks to @abhinavsinha-adrino and @eliotwrobson for most of these improvements.
New Features
- A new
GNFA
class to represent generalized non-deterministic finite automata (thanks @abhinavsinha-adrino!)- Please see the README for documentation on this new class
- A new
automata.base.regex
module with utilities for working with
automata-style regular expressions; a newNFA.to_regex
method has also been added- Please see the README for documentation on this new module
- A new
NFA.eliminate_lambda
method to return an NFA with lambda/epsilon
transitions removed (#31) - Significant performance optimizations to various DFA methods (thanks
@eliotwrobson!):DFA.from_nfa
DFA.isempty
DFA.isfinite
DFA.__eq__
Breaking Changes
- Added
networkx
as a required dependency, providing substantial performance improvements for certain DFA/NFA methods, and also streamlining the code to improve maintainability - Dropped Python 3.6 support, since it has been end-of-life since December 2021. Python 3.7 is currently the minimum version of Python required by this library.
Bug Fixes
- Fixed a bug with
NFA.kleene_star()
where outgoing transitions for every final state were required (but shouldn't be) - Fixed a bug where the
DFA
union and intersection operations were not returning the correct type if you had subclassed fromDFA