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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vyakarana-0.1.1.tar.gz.
File metadata
- Download URL: vyakarana-0.1.1.tar.gz
- Upload date:
- Size: 174.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdc475b8dc2426e95ac3c8592d46d60e7f60b650e7198fa711c376f30e0a2657
|
|
| MD5 |
539422df950468e6a0a90383ef778b60
|
|
| BLAKE2b-256 |
ca3e3537490e3b904439ee07a6fdf4d101e20324774ffa8bc8a21c8f59d40fe3
|
Provenance
The following attestation bundles were made for vyakarana-0.1.1.tar.gz:
Publisher:
release.yml on ShivamMalge/Tape-n-Trace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vyakarana-0.1.1.tar.gz -
Subject digest:
bdc475b8dc2426e95ac3c8592d46d60e7f60b650e7198fa711c376f30e0a2657 - Sigstore transparency entry: 2660631438
- Sigstore integration time:
-
Permalink:
ShivamMalge/Tape-n-Trace@ebaefc469f542f092e4e80310115109eea3e380b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ShivamMalge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ebaefc469f542f092e4e80310115109eea3e380b -
Trigger Event:
push
-
Statement type:
File details
Details for the file vyakarana-0.1.1-py3-none-any.whl.
File metadata
- Download URL: vyakarana-0.1.1-py3-none-any.whl
- Upload date:
- Size: 169.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1d7ef6e29266c3a5f916c74d895d8cef675a95ca4d7e0a4ef5884ac751c80a4
|
|
| MD5 |
b2ca88b3850bb4afd701e4fcac1a37bc
|
|
| BLAKE2b-256 |
d02ad85b6790e4cca823eaaa0220493f85c2ad378e7004425b2c5f1daaadb618
|
Provenance
The following attestation bundles were made for vyakarana-0.1.1-py3-none-any.whl:
Publisher:
release.yml on ShivamMalge/Tape-n-Trace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vyakarana-0.1.1-py3-none-any.whl -
Subject digest:
c1d7ef6e29266c3a5f916c74d895d8cef675a95ca4d7e0a4ef5884ac751c80a4 - Sigstore transparency entry: 2660631478
- Sigstore integration time:
-
Permalink:
ShivamMalge/Tape-n-Trace@ebaefc469f542f092e4e80310115109eea3e380b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ShivamMalge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ebaefc469f542f092e4e80310115109eea3e380b -
Trigger Event:
push
-
Statement type: