Skip to main content

🤖 A powerful, modern, and educational Python toolkit for automata theory. Visualize DFAs, NFAs, CFGs, minimize automata, 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.

🤔 Why Automata Diags?

Feature Why It Matters
Complete Toolset From basic DFAs to complex CFG conversions, all the tools you need for a typical Theory of Computation course are in one place.
Educational Focus The API is designed to be intuitive and map closely to textbook concepts, making it an excellent companion for students.
Advanced Algorithms Includes research-grade implementations like Hopcroft's minimization, setting it apart from simpler libraries.
Instant Visualization Don't just build automata—see them. Instant visual feedback helps solidify complex concepts and makes debugging intuitive.
Modern & Maintained Built with modern Python (type hints, clean architecture) and actively maintained for correctness and new features.

📦 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.

🤝 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.2.4.tar.gz (555.3 kB 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.2.4-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: automata_diags-0.2.4.tar.gz
  • Upload date:
  • Size: 555.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for automata_diags-0.2.4.tar.gz
Algorithm Hash digest
SHA256 4a55121a7b50232ce754a4d24e6b8ab3b41d0c5ef913b4a6b72a6c827b5c2453
MD5 4816fa6f619e2d9ae5d0e514b3f3d9de
BLAKE2b-256 d676462e5f8bfcda799b1fa586e415e305cfd3b93d5de1f776d639623f85ff2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: automata_diags-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for automata_diags-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a14ada044622dcae1c1c5169f185de1534e0e1754ea0ea4046400a583c3d54a3
MD5 98995a5254fe87a14819071e75aab8bd
BLAKE2b-256 d39a40c35a47b11e6eebf7a76fef1bf252790492cfb005c1041252c3deb18057

See more details on using hashes here.

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