Master computational theory through hands-on practice with automata, grammars, and formal languages.
Learning automata theory from textbooks can be challenging. Automata Practice and Test bridges the gap between theory and understanding by letting you:
- See your automata come to life as interactive state diagrams
- Test your solutions instantly with custom input strings
- Debug step-by-step to understand exactly how your machine processes input
- Practice with ready-to-use exercises and exam questions
Whether you're a student preparing for exams or an educator teaching computational theory, this tool makes abstract concepts tangible.
|
DFA & NFA Finite Automata Pattern matching, lexical analysis |
PDA Push-down Automata Balanced brackets, nested structures |
TM Turing Machines Any computable function |
|
CFG Context-Free Grammars Programming language syntax |
REX Regular Expressions Text pattern matching |
Grading Batch Testing Automated exam grading |
- Visual Learning: See automata rendered as beautiful state diagrams
- Instant Feedback: Test inputs and see Accept/Reject immediately
- Step-by-Step Traces: Understand exactly how your machine processes each symbol
- Practice Files: Includes exercises from real CS theory courses
- Batch Grading: Grade entire classes with automated test suites
- PDF Reports: Generate detailed grading reports per student
- Configurable Limits: Set max rules, transitions, regex length, and timeouts
- Fair Scoring: Sophisticated scoring algorithm handles edge cases
- Cross-Platform: Works on Windows, macOS, and Linux
- No Installation: Just download the JAR and run
- Auto-Updates: Get notified when new versions are available
- Syntax Help: Built-in documentation for all file formats
- Java 8 or higher (that's it!)
- Download the latest JAR from Releases
- Run with double-click or:
java -jar Automata_Practice_and_Test-1.3.2.jar
That's it! No Maven, no compilation, no setup.
git clone https://github.com/olcaytaner/Automata_Practice_and_Test.git
cd Automata_Practice_and_Test
mvn clean package
java -jar target/Automata_Practice_and_Test-1.3.2.jarLet's build a DFA that accepts strings ending with "ab":
File → New → DFA
states: q0 q1 q2
alphabet: a b
start: q0
accept: q2
transitions:
q0, b -> q0
q0, a -> q1
q1, a -> q1
q1, b -> q2
q2, b -> q0
q2, a -> q1
Press Ctrl+B (or Cmd+B on Mac) to see your automaton:
Press Ctrl+R and try these inputs:
ab→ Accepted ✓aab→ Accepted ✓ba→ Rejected ✗abb→ Rejected ✗
| Action | Windows/Linux | macOS |
|---|---|---|
| Compile & Visualize | Ctrl+B |
Cmd+B |
| Run Test | Ctrl+R |
Cmd+R |
| Run with File | Ctrl+Shift+R |
Cmd+Shift+R |
| Clear Graph | Ctrl+G |
Cmd+G |
| Save | Ctrl+S |
Cmd+S |
| Open | Ctrl+O |
Cmd+O |
| Recent Files | Ctrl+1-9 |
Cmd+1-9 |
Use case: Pattern matching with deterministic rules
states: q0 q1 q2
alphabet: a b
start: q0
accept: q2
transitions:
q0, a -> q1
q0, b -> q0
q1, b -> q2
q2, a -> q1
File extension: .dfa
Use case: Pattern matching with multiple possibilities and ε-transitions
states: q0 q1 q2
alphabet: a b
start: q0
accept: q2
transitions:
q0, a -> q1
q0, eps -> q1
q0, b -> q0
q1, b -> q2
q2, a -> q1
Note: Use eps for epsilon (ε) transitions
File extension: .nfa
Use case: Context-free languages like balanced parentheses, a^n b^n
states: q0 q1 q2
input: a b
stack: Z a
start: q0
stack_start: Z
accept: q2
transitions:
q0, a, Z -> q0, aZ
q0, a, a -> q0, aa
q0, b, a -> q1, eps
q1, b, a -> q1, eps
q1, eps, Z -> q2, eps
Format: <state>, <input>, <stack_pop> -> <next_state>, <stack_push>
Acceptance: Input consumed + final state + empty stack
File extension: .pda
Use case: Any computable function
states: q0 q1 q_accept q_reject
input: 0 1
tape: 0 1 X _
start: q0
accept: q_accept
reject: q_reject
transitions:
q0, 0 -> q1, X, R
q0, 1 -> q0, 1, R
q0, _ -> q_accept, _, R
q1, 0 -> q0, 0, R
q1, 1 -> q1, 1, R
q1, _ -> q_reject, _, R
Format: <state>, <read> -> <next_state>, <write>, <direction>
Requirements:
- Accept state must be
q_accept - Reject state must be
q_reject - Use
_for blank,L/Rfor direction
File extension: .tm
Use case: Programming language syntax, nested structures
vars: S A B
terminals: a b
start: S
rules:
S -> A B | a S b
A -> a | a A
B -> b | b B
Note: Use eps for epsilon productions. Parsed with CYK algorithm.
File extension: .cfg
Use case: Pattern matching, input validation
alphabet: a b c d
pattern: (ab*c) u d u eps
Format: alphabet: defines valid symbols, pattern: defines the regex
Operators: * (Kleene star), u (union), () (grouping)
File extension: .rex
| Type | Extension | Key Sections |
|---|---|---|
| DFA | .dfa |
states, alphabet, start, accept, transitions |
| NFA | .nfa |
states, alphabet, start, accept, transitions |
| PDA | .pda |
states, input, stack, start, stack_start, accept, transitions |
| TM | .tm |
states, input, tape, start, accept, reject, transitions |
| CFG | .cfg |
vars, terminals, start, rules |
| REX | .rex |
alphabet, pattern |
Tip: Use # for comments in all formats (except REX)
Grade entire classes with a single command:
mvn exec:java@grade -Dexam.folder=submissions/ -Dtest.cases=tests/ -Doutput=results/#timeout=5
#max_rules=10
accept: aab
accept: ab
reject: ba
reject: a
- CSV: Summary with scores for all students
- HTML: Detailed report with pass/fail per test
- PDF: Individual student reports
Automata_Practice_and_Test/
├── src/main/java/
│ ├── common/ # Base classes
│ ├── DeterministicFiniteAutomaton/
│ ├── NondeterministicFiniteAutomaton/
│ ├── PushDownAutomaton/
│ ├── TuringMachine/
│ ├── ContextFreeGrammar/
│ ├── RegularExpression/
│ ├── UserInterface/ # GUI
│ └── grader/ # Batch grading
├── src/test/java/ # Unit tests
└── pom.xml
| Library | Version | Purpose |
|---|---|---|
| JUnit | 5.8.2 | Testing |
| GraphViz Java | 0.18.1 | Visualization |
| GraalVM JS | 20.0.0 | Graph rendering |
| Apache Batik | 1.19 | SVG rendering |
| Apache PDFBox | 2.0.27 | PDF generation |
All managed by Maven — no manual installation needed.
Graph not showing?
mvn clean compileJAR won't start?
java -version # Must be 8+Tests failing?
mvn test -X # Verbose outputAutomata Practice and Test was developed at Özyeğin University:
- Ege Yenen
- Bora Baran
- Berre Delikara
- Eren Yemşen
- Berra Eğcin
- Hakan Akbıyık
- Hakan Çildaş
- Selim Özyılmaz
- Olcay Taner Yıldız
- CHANGELOG.md — Version history
If this tool helped you learn or teach automata theory, consider supporting its development:
- In-app: Help → Syntax Help for file format documentation
- Issues: GitHub Issues
- Updates: The app checks for updates automatically on startup
Happy automaton building! 🤖
Made with ❤️ for computer science students everywhere