1021 B
1021 B
PR-12 — VM test harness: stepper, trace, and property tests
Why: Industrial quality means test tooling, not just “it runs”.
Scope
-
Add
VmRunnertest harness:- step limit
- deterministic trace of stack deltas
- snapshot of locals
-
Add property tests (lightweight):
- stack never underflows in verified programs
- verified programs never jump out of bounds
Acceptance
- Debugging is fast, and regressions are caught.
Definition of Done (DoD) for PBS v0 “minimum executable”
A single canonical cartridge runs end-to-end:
letdeclarations (locals)- arithmetic (+, -, *, /, %, comparisons)
if/elsecontrol flowwhenexpression (if present in lowering)- function calls with params + returns (including
void) - multiple return slots (flattened structs / hardware value types)
- host syscalls (e.g.,
GfxClear565,InputPadSnapshot,InputTouchSnapshot) - deterministic traps (OOB bounded, invalid local, invalid call target, stack underflow)