https://github.com/uncomputable/simple-turing
Turing machine verifier written in Simplicity
https://github.com/uncomputable/simple-turing
application bitcoin rust turing-machine
Last synced: 3 months ago
JSON representation
Turing machine verifier written in Simplicity
- Host: GitHub
- URL: https://github.com/uncomputable/simple-turing
- Owner: uncomputable
- License: mit
- Created: 2022-10-11T14:39:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-11T20:35:23.000Z (over 2 years ago)
- Last Synced: 2025-02-04T19:46:38.943Z (5 months ago)
- Topics: application, bitcoin, rust, turing-machine
- Language: Rust
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Turing machine
Verify Turing machine computations in Simplicity.
It is easy to verify that a Boolean function accepts (returns "true" upon) a given input. This verification is strictly easier than computing the output of a function. Simplicity is Turing-incomplete and yet it can verify any computable function in this way.
## Running
```
cargo run --example trivial
cargo run --example two_beavers
...
```### Input
The computation is given as witness data and consists of a sequence of configurations. A configuration consists of the current state, tape and index (pointer).
Feel free to change the inputs of the given examples to experiment.
### Output
If the computation is valid, then the Simplicity program returns nothing (NOP). Otherwise, the program reaches a so-called pruned branch with one of the following error codes:
- 00... → invalid state
- 01... → invalid index
- 02... → invalid tape
- 03... → invalid initial state
- 04... → invalid accepting state