Repository navigation
ogar-loco: PROBE-LOCO-INTERPRETER-1 — the missing interpreter, and a real finding - #281
Conversation
…real finding Adds crates/ogar-loco/examples/interpret_probe.rs: a minimal interpreter over ogar-loco's shared computational core (arithmetic, logic, variables, IF/IF_ELSE/REPEAT/WHILE/REPEAT_UNTIL), run over four hand-authored real algorithms (GCD, summation, FizzBuzz-style classification, Collatz step counts) across multiple real inputs each, twice per input for a determinism check. This is PROBE-LOCO-INTERPRETER-1 as specified in lance-graph's `.claude/brainstorms/2026-08-22-behavioral-ir-fathoming.md` §F: before this, ogar-loco had a byte-exact, validated, branch-capable instruction format and zero execution capability anywhere in the workspace. Results (44 episodes total): - KC2 (determinism under fixed inputs): PASS - KC3 (median episode length >= 5 calls): PASS, median=23 - KC4 (traces are input-dependent, not a static ordering): PASS, 44 distinct call sequences across 44 episodes - Independent arithmetic ground truth: all 44 episodes correct - KC1 (the 34 lance-graph-ogar recipes have separable executable effects): explicitly NOT TESTED — this interpreter only covers the shared core below DOMAIN_FLOOR; the recipes' semantics live in lance-graph-ogar's ThoughtCtx/recipe_dispatch wiring, out of scope here. Genuine finding surfaced while building this (documented in the module doc, not pre-registered): the shared core's declared `pushes_result` table marks VAR_SET/VAR_CHANGE as pushing a result (chainable-assignment semantics), and there is no DROP/POP primitive. That makes `statements::statement_bounds` (whole-body segmentation for step-mask masking) correctly refuse any ordinary imperative "set a; set b; ..." sequence with DanglingOperands — a real, previously-untested ABI property, not a bug. This interpreter therefore does not use `statement_bounds` to drive execution; it walks each function body as one linear program-counter pass, treating VAR_SET/VAR_CHANGE as void statements, and uses a local backward operand-span scan (`operand_span_start`) only where WHILE/REPEAT_UNTIL need to re-run a condition. Co-Authored-By: Claude <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_0ee8109f-f8a1-4d88-94e2-8609f855096f) |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds
crates/ogar-loco/examples/interpret_probe.rs: a minimal interpreter over ogar-loco's shared computational core (arithmetic, logic, variables, IF/IF_ELSE/REPEAT/WHILE/REPEAT_UNTIL), run over four hand-authored real algorithms (GCD, summation, FizzBuzz-style classification, Collatz step counts) across multiple real inputs each, twice per input for a determinism check.This is
PROBE-LOCO-INTERPRETER-1as specified in lance-graph's.claude/brainstorms/2026-08-22-behavioral-ir-fathoming.md§F (companion lance-graph PR: AdaWorldAPI/lance-graph#992). Before this, ogar-loco had a byte-exact, validated, branch-capable instruction format and zero execution capability anywhere in the workspace — a crate-wide search forfn execute/eval/interpret/step/runreturned nothing.Results (44 episodes total)
ladder_program()'s static ordering): PASS, 44 distinct call sequences across 44 episodes — this was the single most-likely-to-kill condition and it did not fireDOMAIN_FLOOR; the recipes' semantics live in lance-graph-ogar'sThoughtCtx/recipe_dispatchwiring, out of scope here.A genuine finding surfaced while building this
Documented in the module doc, not pre-registered: the shared core's own declared
pushes_resulttable marksVAR_SET/VAR_CHANGEas pushing a result (chainable-assignment semantics), and there is noDROP/POPprimitive. That makesstatements::statement_bounds(whole-body segmentation for step-mask masking) correctly refuse (DanglingOperands) any ordinary imperative "set a; set b; ..." sequence — a real, previously-untested ABI property, not a bug. This interpreter therefore does not usestatement_boundsto drive execution; it walks each function body as one linear program-counter pass, treatingVAR_SET/VAR_CHANGEas void statements, and uses a local backward operand-span scan (operand_span_start) only whereWHILE/REPEAT_UNTILneed to re-run a condition.cargo clippy -p ogar-loco --example interpret_probe -- -D warningsandcargo fmt -p ogar-locoare both clean.Generated by Claude Code