Skip to main content

A powerful, modern, and educational Python toolkit for automata theory. Visualize DFAs, NFAs, CFGs, PDAs, and Turing machines (single/multi-tape/multi-head); minimize automata; CYK and CFG algorithms; and more with an elegant, type-safe API.

Project description

Automata Diags

PyPI version Python versions License: MIT Documentation Status

A powerful, modern, and educational Python toolkit for automata theory. Visualize DFAs, NFAs, CFGs, minimize automata, and more with an elegant, type-safe API.

For the full, comprehensive documentation including tutorials and the API reference, please visit our Documentation Website.

Installation

pip install automata-diags

Requires Python 3.8+ and Graphviz.

Quick Start

from automata.backend.grammar.dist import State, Symbol
from automata.backend.grammar.regular_languages.dfa.dfa_mod import DFA
from automata.backend.drawings.automata_drawer import AutomataDrawer

# Create a simple DFA
# For more creation methods, see the full documentation.
dfa = DFA.from_string("q0,a,q1;q1,b,q2", start_state="q0", accept_states={"q2"})

# Test it
dfa.accepts([Symbol('a'), Symbol('b')]) # True

# Visualize it
drawer = AutomataDrawer()
drawer.draw_dfa_from_object(dfa, "my_first_dfa")

For more examples and detailed guides, please visit the Full Documentation Site.

Web App

https://ajodo-godson.github.io/automata_diags/

Contributing

Contributions are welcome! Please feel free to open a pull request or submit an issue on our GitHub repository.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

automata_diags-0.6.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

automata_diags-0.6.0-py3-none-any.whl (63.8 kB view details)

Uploaded Python 3

File details

Details for the file automata_diags-0.6.0.tar.gz.

File metadata

  • Download URL: automata_diags-0.6.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for automata_diags-0.6.0.tar.gz
Algorithm Hash digest
SHA256 08465e6a5e51c07962063722c3e6fc36c662f891315e4a34523ea180bb68588d
MD5 26cce54981692df42e6d3de5044e6a43
BLAKE2b-256 220ea10da8a055d134c926499d297b16e71bbe7e560909c59b03a72470afb8f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for automata_diags-0.6.0.tar.gz:

Publisher: python-publish.yml on Ajodo-Godson/automata_diags

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file automata_diags-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: automata_diags-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 63.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for automata_diags-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9fdbd8e9165907029a68e8988199e2674036a92f1c6c90113665672bd25b7a4
MD5 97baf42477f334ffc07166c7155be5a4
BLAKE2b-256 630a8772a6bc085aee44ffdd2d6b63aa8795221f5eef26b9892b3b66237f8639

See more details on using hashes here.

Provenance

The following attestation bundles were made for automata_diags-0.6.0-py3-none-any.whl:

Publisher: python-publish.yml on Ajodo-Godson/automata_diags

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page