Recent Releases of automata

automata - v9.1.2

  • Fixed a bug with v9.1.0 and v9.1.1 where type information was not exposed

Scientific Software - Peer-reviewed - Python
Published by caleb531 6 months ago

automata - v9.1.1

  • Fixes a regression with v9.1.0 where subpackages where missing on install

Scientific Software - Peer-reviewed - Python
Published by caleb531 6 months ago

automata - v9.1.0

New Features

  • Added manim as an optional dependency along with functions for generating animations of DFAs and NFAs reading strings (https://github.com/caleb531/automata/pull/252)
  • Added an example jupyter notebook for DFAs (https://github.com/caleb531/automata/pull/234)
  • Various improvements to the build tools and configuration; please see the Contributing guide for details on how to migrate (https://github.com/caleb531/automata/pull/260, https://github.com/caleb531/automata/pull/254, https://github.com/caleb531/automata/issues/253, https://github.com/caleb531/automata/pull/254, https://github.com/caleb531/automata/issues/262)

Bugfixes

  • Fix warnings on build commands (https://github.com/caleb531/automata/issues/255)
  • Fix a bug where converted partial DFAs were not always equivalent (https://github.com/caleb531/automata/issues/257)
  • Make the results of the to_regex method deterministic (https://github.com/caleb531/automata/issues/231)

Scientific Software - Peer-reviewed - Python
Published by eliotwrobson 6 months ago

automata - v9.0.0

Breaking Changes

  • Python 3.8 support has been dropped. Please upgrade to Python 3.9 or later to use Automata v9. (#243)

New Features

  • All Unicode characters are now supported in regular expressions (#233)
  • Simplified developer dependencies by migrating from black/flake8/isort to Ruff (#243)

Bugfixes

  • Fixed bug in MNTM.read_input_as_ntm() (#239)

Scientific Software - Peer-reviewed - Python
Published by eliotwrobson 11 months ago

automata - v8.4.0

A minor release with updates from the recently-completed pyOpenSci review:
https://github.com/pyOpenSci/software-submission/issues/152

New Features

  • Added length limits to the successor family of functions

Fixes

  • Fixed addition of unreachable states for some cases in the creation of partial DFAs, and made behavior more consistent (#228)
  • Fixed bug in edge case for minify (#218)

Documentation

  • Added documentation making the library easier to use for new users, with more detailed examples

Scientific Software - Peer-reviewed - Python
Published by eliotwrobson over 1 year ago

automata - v8.3.0

Notable Changes

  • Added a new DFA.from_substrings method using the Aho-Corasick algorithm (#167)
  • Fixed support for Python 3.12
  • The contributing guide has been reworked with clearer information on how you can contribute to the Automata library!

Miscellaneous

  • Various minor bugfixes in the codebase
  • Updated dev dependencies to latest (non-breaking) versions
  • Fixed the performance of DFA.maximum_word_length (#202 and #205)

Scientific Software - Peer-reviewed - Python
Published by caleb531 almost 2 years ago

automata - v8.2.0

New Features

  • Added a show_diagram method for Push Down Automata (#177)

New Documentation Site!

  • The Automata documentation has moved to a brand new documentation website with better navigation and a new search capability that should greatly improve the experience. Check it out at https://caleb531.github.io/automata/

Fixes

  • Fixed the handling of the quantifier pattern in regular expressions by switching from greedy matching (*) to lazy matching (*?) (#181)

Scientific Software - Peer-reviewed - Python
Published by caleb531 almost 2 years ago

automata - v8.1.0

New Features

  • Added an optional minify step (default-enabled) to the DFA.to_partial() method

Announcements

  • We are currently in the process of submitting the Automata project to the Journal of Open Source Software (JOSS), which will introduce the project to a broader community of research using open source software
    • Please see here for the status of the approval process
    • You can read the full paper itself here

Scientific Software - Peer-reviewed - Python
Published by caleb531 about 2 years ago

automata - v8.0.0

Automata v8 is a performance and polish-focused release, providing improvements under the hood that should improve the quality of life for most package users.

Huge thanks to @khoda81, and @EduardoGoulart1 for the new features in this release!

New Features

Jupyter Notebook Integration (#129)

All finite automata (subclasses of the FA class) now have native support for diagram creation in Jupyter notebooks! This is enabled by installing the optional visual dependency, which includes the pygraphviz and coloraide dependencies used in the show_diagram() methods for DFAs/NFAs. The styling for the diagrams has been changed from previous releases and is modeled after the diagrams used in the visual automata package.

The show_diagram() now returns an AGraph corresponding to the given FA, and the FA will render a diagram automatically inside of a Juyter notebook. See the FA documentation for more details.

Type Hints (#131)

Type annotations have been added to the library, providing greater information when using code completion tools like Pylance. This also makes it easier to type-check application code using the library.

Better Partial DFA Support (#147)

Methods in the DFA class now have greater support for partial DFAs (ones with some missing transitions), including support for more efficient binary operations with partial DFAs. Partial DFAs have smaller description complexity, and thus some algorithms are more efficient when operating on them.

In addition, the from_prefix, from_finite_language, and from_nfa DFA creation functions now return partial DFAs by default. The new to_partial and to_complete methods can be used to convert a DFA into an equivalent partial or complete DFA respectively.

python my_dfa.to_partial() # get equivalent partial DFA my_dfa.to_complete() # get equivalent partial DFA

Please see the DFA documentation for the full details on these new methods (outlined below).

Smaller Changes

Regex Changes

  • Quantifiers were added to the regular expression parsing, representing the repetition of the preceding expression. For example, the regex a{1,2} would match a between 1 and 2 times (#121).
  • A pair of parenthesis () can now be used to represent the empty string (#136).
  • The default set of input symbols for NFA.from_regex was changed to all ascii letters and digits (#121).
  • State names of NFAs constructed from regexes no longer persist between runs of the regex engine (#130).

Pickling Support (#125)

All automata now natively support pickling.

Examples (#146)

A section has been added to the documentation demonstrating example uses of the package, can be found here.

Breaking Changes

Dependency Changes

Python 3.7 support has been dropped. Please upgrade to Python 3.8 or later to use Automata v8.

Diagrams are no longer being generated using pydot; this dependency has been dropped in favor of using the visual optional dependency, which will install pygraphviz and coloraide used for generating figures. You should install this optional dependency if you wish to generate figures. This change was to allow for native support for displaying finite automaton in Jupyter notebooks. The style of the diagrams has been lifted from the visual automata package, so you should take a look at the diagrams generated and see if they are still satisfactory.

Other new dependencies have been added, but these will be installed automatically along with v8 of the package.

Greater Support for Partial DFAs

There is now greater support for partial DFAs, which included changing the DFA.from_nfa() function to return a partial DFA instead of a complete one. To obtain a complete DFA, you must now call DFA.from_nfa().to_complete(trap_state_name), where trap_state_name will be used as the name for a trap state if one needs to be added.

Type Hints

Type hints have now been added, meaning that code which previously called functions with incorrect types may not have been flagged. See output from your typechecker for more information.

NFA.from_regex default input symbols

The default set of input symbols for NFA.from_regex was changed to all ASCII letters and digits. If needing to use a specific set of input symbols, use the input_symbols parameter.

Scientific Software - Peer-reviewed - Python
Published by eliotwrobson over 2 years ago

automata - v7.1.0

  • Added new enable_mutable_automata global configuration option if you need to maximize the performance of automaton creation
  • Optimizations to automaton creation even if you leave immutable automata enabled
  • Added a new Shuffle operator (denoted with the caret symbol ^) for regular expressions (e.g. a^b represents all permutations of a and b) (#112)
  • Fixed a bug with the conversion from GNFA to regular expression (#122 and #123)
  • Minor improvements to the error messaging for the automata.regex.parser module
  • Other small optimizations and improvements

Scientific Software - Peer-reviewed - Python
Published by caleb531 almost 3 years ago

automata - v7.0.1

  • Minor style/performance improvements to GNFA class
  • Corrections to documentation
    • DFA.cardinality() actually raises an InfiniteLanguageException for infinite languages, rather than returning float('inf')
    • DFA.maximum_word_length() actually returns None for infinite languages, rather than returning float('inf')
    • Added missing documentation for EmptyLanguageException

Scientific Software - Peer-reviewed - Python
Published by caleb531 about 3 years ago

automata - v7.0.0

Automata v7 is a packed release, introducing immutable automata instances, new DFA/NFA operations, and performance optimizations across the board to make automaton machines easier to construct, validate, and work with. The documentation has also been reorganized to make browsing much easier.

Huge thanks to @eliotwrobson and @Tagl for their massive code contributions to this release, as well as their feedback on v7's development!

New Features

Immutability

All Automaton instances are now fully immutable to protect against common pitfalls, such as mutating an automaton to an invalid state after it's already been validated.

This means that if you wish to make a change to an automaton instance, you must retrieve its attributes as a dictionary (using the new input_parameters property), make your desired change, then pass those parameters to the relevant constructor. For example:

```python from automata.fa.dfa import DFA

dfa1 = DFA( states={'q0', 'q1', 'q2'}, inputsymbols={'0', '1'}, transitions={ 'q0': {'0': 'q0', '1': 'q1'}, 'q1': {'0': 'q0', '1': 'q2'}, 'q2': {'0': 'q2', '1': 'q1'} }, initialstate='q0', final_states={'q1'} )

You can still copy an automaton just fine

dfa2 = dfa.copy()

If you want to make a change, you must create a new instance; please note

that dfa2.input_parameters is always a deep copy of the input parameters for

dfa2 (in other words, mutating dfa2.input_parameters will not actually mutate

dfa2)

params = dfa2.inputparameters params['finalstates'] = {'q2'} dfa3 = DFA(**params) ```

DFA and NFA Equivalence via ==

You can now use == to check if two DFA accept the same language. You can also use == to check if two NFA instances accept the same language.

python dfa1 == dfa2

python nfa1 == nfa2

New DFA Methods

DFAs now include more methods for working with accepted languages. For example, the library can now build you a DFA from a language represented by any sequence of strings. Similarly, you can now iterate over a DFA, which will yield a string accepted by that DFA at each iteration.

python len(my_dfa) # get the cardinality of a DFA for word in my_dfa: # loop over every string accepted by the DFA print(word)

Please see the DFA documentation for the full details on these new methods (outlined below).

Click to expand new DFA methods
#### DFA.from_finite_language(cls, input_symbols, language) Constructs the minimal DFA corresponding to the given finite language and input symbols. ```python DFA.from_finite_language( language={'aa', 'aaa', 'aaba', 'aabbb', 'abaa', 'ababb', 'abbab', 'baa', 'babb', 'bbaa', 'bbabb', 'bbbab'}, input_symbols={'a', 'b'}) ``` #### DFA.complement(self, retain_names=False, minify=True) Returns a new DFA which accepts all input rejected by the DFA on which `complement()` is called. ```python minimal_complement_dfa = ~dfa complement_dfa = dfa.complement(minify=False) ``` #### DFA.predecessor(self, input_str, strict=True, key=None) Returns the first string accepted by the DFA that comes before the input string in lexicographical order. ```python prev_word = dfa.predecessor('0110') same_word = dfa.predecessor(prev_word, strict=False) ``` #### DFA.predecessors(self, input_str, strict=True, key=None) Generates all strings that come before the input string in lexicographical order. ```python # Generates all strings in a language in lexographical order for word in dfa.predecessors(None): print(word) ``` #### DFA.successor(self, input_str, strict=True, key=None) Returns the first string accepted by the DFA that comes after the input string in lexicographical order. ```python next_word = dfa.successor('0110') same_word = dfa.predecessor(next_word, strict=False) ``` #### DFA.successors(self, input_str, strict=True, key=None, reverse=False) Generates all strings that come after the input string in lexicographical order ```python # Generates all strings in a language in lexographical order for word in dfa.successors(None): print(word) ``` #### DFA.minimum_word_length(self) Returns the length of the shortest word in the language represented by the DFA. ```python dfa.minimum_word_length() ``` #### DFA.maximum_word_length(self) Returns the length of the longest word in the language represented by the DFA. In the case of infinite languages, `float('inf')` is returned. ```python dfa.maximum_word_length() ``` #### DFA.count_words_of_length(self, k) Counts words of length `k` accepted by the DFA. ```python dfa.count_words_of_length(3) ``` #### DFA.words_of_length(self, k) Generates words of length `k` accepted by the DFA. ```python for word in dfa.words_of_length(3): print(word) ``` You can also iterate through all words accepted by the DFA. Be aware that the generator may be infinite. ```python for word in dfa: if len(word) > 10: break print(word) ``` #### DFA.cardinality(self) Returns the cardinality of the language represented by the DFA. Note that `len(dfa)` raises a `ValueError` for infinite languages, whereas `DFA.cardinality` will return `float('inf')`. ```python dfa.cardinality() len(dfa) ``` #### DFA.from_prefix(cls, input_symbols, prefix, contains=True) Directly computes the minimal DFA recognizing strings with the given prefix. ```python contains_prefix_nano = DFA.from_prefix({'a', 'n', 'o', 'b'}, 'nano') avoids_prefix_nano = DFA.from_prefix({'a', 'n', 'o', 'b'}, 'nano', contains=False) ``` #### DFA.from_suffix(cls, input_symbols, suffix, contains=True) Directly computes the minimal DFA recognizing strings with the given prefix. ```python contains_suffix_nano = DFA.from_suffix({'a', 'n', 'o', 'b'}, 'nano') avoids_suffix_nano = DFA.from_suffix({'a', 'n', 'o', 'b'}, 'nano', contains=False) ``` #### DFA.from_substring(cls, input_symbols, substring, contains=True, must_be_suffix=False) Directly computes the minimal DFA recognizing strings containing the given substring. ```python contains_substring_nano = DFA.contains_substring({'a', 'n', 'o', 'b'}, 'nano') avoids_substring_nano = DFA.contains_substring({'a', 'n', 'o', 'b'}, 'nano', contains=False) ``` #### DFA.from_subsequence(cls, input_symbols, subsequence, contains=True) Directly computes the minimal DFA recognizing strings containing the given subsequence. ```python contains_substring_dcba = DFA.contains_subsequence({'a', 'b', 'c', 'd'}, 'dcba') avoids_substring_dcba = DFA.contains_subsequence({'a', 'b', 'c', 'd'}, 'dcba', contains=False) ``` #### DFA.of_length(cls, input_symbols, min_length=0, max_length=None, symbols_to_count=None) Directly computes the minimal DFA which accepts all words whose length is between `min_length` and `max_length`, inclusive. To allow infinitely long words, the value `None` can be passed in for `max_length`. If `symbols_to_count` is `None` (default behavior), then counts all symbols. Otherwise, only counts symbols present in the set `symbols_to_count` and ignores other symbols. #### DFA.count_mod(cls, input_symbol, k, remainders=None, symbols_to_count=None) Directly computes a DFA that counts given symbols and accepts all strings where the remainder of division by `k` is in the set of `remainders` given. The default value of `remainders` is `{0}` and all symbols are counted by default. ```python even_length_strings = DFA.count_mod({'0', '1'}, 2) odd_number_of_ones = DFA.count_mod({'0', '1'}, 2, remainders={1}, symbols_to_count={'1'}) ``` #### DFA.nth_from_start(cls, input_symbols, symbol, n) Directly computes the minimal DFA which accepts all words whose `n`-th character from the end is `symbol`, where `n` is a positive integer. ```python dfa = DFA.nth_from_start({'0', '1'}, '1', 4) ``` #### DFA.nth_from_end(cls, input_symbols, symbol, n) Directly computes the minimal DFA which accepts all words whose `n`-th character from the end is `symbol`, where `n` is a positive integer. ```python dfa = DFA.nth_from_end({'0', '1'}, '1', 4) ``` #### DFA.count_words_of_length() Counts words (of the given length) that are accepted by the DFA ```python dfa.count_words_of_length(3) ``` #### DFA.universal_language(cls, input_symbols) Returns a new DFA which accepts all strings formed from the given input symbols. ```python DFA.universal_language(input_symbols={'a', 'b'}) ``` #### DFA.empty_language(cls, input_symbols) Returns a new DFA which rejects all strings formed from the given input symbols. ```python DFA.empty_language(input_symbols={'a', 'b'}) ```


New NFA Methods

Please see the NFA documentation for the full details on these new methods.

Click to expand new NFA methods
#### NFA.left_quotient(self, other) Returns the left quotient of one NFA with respect to another. ```python new_nfa = nfa1.left_quotient(nfa2) ``` #### NFA.right_quotient(self, other) Returns the right quotient of one NFA with respect to another. ```python new_nfa = nfa1.right_quotient(nfa2) ``` #### NFA.shuffle_product(self, other) Returns shuffle product of two NFAs. This produces an NFA that accepts all interleavings of strings in the input NFAs. ```python new_nfa = nfa1.shuffle_product(nfa2) ``` #### NFA.edit_distance(cls, input_symbols, reference_str, max_edit_distance, insertion=True, deletion=True, substitution=True) Constructs the NFA for the given reference_str for the given Levenshtein distance. This NFA recognizes strings within the given Levenshtein distance (commonly called edit distance) of the reference_str. Parameters control which error types the NFA will recognize (insertions, deletions, or substitutions). If insertion and deletion are `False` and substitution is `True`, then this is the same as Hamming distance. If insertion and deletion are `True` and substitution is `False`, then this is the same as LCS distance. ```python levenshtein_nfa = NFA.edit_distance({'0', '1'}, '0101', 2) hamming_nfa = NFA.edit_distance({'0', '1'}, '0101', 2, insertion=False, deletion=False) LCS_nfa = NFA.edit_distance({'0', '1'}, '0101', 2, substitution=False) ```


Tuples for state names (instead of strings)

  • DFA operations that generate new states (like conversion to NFA, cross product, etc.) now create these new states as tuples rather than strings
    • This allows for greater flexibility when your automaton has state names of mixed data types (e.g. both str and int within the same states set)

Additional Regular Expression Characters

The following characters are now recognized within NFA-based regular expressions:

  • ? (optional)
  • . (wildcard)
  • + (one-or-more)
  • & (intersection)

Whitespace characters such as spaces, tabs, newlines, etc. are now also ignored in all regular expressions parsed by the library.

Better performance

  • Made substantial improvements to the performance of the regular expression engine (automata.base.regex, now automata.regex.regex) when handling substantially longer regexes (thanks to @eliotwrobson in #62!)
  • Made performance improvements (10x in testing) to the DFA.minify() method (also thanks to @eliotwrobson in #66)

Optional Validation

For performance, you can now globally disable the validation that is automatically performed when instantiating an Automaton instance. This can be done via the new global configuration functionality.

```python import automata.base.config as global_config

globalconfig.shouldvalidate_automata = False

The rest of your code...

```

Bug Fixes

  • Fixed a bug where state sets of mixed types (e.g. sets containing both str and int states) were not handled correctly (#60)
  • The NFA methods that are unsupported by the GNFA class (such as read_input_stepwise) now throw a NotImplementedError, since the GNFA class is designed specifically for regular expression conversion anyway
    • If you need input-reading functionality and NFA operations, simply use an NFA directly
  • The GNFA class not properly raises a NotImplementedError or returns NotImplemented for the relevant unsupported NFA operations; previously, the behavior was unpredictable for those operations when applied to a GNFA

Breaking Changes

  • All Automaton instances are now immutable, meaning several things:
    • You can no longer set or delete any attributes on an instance
    • The set and dict parameters that you pass when instantiating an Automaton type are converted to immutable structures as well. So if you pass states={'q0', 'q1'} to the DFA constructor, later retrieving dfa.states will be of type frozenset, not set
  • In accordance with the immutability change, the frozendict package is a new required dependency of the library
  • Moved the automata.base.regex module to automata.regex.regex alongside the other regular expression-related modules
  • The default value of the retain_names parameter for DFA.minify() has been corrected from True to False; the README has always stated that the default value should be False, however the default value in the code was actually True; therefore, the code has been updated to match the README (#59)
    • Since this code correction may break existing developer code, this is labeled as a backwards-incompatible change rather than just a mere bugfix

Reorganized Documentation

The API documentation has been moved out of the README and into a dedicated docs/ folder in the GitHub repository. With this move, the documentation has also been broken up into separate files for easier navigation and discoverability.

https://github.com/caleb531/automata/tree/main/docs

Scientific Software - Peer-reviewed - Python
Published by caleb531 about 3 years ago

automata - v6.0.2

  • Fixed a critical bug caused by v6.0.1, where v6.0.1 attempted to implement the missing NFA.to_regex() method. However, the addition of the method caused a circular import error that was forced to be remove for the sake of the library's stability. So sorry about that.

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 3 years ago

automata - v6.0.1

  • Added missing implementation for NFA.to_regex(), which was absent from the v6.0.0 release. Sorry about that!
  • Corrections to documentation in README

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 3 years ago

automata - 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 new NFA.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 from DFA

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 3 years ago

automata - v5.0.0

Automata v5 is a major new release with new goodies and also some backwards-incompatible changes:

New Features

New DFA/NFA Operations

  • Added a plethora of new DFA and NFA operations (big thanks to @Tagl for contributing!); please see the README for documentation on all new methods/operators:
    • DFA Operations
      • Empty check (dfa1.isempty())
      • Finite check (dfa1.isfinite())
      • Disjoint check (dfa1.isdisjoint(dfa2))
      • Subset check (dfa1 <= dfa2)
      • Superset check (dfa1 >= dfa2)
      • Strict subset check (dfa1 < dfa2)
      • Strict superset check (dfa1 > dfa2)
      • Equivalence check (dfa1 == dfa2)
      • Complement (~dfa1)
      • Union (dfa1 | dfa2)
      • Intersection (dfa1 & dfa2)
      • Set difference (dfa1 - dfa2)
      • Symmetric difference (dfa1 ^ dfa2)
    • NFA Operations
      • Reversal (reversed(nfa1))
      • Concatenation (nfa1 + nfa2)
      • Kleene Star (nfa1.kleene_star())
  • Added new visualization capability for DFAs using pydot (thanks to @lewiuberg)
    • Please note that pydot is now a dependency of this library
    • To use, call the DFA show_diagram() method; see the README for usage
    • On macOS, run brew install gprof2dot to allow pydot to function fully

Breaking Changes

  • Dropped Python 3.5 support, since it has been end-of-life since September 2020. Python 3.6 is now the minimum supported version of Python.
  • Added pydot as a required dependency (per the new visualization feature below)
  • No backwards-incompatible API changes otherwise

Flag to Enable Partial DFAs

  • Added an allow_partial parameter for DFAs that permits a state to not have transitions for every input symbol; see the README for usage (#36)

Other improvements

  • Improved the performance of the DFA.minify() method
  • Improved handling of automata with non-string state names (i.e. an InvalidStateError is no longer raised)

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 4 years ago

automata - v4.0.0

  • Dropped support for Python 3.4 because it has reached end-of-life
  • There have been no API changes from v3 to v4 otherwise

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 5 years ago

automata - v3.1.0

New Features

  • Added a new (optional) acceptance_mode parameter for DPDAs and NPDAs. Accepted values are 'final_state', 'empty_stack', or 'both'; the default value is 'both'

Scientific Software - Peer-reviewed - Python
Published by caleb531 almost 7 years ago

automata - v3.0.0

New Features

  • Added a new NPDA class for nondeterministic pushdown automata

    • A new PDAConfiguration class has also been added, which is immutable and hashable; it is essentially a tuple of state, remaining input, and stack
  • Added a new NTM class for nondeterministic Turing machines

    • A new TMConfiguration class has also been added, which is immutable and hashable; it is essentially a tuple of state and tape
  • Added N direction for DTM and NTM to indicate no tape movement

Breaking changes

  • PDAStack is now immutable and hashable; it still represents the current stack of a PDA
  • TMTape is now immutable and hashable; it still represents the tape of a TM and the current cursor position
  • The copy methods on TMTape and PDAStack have been removed, since they are now immutable types

Scientific Software - Peer-reviewed - Python
Published by caleb531 almost 7 years ago

automata - v2.1.0

  • Added a new minify() method for DFAs, which removes unreachable states and merges equivalent states

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 7 years ago

automata - v2.0.1

  • Refactored DFA.from_nfa() to improve its efficiency and handle more complex cases (thanks @YtvwlD)
  • Added __init__.py to every module to improve compatibility with interpreters like bpython (also @YtvwlD)

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 7 years ago

automata - v2.0.0

  • Automata v2 introduces a number of backwards-incompatible API changes to clean up and improve the API
  • Added a new input method, accepts_input(), which returns a boolean
    • For more details, see the README

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 7 years ago

automata - v1.0.0-rev.3

  • Included all sub-packages in PyPI distribution

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 9 years ago

automata - v1.0.0-rev.2

  • Rebuilt the .egg-info file with the compiled reST README (for the PyPI project page)

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 9 years ago

automata - v1.0.0-rev.1

  • Fixed PyPI setup configuration to make package installable

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 9 years ago

automata - v1.0.0

  • Initial release; the API will not change in a backwards-incompatible way until v2.0.0

Scientific Software - Peer-reviewed - Python
Published by caleb531 over 9 years ago