Vyakarana
The Python face of Tape-n-Trace, an interactive Theory of Computation workbench built for BTOCH503 (Hopcroft, Motwani & Ullman, 2nd edition). Build a machine in a notebook cell; the bundled TypeScript engine computes the trace and the web app's own renderers draw it inline — the diagram, the tape, the ID sequence, with transport controls.
from vyakarana import DFA
d = DFA(states={"a", "b"}, alphabet={"0", "1"},
transitions={("a", "0"): "b", ("a", "1"): "a", ("b", "0"): "a", ("b", "1"): "b"},
start="a", accepting={"b"})
d.accepts("011") # True — an odd number of 0s
d.run("011") # the run, step by step, in the cell
Works in Colab, JupyterLab, Jupyter Notebook, VS Code and under nbconvert — no Node, no
extension to enable. Every value-returning call is synchronous: the engine runs in an embedded V8
(mini-racer), the same engine the web app runs in the browser.
Covers: DFA, NFA, ENFA, RegularExpression, CFG, PDA, TM, and a gallery of the
textbook's machines — simulation, the subset construction, minimisation, state elimination,
Thompson's construction, derivations and ambiguity, the CNF pipeline, PDA acceptance conversions,
the multitape reduction. Python never reimplements an algorithm: it builds the object, the engine
computes, a Trace comes back.
Honest by construction. A search that stops at a bound says so (NoCounterexample is not a
proof of unambiguity); a Turing machine that runs past the move cap returns Halted.NO — falsy,
but never False — and offers to continue; the ID sequence is the textbook's, character for
character.
Documentation: vyakarana/docs/documentation.md. Licence: MIT.
Metadata
Release files for vyakarana 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vyakarana-0.1.1.tar.gz | 174.7 kB | With provenance | Details for vyakarana-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vyakarana-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for vyakarana-0.1.1-py3-none-any.whl |
Total release size: 344.1 kB
Release files / vyakarana-0.1.1.tar.gz
| Download URL | vyakarana-0.1.1.tar.gz |
|---|---|
| Size | 174.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdc475b8dc2426e95ac3c8592d46d60e7f60b650e7198fa711c376f30e0a2657
|
|
BLAKE2b-256 checksum How to use checksums |
ca3e3537490e3b904439ee07a6fdf4d101e20324774ffa8bc8a21c8f59d40fe3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / vyakarana-0.1.1-py3-none-any.whl
| Download URL | vyakarana-0.1.1-py3-none-any.whl |
|---|---|
| Size | 169.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1d7ef6e29266c3a5f916c74d895d8cef675a95ca4d7e0a4ef5884ac751c80a4
|
|
BLAKE2b-256 checksum How to use checksums |
d02ad85b6790e4cca823eaaa0220493f85c2ad378e7004425b2c5f1daaadb618
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logSecurity for vyakarana 0.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vyakarana-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logA 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.