Learn THUE with Real Code Examples
Updated Nov 26, 2025
Installation Setup
No installation required; Thue is theoretical.
Optional interpreters or simulators can be used.
Download a Thue interpreter from academic repositories.
Write rules in the Thue syntax.
Run strings through the interpreter to simulate computation.
Environment Setup
Install Thue interpreter (optional)
Use text editor to define rules
Prepare initial strings
Run simulation locally or online
Observe outputs and halting conditions
Config Files
rules.thue - defines rewriting rules
input.txt - initial strings
output.txt - resulting strings
log.txt - optional rule application log
docs/ - notes on rules and expected transformations
Cli Commands
thue-run rules.thue input.txt
thue-step - execute one rewriting step
thue-deterministic - force deterministic execution
thue-non-deterministic - explore multiple paths
thue-visualize - generate string transformation graph
Internationalization
Rule syntax uses ASCII symbols
Documentation available in multiple languages
Interpreters may support Unicode extensions
Educational translations exist
Flexible for different symbol sets in theory
Accessibility
Text-based interface accessible in terminals
Rule files readable by screen readers
Optional web-based visualizers for graphical accessibility
Keyboard navigation for CLI tools
Educational aids for teaching Thue
Ui Styling
Mostly CLI or text-based
Optional graphical simulators
Visualization of string derivation trees
Color-coded transformations in some tools
Educational diagrams for understanding rules
State Management
String represents current state
Rules applied sequentially or non-deterministically
Each step produces new string state
Halting occurs when no rules match
Optional branching for non-deterministic exploration
Data Management
Strings as primary data
Rules as transformation definitions
Logs of transformations for analysis
Input and output files for persistence
Visualization of state transitions