Open and answer this issue on GitHub.
ready, solver · opened 2026-11-16 · updated 2026-11-23 · 2 comments
Filed by the driver from the Found: of the run of issue-1718 (#1718) (owner, 2026-11-06).
The rule decided for #1718 (“every non-negative element of place is below heap.len()”, kept across heap.truncate where the method writes -1 to the element that pointed past the new end) is not inductive, so it cannot be proved as a found rule under ADR-369 D4: from heap=[0,1], place=[0,1,1] (the rule holds) the issue’s pop (top=heap[0]; last=len-1; moved=heap[last]; heap[0]=moved; place[moved]=0; heap.truncate(last); place[top]=-1) leaves place[2]=1 with heap.len()=1, so bump(2) indexes heap[1] out of bounds; which element pointed past the new end is known only through the pair link heap[place[v]] == v (with place[heap[p]] == p), a relation between two lists that the prover cannot state (prover_arena.nika has only Int, Var, Le, Lt, Ge, Eq over linear terms, no array read or write) and that sv_sat’s heap_up/heap_down sift loops break inside the loop (the hole slot), so it would also need loop invariants over arrays. Probe, check –bounds: struct H { heap: Vec[i64], place: Vec[i64] }\n\nimpl H {\n fn up(mut self, i: i64) sync {\n self.heap[i] = 0\n }\n\n fn insert(mut self, v: i64) sync {\n if v >= 0 && v < self.place.len() {\n self.place[v] = self.heap.len()\n self.heap.push(v)\n }\n }\n\n fn pop(mut self) sync {\n if self.heap.len() > 0 {\n let top = self.heap[0]\n let last = self.heap.len() - 1\n let moved = self.heap[last]\n self.heap[0] = moved\n if moved >= 0 && moved < self.place.len() {\n self.place[moved] = 0\n }\n self.heap.truncate(last)\n if top >= 0 && top < self.place.len() {\n self.place[top] = -1\n }\n }\n }\n\n fn bump(mut self, v: i64) sync {\n if v >= 0 && v < self.place.len() && self.place[v] >= 0 {\n self.up(self.place[v])\n }\n }\n}\n\nfn main() throws {\n let mut h = H { heap: [], place: [-1, -1] }\n h.insert(1)\n h.bump(1)\n h.pop()\n println(f"{h.heap.len()}")\n} gives line 5 self.heap[i] checked (ADR-391 D1); the decision expects it proved. No decision yet: build a permutation-pair rule kind with array terms in the prover (a new theory, larger than one run), or leave sv_sat.nika 960, 967, 971 checked.
supervisor decision: the decided “non-negative elements below len, kept across truncate” rule cannot be proved inductive without the permutation link heap[place[v]] == v; decide between a permutation-pair rule (array terms in prover_arena plus loop invariants for the sift loops) or leaving sv_sat.nika 960, 967, 971 checked
develop first: the run that wrote it may have used a binary older than the tip, so it may be fixed already (#1822: #1788 was filed from a probe a fix under #1754 had already made pass). A probe that passes there names the commit that fixed it (git log -400 --grep by topic, since a fix often lands under another issue’s number), and the run builds only a tests/compiler/tests/ test that pins it (docs/issues.md I13).std defect with a probe (nikaia run scripts/probe.nika -- SNIPPET; a lowered file that differs, with an uncached lower-std of a git archive HEAD copy, NIKAIA_LOWER_CACHE_SALT fresh and --sysroot COPY/crates, its lowered/ diffed against the copy’s, never the shared working tree’s, #1793), a defect in docs/, guide/, website/ or scripts/ (a stale example, a wrong rule) with the command or check that shows it; a behaviour the code does on purpose (name the function or ADR) closes it as by design. The Found line may lack them (#1710): the commit message, or the report’s Body: when closed, gives the probe or check with its expected output, the ADR or Part I-III section that says so, and its actual output (docs/issues.md I5, I6), and the cause, file and function, traced or suspected (I7).std defect in the compiler, a stale page example or rule in its page or docs/ file, a script defect in the script. Add a test in tests/compiler/tests/ unless a check that already runs turns red on it (name it: pre-push’s page-examples for guide/ and website/, check-adr-refs.py for a docs citation).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
From the report of the run of issue-1891 (#1891):
The rule for the I8a gap behind this decision is in docs/issues.md (#1891): a decided field rule is checked as an induction step from any allowed state, and a relation it leans on that the prover cannot state is a decision, not an item.
Generated by Claude Code
Decision (owner, 2026-11-23): option A is built. The aim is that the prover proves every index of the program by itself, with an invariant written by hand only in rare cases. Leaving the three sites checked is refused.
Where #1890 stands among the open work: nikaia check --bounds over packages/logic on 1c580ed6b reports 1353 indexes, 624 proved. Of the 729 unproved indexes, 173 stop at “a value read out of a list, of which the walk knows no fact”: 133 elements of a named list (ADR-306 D7, D21), 20 elements of a call’s result (D24), 20 other reads. This is the largest class with one cause. heap[place[v]] is its hardest case, because only the coupling of two lists proves it.
packages/logic by the rule that would prove each one: (a) the elements of Y stay in 0..X.len(), and the rule is inductive (X only grows, or every write to Y is checked against X.len()); (b) the same with -1 allowed, read after a >= 0 test; (c) a permutation pair X[Y[v]] == v and Y[X[p]] == p (heap and place, index maps); (d) something else, named. Each site gets file and line. The table goes into the report and into docs/solver-workload.md.Found rule: a list of positions whose non-negative elements … (#1718) where it is inductive.prover_arena.nika: a read X[t] as a term, and the rule that two reads of the same list at equal indices are equal), then the permutation-pair rule (c), with the loop invariants over the sift loops of heap_up and heap_down. This proves sv_sat.nika 960, 967 and 971, and unblocks “bounds: an index taken from another list’s element” (#1668). Step 3 starts with its own design text (an ADR on array terms), which the supervisor writes before the build.Steps 1 and 2 are a builder run each; step 3 is split once its ADR stands.
Done when: the survey’s table is in docs/solver-workload.md, every site of kinds (a) and (b) is proved, and sv_sat.nika 960, 967 and 971 are proved.
Generated by Claude Code