1.4 KiB
1.4 KiB
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.
PR-13 — Optional: Refactor Value representation (tagged slots) for clarity
Why: If current Value representation is the source of complexity/bugs, refactor now.
Scope (only if needed)
-
Make
Slotexplicit:Slot::I32,Slot::I64,Slot::U32,Slot::Bool,Slot::ConstId,Slot::GateId,Slot::Unit
-
Multi-slot types become sequences of slots.
Acceptance
- Simpler, more verifiable runtime.
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)