Repository navigation
D-MPS-9 MORK query_multi oracle + math-compiler Stage A matrix and Stage B (E1) probe - #1690
Conversation
…tests Not yet compiled or tested; the central gate runs next. - boundary.rs: OracleRule/OracleFacts/TupleSet/OracleCost and mork_rules: any admitted conjunctive rule set run through MORK exec, answers as a set, plus MORK's unification alone (Space::query_multi callback count, no decode). - mork_api::to_oracle maps an admitted Rule to the oracle's input. - tests/mork_differential.rs: six fixtures vs the reference as sets, match count vs reference derivations over distinct facts, refusals unchanged. - examples/mork_split.rs: native prepare/fold/terminal vs MORK cost split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…on; board - Gate: mork-pathmap-probe 46 tests, crepe-plan-probe 59 tests (7 new differential), release; clippy -D warnings and fmt clean on both. - Disable runs, each red then restored: constants as variables (5 red), count only Ok callbacks (1 red), to_oracle without admit (1 red). - mork_split: the Bindings outcome is a deferred handle, so its execute time never read the answers; one full enumeration is now timed (188 us vs 17.6 us for the count terminal at n = 10 000). - clippy: contains() instead of iter().any() in check_rule. - Board: entry 2026-10-22-d-mps-9-mork-oracle (results, cost split, open verbs, slim_ptrs correction), STATUS_BOARD D-MPS-9 row, plan §7d, AGENT_LOG, regenerated entries index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. 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 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd62d55f37
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rsing Codex P2 on #1690: a 63-atom body or 63-term head passed admit and reached MORK's encoder, whose six-bit arity tag asserts a < 64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Exact-integer symbolic substitution (a = 2b, b = 2c, z = 2a gives z = 8c) compiled cold by egglog through its public API (proofs mode, prove-variants, every proof checked by egglog), lowered onto the existing R2IL scalar INT_MULT through FoldDialect, and compared with an independent i128 oracle. - Law domains are the contract's set_rules::Arith; the probe owns two laws (MulAssoc, ConstFold) whose rule id carries the domain. Checked and Ieee refuse reassociation; ConstFold is Exact only. - Extraction is egglog's own: non-target variables are (Def String :cost 1000), so the cheapest variant other than the goal's own name is the answer. - Falsifiers: missing premise refuses (UnboundVar, oracle None, egglog cannot prove 8c); overflow counterexamples refuse in Exact and Checked with the i64::MAX/8 boundary passing; a Wrapping term is not lowered onto checked arithmetic; extraction is deterministic; bounded fuel reports Incomplete. - No contract::Measure change, no new opcode, no egglog change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…xecuted P0 falsifiers #1696 merged (df214bb), so #1694/#1695 are no longer stranded; the contradictory-premise counterexample has been executed (14 vs 21 by premise order) and is fixed for linear E1 in #1698 (11ca3fe), together with the checked-overflow range guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Lab only. MORK stays behind the boundary module as the oracle; nothing is wired into Quack or R2IL, and the native execution path is unchanged.
This branch carries three pieces, in commit order:
query_multioracle.crates/egglog-r2il-probe/.1. D-MPS-9: MORK as differential oracle
mork-pathmap-probe/src/boundary.rs: a general MORK arm,mork_rules(facts, rules).OracleRule,OracleAtom,OracleTerm,OracleFacts). No crepe type enters the crate, and no upstream type leaves it.TupleSet, MORK's set semantics, oracle only) plusOracleCost.exec.exec, the body is parsed withSpace::parse_sexprand enumerated withSpace::query_multi, counting callbacks. That times MORK's unification alone, without text decode.boolis a continue flag (space.rs:1253,:1343,:1364).MORK_MAX_CHILDREN).crepe-plan-probe/src/mork_api.rs:to_oracle(rule)runsadmitfirst and returns its refusal unchanged. A constant aboveu32is refused by name (ConstOutOfRange).crepe-plan-probe/tests/mork_differential.rs(new, 7 tests):family;family_noisy;two_way;star3;to_oraclerefuses exactly whatadmitrefuses.crepe-plan-probe/examples/mork_split.rs(new): cost split, native vs MORK. It asserts answer-set equality first.Verification:
Okcallbacks,to_oraclewithoutadmit, and the arity guard removed.Cost split (n = 10,000; median of 5; Xeon @ 2.10 GHz, 4 vCPU, shared host):
Count(BAG)terminalBindings(BAG)handle (deferred)The MORK rows are oracle reference costs, not gates. See the open question below on reporting out-of-fold costs.
2. Stage A gap matrix (docs only)
entries/2026-10-22-math-compiler-gap-matrix.md: an inventory of egglog → R2IL pieces against falsifiers E1–E5, under D-RFT-2.3. Stage B: E1 end to end, probe-local (
crates/egglog-r2il-probe/)E1 is exact-integer symbolic substitution:
a = 2b, b = 2c, z = 2agivesz = 8c. It is not a population measure, so there is no SUM fold,contract::Measureis unchanged, and no opcode or egglog change is added. Coordinated on EXO-50 /043.The pipeline:
MulAssocandConstFold. The rule id carries the contract'sset_rules::Arithdomain:MulAssoconly;(run arith 1)stepped up tofuel, with a typedSaturated/Incomplete;prove-variantsgives the extraction plus a proof, which egglog checks before and after simplification.(Def String :cost 1000), so the cheapest non-trivial variant is the answer.INT_MULTthroughFoldDialect, in theprocs.rspattern.Results (13 tests):
(Mul (Num 8) (Var "c")), oneINT_MULT, equal to the oracle.INT_MULTs. The domain changes the program.UnboundVar), the oracle returns None, and egglog cannot provez = 8cwhile it can provez = 4b.Incomplete.Six disable runs, all red:
MulAssoc;Defwithout its cost;Overflowis mapped away;Cost: encode 2 µs, lower + execute 5 µs. The egglog phase is timed in
Compiled::timings.egglogbut deliberately not printed.Open
add_sexpr,remove_sexpr,dump_sexprandtransform_multi_multiverbs; the memory/sharing measurement; allocation counts (D-MPS-4).Measure::Scalestays gated on a real population-measure consumer, in a separate PR.Board:
entries/2026-10-22-d-mps-9-mork-oracle.mdentries/2026-10-22-math-compiler-gap-matrix.mdentries/2026-10-22-math-compiler-stage-b-e1.md🤖 Generated with Claude Code
https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg