Open and answer this issue on GitHub.
blocked, solver · opened 2026-11-07 · updated 2026-11-18 · 5 comments
Part of #599 (a standalone proof assistant that other languages can call). ADR-284 (a Nikaia library for other languages is one C artifact), ADR-270 D17 (the solver is a product of its own).
The solver (crates/nikaia-std/src/tools/sv_*.nika, logic_*.nika) becomes a C library, libnikaia_solver.so/.a with a generated nikaia_solver.h. It is built with artifact = "c-library" (Part III 15.1), as examples/c-library is. The interface is coarse: a whole query crosses in one call, and the answer, the model and the certificate come back into the caller’s buffer. This is the base of the JVM binding (ADR-284 D34, #1337) and of every other host.
packages/ call sv_check and the SMT-LIB reader (sv_smtlib.nika, logic_smtlib.nika) without copying the files?
packages/solver/ (name = "nikaia-solver", symbol-prefix = "nks").Result: blocked, Found: with the probe, Needs: supervisor decision; the question belongs with #478 (the logic layer as a package). Do not copy the solver’s files into the package.pub extern), one crossing per query:
pub extern struct Solver (an opaque handle) with Solver() and fn check(ref mut self, query: ref Bytes, budget: i64) -> Verdict sync. The query is SMT-LIB 2 text with one (check-sat). The budget is in the solver’s work units (D14), not in time.pub extern enum Verdict { Unsat, Sat, Unknown } (payload-free). What made an Unknown (overflow, unreadable, outside the logic, budget) is read through fn why(ref self) -> String.fn model(ref self) -> String: after Sat, the model as SMT-LIB (model …) text. fn certificate(ref self) -> String: after Unsat, the Alethe certificate (logic_alethe.nika). Both come back through the caller’s buffer, as ADR-284 D5 says.Unsat is returned, and every model is evaluated before Sat is returned, as scripts/solver.nika run does today. An answer that does not check is Unknown with why = "certificate rejected" or "model rejected".packages/solver/tests/*.nika with .stdout files, run by nikaia test. They call check, model, certificate and why on the four files of tests/solver/pre and on one unreadable file. The answers are the ones scripts/solver.nika run tests/solver/pre gives.packages/solver/examples/use.c, as examples/c-library/use.c does. It reads a .smt2 file, calls nks_solver_new, nks_solver_check, the model or certificate (with the size query), then nks_solver_free, and prints the verdict. The package’s README shows how to build and run it, and the issue records its output on tests/solver/pre.docs/measuring.md). That is the C caller on tests/solver/pre/* minus the solver’s own work, as scripts/solver.nika run --stats counts it. The boundary’s share of one query, as a fraction.nikaia build in packages/solver/ makes the shared and static library and nikaia_solver.h. The C caller gets the same verdicts as scripts/solver.nika run on tests/solver/pre, with checked certificates and evaluated models. The package tests pass. The boundary figure is recorded here.
packages/solver/ (its own version, ADR-344 D1). No change to crates/ unless the probe (item 1) or a defect demands it. A compiler defect is fixed in the compiler as its own commit (CLAUDE.md). A gap stops the work.tests/compiler/nikaia.contracts, nikaia.derived, and tools/emit_*/tools/check_*, where the compiler session works.push/pop, assumptions) can come later, beside check.Generated by Claude Code
From #1339 (e621704): the refinement lemmas of the non-linear solver are checked by sv_lemma.nika, but the sv log has no Alethe export yet, so a lemma schema’s Alethe counterpart is only named (sv_lemma_alethe), not emitted. The certificate this issue hands back needs that export for logs that contain non-linear lemmas.
Generated by Claude Code
Brief queued: issue-1336
agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —
Your work order is issue #1336, 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/1336/comments -F body=@file,
ending with the Claude Code footer), rule I13.
develop in the main checkout; other agents’ uncommitted files are not yours: never touch or stage them.target/fast/nikaia run scripts/commit.nika -- REPORT (it adds exactly the report’s Files:); the driver pushes.cargo build --profile fast -p nikaia, lower-std and its fixpoint when a tools/*.nika changed, cargo fmt, cargo clippy --all-targets -- -D warnings, nikaia run scripts/pre-push.nika, the tests the issue names and the ones your change touches.CHANGELOG.md, badges and NK codes are the supervisor’s. New tests in Nikaia only: a Rust test file an older issue names is built as a tests/compiler/tests/ program, no Deviation: and no Issue: point (I9, #1671).Body:. Found: is only for what lies outside the area, cannot be fixed this run or needs a decision; the driver files it as an issue.std or the toolchain lacks stops the work, unless an ADR or Part I-III refuses it (name it): Result: blocked, Found: the gap with a probe, Needs: supervisor decision.NIKAIA_CACHE_LIMIT=2G; at the end delete your own clone’s target/ and target/release/nikaia-scratch.suspected, or does not mark (docs/issues.md I7), is a hypothesis: run the check that settles it (nikaia run scripts/where.nika -- NAME, the probe with a trace, callgrind for a cost) before you build on it (owner, 2026-11-16). Shown false: say so in Issue: as wrong I7: <what the check showed> (the driver comments it on the issue) and follow the real cause.Result: partial with what you ruled out, the probe, and the suspected file and function./home/user/Nikaia/docs/briefs/solver/issue-1336.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.
Result:, Gate: (green or red <check>), Deviation:, Found: and the other fields with nothing to say hold the bare word: done, none. Anything after it reads as content.Result: done only when the issue’s Done when holds; partial with the items left otherwise.Deviation: only for an item of the issue built otherwise than written, or not built. Found: only for a defect outside your area, or one this run cannot fix: one defect per Found: line, with its probe and the output it gives, only the shapes that fail today, and the suspected file and function or cause unknown (#1695); a by-design behaviour is none (#1677). A correct program your own change refuses (a fail-closed check’s false refusal) is no Deviation: but one Found: line per shape, with its probe (#1680). Everything else goes into Body:; how you verified goes into Tests:.Issue: by docs/issues.md, How a run judges its issue: complete, or broke I<n>: ..., rules-gap: ..., wrong I<n>: ..., joined with ;; a point your own commit built gets (built) after its kind (rules-gap (built): ...), and the driver does not file it. complete is the bare word: prose after it (complete; the earlier runs ...) is filed as an improvement issue (#1931); history or a note for your own issue goes into Body: or Comment: #N <text>.done <sha>, report <path> (or BLOCKED: ... / PUSH REJECTED ...).Generated by Claude Code
Run: issue-1336, Result: blocked
Tokens: input 24, cache read 541855, cache write 43241, output 4108 Cost: 0.57 USD, time 0 min 54 s, turns 12
Result: blocked
Files: none
Commit: none
Pushed: none
Tests: item 1 probe only, on target/fast/nikaia (copied to $S/old/nikaia; binary predates only 459d8141c, a bounds change unrelated to manifests or std modules); nothing built or committed
Gate: green
Deviation: none
Found: a package cannot reach the solver without copying its files (#1336 item 1): a scratch package with nikaia.toml [package] name = "solverprobe" version = "0.1.0" plus [dependencies] compiler = { path = "/home/user/Nikaia/crates/nikaia-std/src/compiler" } and src/main.nika use compiler / fn main() throws { let r = compiler::sv_smtlib_read("(assert false)\n(check-sat)\n"); println("read") } fails on nikaia run with Error: reading .../crates/nikaia-std/src/compiler/nikaia.toml: No such file or directory (the compiler dir is not a package); the same main with use std::compiler is error[NK1186]: std has no module called std::compiler ... compiler is the toolchain's own, not std's. ADR-270 D24 decides the logic layer is a package any package may depend on, which is not built yet (#478)
Needs: #478
Changelog: none
Issue: rules-gap: the probe item 1 orders is a dependency on #478 (ADR-270 D24, logic layer as a package, decided but unbuilt), which the issue should name as Needs #478 so the driver does not start it before then
Owner: none
Comment: #478 #1336 (the solver as a C library) is blocked on this: a package cannot depend on crates/nikaia-std/src/compiler (no nikaia.toml), and use std::compiler is NK1186; #1336 needs the solver files (sv_, logic_, prover_arena, solver_terms, prove_text) reachable as a package under ADR-270 D24
Friction: none
Disk freed: none (target/nikaia-project-tests absent; / 5.1G free of 252G)
Attribution:
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UVxJDwk9ubq9teP7QCErff
scripts/solver.nika puts it together. The issue gives crates/nikaia-std/src/tools/sv_*.nika, but the files are in crates/nikaia-std/src/compiler/. I also spent two grep turns on the spec’s manifest keys, and their output was too large to read.[dependencies] path form (Part III), whether std::compiler exists, and ADR-270 D24, which decides the logic layer becomes a package. The brief could have said “#478 / ADR-270 D24 not built; the compiler directory has no nikaia.toml”.use std::compiler.git log -400 --grep='Fixes #478' to confirm it is still open. I judged it unbuilt from the refusals alone.Needs #N.”rules-gap: it does not name #478 as Needs #478, although its own step 1 depends on it.wrong I3 (file locations): tools/sv_*.nika and logic_*.nika are now in crates/nikaia-std/src/compiler/.rules-gap: no ready-made probe snippet for item 1.| Fact: Core | crates/nikaia-std/src/compiler/ is no package (no nikaia.toml) and use std::compiler is NK1186, so no package can call the solver or the logic layer until ADR-270 D24 / #478 is built. |
| Fact: Core | The solver runs standalone only as one program that scripts/solver.nika puts together (solver_logic_files, solver_engine_files, solver/sv_rod.nika), reading the files in place. |
Generated by Claude Code
Driver: not queued, this issue waits for #478, #1946, which is still open (#1819). Set ready again when it is closed.
Generated by Claude Code
From the report of the run of issue-2020 (#2020):
the solvers are the package logic now (packages/logic/src), so the blocker the move held is gone
Generated by Claude Code