-
Notifications
You must be signed in to change notification settings - Fork 5
Tests
lkorenc edited this page Apr 5, 2022
·
1 revision
Core of circuitous tests test single instruction execution on circuits. Inputs are usually handwritten (although it would be nice to do some fuzzing/auto generation of reasonable input cases in the future) and outputs are either handwritten (which is often very tedious) or inputs are run in a simulator to get outputs. Currently only microx is used as simulator, but nothing really prevents any other from being used.
One test consists of approximately following phases:
- Lift circuit.
- Simulate selected
run_bytes(can be only one instruction as of now, but there are no fundamental problems to run a sequence) with input memory + register state.- Collect all memory accesses.
- Collect values of output registers.
- Create traces for
circuitous-run.- Input registers from test case + memory traces derived from simulation of instruction -> input trace.
- Output registers from simulation -> output trace.
-
circuitous-runwith both traces and initial memory state will determine whether circuit can accept (note that advices are not specified in the input trace because to derive them we would need to runcircuitous-runanyway).