Issue #2101: QF_LRA LassoRanker…

Open and answer this issue on GitHub.

blocked, solver · opened 2026-11-18 · updated 2026-11-22 · 8 comments

Filed by the driver from the Found: of the run of issue-1964 (#1964) (owner, 2026-11-06).

Found

QF_LRA LassoRanker SV-COMP-HarrisLalNoriRajamani-2010SAS-Fig1_true-termination.c_Iteration1_Lasso_4-pieceTemplate.smt2 (z3 unsat 1.5 s): on HEAD 810fdc027 it stops by design at lg_budget (unknown (cases) 1028), and with cases: 1000000 in logic_lia.nika lg_budget it ends unknown (overflow) 3634 (--engine new-simplex the same, new-fm unknown (theory) 0); traced: SvSimplex::feasible (sv_simplex.nika:731), where every entering candidate’s pivot fails because sv_row_eliminate/sv_row_combine leaves i64. ADR-270 D11 says a measured set with overflow unknowns reopens the number decision; no decision yet on a wider number (a high-half product method, per D11’s correction of 2026-11-10) or a smarter pivot choice that keeps tableau rows small, nor on whether the case budget should cover a file needing more than 3634 cases

Needs

supervisor decision

To build

Done when

The probe or check gives the expected output the first item names from its ADR or Part I-III section, and a tests/compiler/tests/ test (or the named check) that failed on the unfixed tree is green; or the probe already passes on develop and a test pins it, naming the commit that fixed it; or the issue is closed as by design, naming the function or ADR.


Generated by Claude Code

Comments

keywan-ghadami, 2026-11-21

Supervisor decision (2026-11-21), by ADR-270 D11 as corrected by the owner on 2026-11-10: no wider number type now. D11 orders the smarter way first, and this issue builds it. Only an overflow still measured after it reopens D11, and that goes to the owner.

Re-measured on develop 5fa404665: compare --timeout 30 on the file gives ours overflow 1 and z3 solved 1 (1.3 s). The same lever is wanted by QF_LRA clock_synchro (#2397), where 3 of 4 files end overflow in under 300 ms.

To build

Done when

The LassoRanker file is proved within compare’s 10 s with its certificate checked, or every overflow left is shown to have no other pivot, variable or split (one Found per set for the owner); the clock_synchro numbers are reported; the new tests are green.


Generated by Claude Code

keywan-ghadami, 2026-11-21

Correction to the To build list above, item 3: std already has the method D11 points to. “Integers say whether a step overflowed and give a product’s high half (overflowing_*, widening_mul)” (#1555) is built, and “Integers divide a double-width value by a single-width one (narrowing_div_rem)” (#2013) too; “The integer elimination combines rows in double width where a product leaves i64” (#2307) already uses them for QF_LIA. Item 3 therefore is not to build: the simplex (SvSimplex::feasible, sv_row_combine, sv_num.nika) uses overflowing_mul / widening_mul and narrowing_div_rem the way #2307 does, where item 2’s ordering leaves no step inside i64.


Generated by Claude Code

keywan-ghadami, 2026-11-21

The double-width step this issue needs is now a std type, “Integers have an exact double-width value, Wide[T], in std” (#2619), queued just before this one (owner, 2026-11-21; Part I 2.2, ADR-270 D11 amended). Build the simplex’s overflowing products on Wide[i64] (Wide::product, add, rem, div_rem, narrow), not on the widening_mul tuples of sv_num.nika.


Generated by Claude Code

keywan-ghadami, 2026-11-21

Brief queued: issue-2101


agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —

Issue #2101

Your work order is issue #2101, inlined below with its comments. There is no brief written around it: plan your own steps from its To build list, build them in order, commit after each finished step, and end when its Done when holds (or at the limits of builder.md, reporting what is left). The facts in your prompt are Core of docs/builder-facts.md; more on a topic: nikaia run scripts/syntax.nika -- KEYWORD, a probe: nikaia run scripts/probe.nika -- SNIPPET.

Measure the issue against docs/issues.md while you work: what it lacked, what was wrong in it. That answer goes into the report’s Issue: field. A finding, a changed plan or a finished item also goes into the issue as a comment (gh api repos/Nikaia-Foundation/Nikaia/issues/2101/comments -F body=@file, ending with the Claude Code footer), rule I13.

Rules (CLAUDE.md; shared checkout)

Report (at most 15 lines, to exactly /home/user/Nikaia/docs/briefs/solver/issue-2101.md.report.md)

Fields: Result, Files, Commit, Body (optional), Fixes, Pushed, Tests, Gate, Deviation, Found, Needs, Changelog, Issue, Owner (a question for the owner), Comment (#N <text>, what to say on another issue; the driver posts it, one line each), Friction, Disk freed, and last Attribution: with your commit trailer lines below it.


Generated by Claude Code

keywan-ghadami, 2026-11-21

Run: issue-2101, Result: done

Tokens: input 194, cache read 6345545, cache write 155088, output 51843 Cost: 3.74 USD, time 3 min 44 s, turns 97

Report

Result: done Files: packages/logic/src/sv_simplex.nika packages/logic/src/sv_num.nika crates/nikaia-std/src/compiler/lowered.rs crates/nikaia-std/src/compiler/lowered/logic/lowered.rs crates/nikaia-std/src/compiler/lowered/logic/lowered/sv_num.rs crates/nikaia-std/src/compiler/lowered/logic/lowered/sv_simplex.rs packages/logic/nikaia.contracts packages/logic/nikaia.derived packages/logic/nikaia.lock packages/logic/nikaia.proofs Commit: Simplex: a pivot that leaves i64 waits for another violated row (ADR-270 D11) Body: feasible tries every other violated row (lowest variable first, violated_all, pivot_row, SvPivoted) before answering overflow; refresh computes a row value in Wide[i64] (row_value_wide, sv_wide_ratio) where only partial sums leave i64; no wider number type and no new std method. Overflow count per set unchanged (LassoRanker 1, clock_synchro 1): a trace shows each one left has every pivot of every violated row leaving i64 or a value that does not fit i64 even reduced, and LRA has no split. Part: #2101 Tests: packages/logic whole 53 passed; new “a pivot that leaves i64 waits for another violated row” failed on the unfixed sv_simplex (unknown (overflow), 0 pivots), passes now; new “a double-width numerator over an i64 is reduced or refused” passes; lower-std fixpoint holds; clippy and pre-push green; compare –timeout 10 at f2867f355+change: LassoRanker ours overflow 375ms (z3 unsat 1242ms), clock_synchro ours 3 solved 1 overflow (9clocks.induct 562ms; z3 times out on it). Gate: green Deviation: the second Done-when alternative holds, not the first: LassoRanker is still not proved; with –cases 1000000 overflow comes at 5709 cases (was 5830), 9clocks.induct at 3720 (was 1549). Found: LassoRanker SV-COMP-HarrisLalNoriRajamani-2010SAS-Fig1 Lasso_4-pieceTemplate (nikaia run scripts/solver.nika -- compare --timeout 10 --files target/smtlib/qflra/LassoRanker gives ours overflow, z3 unsat) overflows with every pivot of every violated row leaving i64 even in double width and values that do not fit i64 even reduced: the 1073741823.0 template constants, after equality elimination, give tableau coefficients near 2^62; traced in packages/logic/src/sv_simplex.nika feasible/refresh; ADR-270 D11 reopened for the owner (a wider number type or rationals beyond i64), no decision yet. Found: clock_synchro clocksynchro_9clocks.main_invar.induct.smt2 (nikaia run scripts/solver.nika -- compare --timeout 10 --files target/smtlib/qflra/clock_synchro gives ours overflow 562ms, expected unsat by its status line) overflows the same way: every pivot of every violated row leaves i64, then a refresh value past i64; traced in packages/logic/src/sv_simplex.nika feasible; ADR-270 D11 reopened for the owner, no decision yet. Needs: owner decision on ADR-270 D11 (values beyond i64) for the two overflows left Changelog: Simplex: a pivot that leaves i64 waits for another violated row | ADR-270 D11: before answering overflow, the simplex tries every other violated row’s pivots, and computes a row value in double width where only partial sums leave i64. (#2101) Issue: wrong I7: “3 of 4 clock_synchro overflow” no longer holds at f2867f355: 3 are proved before this change, only 9clocks.main_invar.induct overflows; LassoRanker without –cases ends unknown (cases) 1042, not overflow. Comment: #2101 D11 pivot ordering built; overflow left per set: LassoRanker 1, clock_synchro 1 (9clocks.induct); each has no other pivot, variable or split (traced), so D11 goes back to the owner. Friction: the rod swallows the solver’s stderr, so tracing needed the kept binary target/solver-rod//solver_rod run by hand. Disk freed: none; target/nikaia-project-tests 1.7G, / 15G free of 252G, no new cache entry over 100 MB Reviewed: e90928397b10d2090a66f8907137c9c1359295c8c41b92216a2852eaea2266eb Pushed: local d7fb873730dd39778b126f800da8febc251e8950 Attribution: Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UVxJDwk9ubq9teP7QCErff

Debrief

  1. Most turns: tracing which overflow fired. The rod hides the solver’s stderr, so I ran the kept target/solver-rod/<key>/solver_rod by hand and tagged every self.overflow() site with its line. A tiered coefficient-cap attempt also cost a full measure round before I reverted it.
  2. Looked up:
    • the rod’s --cases flag: without it, LassoRanker stops at the case limit (unknown (cases)), not on overflow;
    • the meaning of sv_simplex_test_le(ks, c) (Σ + c ≤ 0), which I first got wrong in the test;
    • the Wide[i64] API from #2619.
  3. Checks: the package test with --filter, the whole package once, the lower-std/build/fixpoint cycle, clippy, pre-push, compare, before/after rod runs. Wasted: the test run where my mistyped constant left the row unviolated, and the capped variant’s full rod measure.
  4. Brief change: “Find a solver overflow: run the kept binary target/solver-rod/*/solver_rod --stats new:cases=1000000 FILE directly (stderr shows), tag overflow sites with eprintln.”
  5. Issue lacked:
    • wrong I7: “3 of 4 clock_synchro overflow”; at f2867f355, 3 were already proved, only 9clocks.main_invar.induct overflows.
    • broke I5: the issue gave no measure command with the --cases setting that reaches the overflow; without it LassoRanker ends unknown (cases) 1042.
    • knowledge: Solver | The overflow coefficients come from 2^30-1 template constants that equality elimination moves onto shared variables.
  6. Traps:
    • Fact: Core | A "$S" set in one Bash call is empty in the next, so cp $S/x writes to /x and a later > $f redirect can truncate a source; set S in every call.
    • Fact: Solver | sv_simplex_test_le(ks, c) means Σ ks·x + c <= 0, so the constant goes on the left with its sign.
  7. Work area:
    • Fact: Solver | Measure: nikaia run scripts/solver.nika -- compare --timeout 10 --files target/smtlib/qflra/LassoRanker target/smtlib/qflra/clock_synchro.
    • Fact: Solver | 2026-11-21, d7fb8737: LassoRanker ours overflow 375 ms (z3 unsat 1242 ms); clock_synchro 3 solved, 9clocks.induct overflow 562 ms (z3 timeout).
    • Fact: Solver | 2026-11-21, with --cases 1000000: LassoRanker overflow at 5830 cases before / 5709 after; 9clocks at 1549 / 3720.
    • Fact: Solver | Key files: packages/logic/src/sv_simplex.nika (feasible, pivot_row, refresh) and sv_num.nika (sv_wide_ratio).

Generated by Claude Code

keywan-ghadami, 2026-11-21

From the report of the run of issue-2101 (#2101):

D11 pivot ordering built; overflow left per set: LassoRanker 1, clock_synchro 1 (9clocks.induct); each has no other pivot, variable or split (traced), so D11 goes back to the owner.


Generated by Claude Code

keywan-ghadami, 2026-11-21

From the report of the run of issue-2657 (#2657):

The last two qflra overflows (LassoRanker Lasso_4-pieceTemplate, clocksynchro_9clocks) come from simplex pivot growth, not from equality elimination: sv_pre skips LRA queries. Coefficients go 2^30 to 2^62 in 447 pivots and 1998 to 6e18 in 468; three pivot rules all overflow (run of #2657)


Generated by Claude Code

keywan-ghadami, 2026-11-22

Supervisor (2026-11-22): the D11 pivot ordering is built (run of 2026-11-21); the one overflow left has no other pivot, so what remains is the owner’s decision “Decision: may the LRA simplex hold numbers wider than i64 for the last two QF_LRA overflows? (ADR-270 D11)” (#2671). Blocked until #2671 is closed.


Generated by Claude Code

Back to Open Issues