Skip to content

ogar-loco: PROBE-LOCO-INTERPRETER-1 — the missing interpreter, and a real finding - #281

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/probe-loco-interpreter-1
Aug 23, 2026
Merged

AdaWorldAPI merged 1 commit into
mainfrom
claude/probe-loco-interpreter-1

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

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 (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 for fn execute/eval/interpret/step/run returned nothing.

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 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 fire
  • 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.

A genuine finding surfaced while building this

Documented in the module doc, not pre-registered: the shared core's own 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 (DanglingOperands) any ordinary imperative "set a; set b; ..." sequence — 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.

cargo clippy -p ogar-loco --example interpret_probe -- -D warnings and cargo fmt -p ogar-loco are both clean.


Generated by Claude Code

…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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a125a8d2-f79d-4e1f-b0ee-97011342e42f


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI merged commit 719471d into main Aug 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants