Skip to main content

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

vyakarana-0.1.1.tar.gz (174.7 kB view details)

Uploaded Source

Built Distribution

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

vyakarana-0.1.1-py3-none-any.whl (169.4 kB view details)

Uploaded Python 3

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

Hashes for vyakarana-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bdc475b8dc2426e95ac3c8592d46d60e7f60b650e7198fa711c376f30e0a2657
MD5 539422df950468e6a0a90383ef778b60
BLAKE2b-256 ca3e3537490e3b904439ee07a6fdf4d101e20324774ffa8bc8a21c8f59d40fe3

See more details on using hashes here.

Provenance

The following attestation bundles were made for vyakarana-0.1.1.tar.gz:

Publisher: release.yml on ShivamMalge/Tape-n-Trace

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

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

Hashes for vyakarana-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1d7ef6e29266c3a5f916c74d895d8cef675a95ca4d7e0a4ef5884ac751c80a4
MD5 b2ca88b3850bb4afd701e4fcac1a37bc
BLAKE2b-256 d02ad85b6790e4cca823eaaa0220493f85c2ad378e7004425b2c5f1daaadb618

See more details on using hashes here.

Provenance

The following attestation bundles were made for vyakarana-0.1.1-py3-none-any.whl:

Publisher: release.yml on ShivamMalge/Tape-n-Trace

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

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