Open and answer this issue on GitHub.
blocked · opened 2026-10-06 · updated 2026-10-06 · 1 comment
While deciding the NULL rule for dsl … -> T (#477, ADR-299 D18), the question was how a really good driver finds out that a column cannot be NULL. For example:
WHERE (email IS NOT NULL OR age > 30) AND age <= 30
Here email is never NULL, but only via age > 30 ∧ age ≤ 30 ⇒ false. That is linear integer arithmetic with ∧ ∨ ¬, which nikaia-logic answers.
The encoding:
0/1 variable n_c per nullable column;W(where), and the goal is n_c = 0.What was checked:
std, so that another language or tool can feed it.crates/nikaia-logic, used only by prove.rs. A driver cannot reach it, and as a Rust crate it may not run at build time (ADR-321 D9).The three points, in ADR-270 and Part III 14.2:
verify. Not public: solvers, representation, strategy.nikaia.proofs. It gets the reference solver’s answer under a budget counted in work, the same on every machine. unknown proves nothing; in a driver, the column stays nullable.std::logic.Still open:
use.Prerequisite: ADR-270 D8 step 2, the reference solver in Nikaia.
Arena, Term, TermId), Query, the answer, verify.FourierMotzkin, the later CDCL(T) core) private to the package.unknown when it is spent.comptime.comptime that proves x > 30 ∧ x ≤ 30 ⇒ false builds and records nothing in nikaia.proofs.sync and touches = [] (ADR-321 D8), so NK1152 does not fire.nikaia.lock.--locked passes with such a comptime and an unchanged lock.sqlite driver (#117) uses it for WHERE nullability:
unknown means nullable;OR/AND example and for a LEFT JOIN.The prerequisite is decided: ADR-321 D13 lets a grammar call its own package’s functions and its Nikaia dependencies, so a driver can ask the logic package. Build: #479.
Generated by Claude Code