Skip to main content

Automata-Toolbox

banner

Overview

Automata Toolbox is a Python framework designed for simulating various types of automata used in computational theory. It supports the following automata types:

  • Deterministic Finite Automata (DFA)
  • Non-Deterministic Finite Automata (NFA)
  • Pushdown Automata (PDA)
  • Context-Free Grammar (CFG)

This framework allows users to define and execute automata using structured configuration files or Python classes. It provides utilities for parsing, validation, and simulation of automata, making it an ideal tool for learning and experimentation.


Features

✅ Full Automata Simulation - Supports DFA, NFA, PDA, and CFG. ✅ Structured Configuration - Automata are defined using .cfg configuration files. ✅ Python API - Automata can be created and run programmatically. ✅ Command-Line Interface (CLI) - Automata can be managed directly from the terminal. ✅ Extensible and Modular - Designed to be modified and extended easily.


Installation

Automata Toolbox requires Python 3.7+. Install it via pip:

pip install automata_toolbox

Alternatively, you can install it from source:

git clone https://github.com/Cris24dc/Automata-Toolbox.git
cd Automata-Toolbox
pip install -e .

CLI Usage

Generate an Automaton Template

automata generate dfa my_dfa

Supported automaton types: dfa, nfa, pda, cfg.

Run a DFA on an Input String

python3 -m toolbox.main config/my_dfa.cfg abba

Using the Python API

Creating and Running a DFA

from toolbox import DFA

dfa = DFA("config/example.cfg")
if dfa.is_valid():
    print("DFA is valid")
    print(dfa.run("abba"))

Using an NFA

from toolbox import NFA

nfa = NFA("config/example_nfa.cfg")
if nfa.is_valid():
    print("NFA is valid")
    print(nfa.run("abba"))

Configuration Files

Each automaton type requires a .cfg file structured as follows:

DFA Configuration Example

[Sigma]
a
b
end

[States]
q0
q1
end

[Start]
q0
end

[Final]
q1
end

[Delta]
q0 a q1
q1 b q0
end

CFG Configuration Example

[Variables]
S
end

[Terminals]
a
b
end

[Rules]
S -> aSb
S -> $
end

Metadata

Release files for automata-toolbox 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for automata-toolbox 2.0
File Size Uploaded Provenance
automata_toolbox-2.0.tar.gz 5.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for automata-toolbox 2.0
File Interpreter ABI Platform
automata_toolbox-2.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / automata_toolbox-2.0.tar.gz

Download URL automata_toolbox-2.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
deaf4121ec513309e0158a96a747292b7be99b42938f22c3a349ffc76818d7d1
BLAKE2b-256 checksum
How to use checksums
a812acc99612cdba1139c9740cddbeee9b183ea71d5fcfe886bef719f3ed460c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / automata_toolbox-2.0-py3-none-any.whl

Download URL automata_toolbox-2.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2244928cd100338a20b2764511ca8b104122fb54534568b20df51ec99503e2b8
BLAKE2b-256 checksum
How to use checksums
3888ce78e0c9d8af2978a4f2da79110f7ddb0e20dbccdee30440843048a4ab0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for automata-toolbox 2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page