Delta logo

design automata as
software

Delta is a code-first environment for building and testing finite automata and Turing machines in TypeScript.

import { dfa, q } from 'delta:lib'
 
const machine = dfa(`# of a's divisible by 2 or 3`)
  .alphabet('a', 'b')
  .states(...q(0, 5))
  .start('q0')
  .accept('q0', 'q2', 'q3', 'q4')
  .increment('a')
  .all(s => s.loop('b'))
  .build()
 
export default machine

features

Modeled after an IDE

Fluent TypeScript API

Define machines with a chainable builder. Errors surface at compile time, right in the editor.

Step-Through Visualizer

Watch your machine process input state by state. The active transition highlights at every step.

Inline Test Suites

Pair any machine with a test suite. Delta runs them all and reports pass/fail right next to your code.

NFA to DFA Conversion

Convert any NFA via subset construction and see how they relate with semantic state names.

Shareable URLs

Every machine can be turned into a URL. Share machines with a link — no hoops required.

Thompson's Construction

Build NFAs from regular expressions with a stack-based API mirroring union, concat, and Kleene star.

machine types

Chomsky's hierarchy

regular

NFA & DFA

Nondeterministic and deterministic finite automata. Build with the TypeScript API or a visual canvas editor.

Open NFA & DFA
context-free

PDA

Pushdown automata with full stack visualization. Model context-free languages and watch each push and pop in real time.

Open PDA
recursively enumerable

Turing Machine

Single and multitape Turing machines. The transition table highlights the active rule at every step.

Open Turing Machine

correctness

Test your machines

  • Compilation errors catch invalid transitions before you run anything.
  • Test suites make correctness verifiable — not just visually convincing.
  • Export test suites to share with instructors or collaborators.
test suite(5 of 6)
areject
aaaccept
aaaaccept
aaaareject
aaaaaaaccept
aaaaaaareject

Ready to dive in?

Write your first automaton in minutes.

Launch Delta