Disjoint proof builtins + void-call / float-arg codegen fixes¶
Summary¶
Registers disjoint_elem, disjoint_row, disjoint_slice, and row_ok as compiler proof builtins; fixes CallProc codegen for -> unit calls and float literal args; restores generic return checking and li-tests green (146/146).
Agent continuation¶
- Read
compiler/types/typecheck.cpp(disjoint builtins, generic return check,str→ptrforextern),compiler/codegen/emit.cpp(CallProcvoid/float coercion),compiler/mir/lower.cpp(FloatLitcall args). - Run
LI_REPO_ROOT=$PWD cmake --build build && LI_REPO_ROOT=$PWD ./li-tests/run_all.sh(expect 146 pass);./li-tests/run_httpd_config.shif touching httpd (unchanged here). - Then Phase 7d-c: structured
disjoint=on AST (replacepolicy.cppstring heuristics); optionalstd/execution/disjoint.listubs for docs only. - Blocked on httpd package PRs #84 / #87 — do not edit
packages/li-http/**,packages/li-net-httpd/**, orruntime/li_rt_httpd.cserve/epoll paths in parallel.
Changed¶
| Path | What |
|---|---|
compiler/types/typecheck.cpp | Builtin disjoint_* / row_ok → bool; generic return E0202; str actuals for ptr/extern params |
compiler/types/prelude.cpp | Reserve disjoint proof names (E0330 shadow) |
compiler/codegen/emit.cpp | Skip store on void CallProc; float literal + f32/i32 arg coercion |
compiler/mir/lower.cpp | FloatLit in CallProc args; no dest temp for -> unit calls |
compiler/mir/include/li/mir.hpp | MirArg.is_float_literal |
li-tests/generics/return_mismatch.li | ensures result == 0 so generic mismatch surfaces |
Not changed¶
packages/li-http/**,packages/li-net-httpd/**,runtime/li_rt_httpd.c(other agent).- Lean kernel discharge (G-lean) or removal of
policy.cppdisjoint string scans (7d-c full). var RigidBodywrite-back acrossCallProc(still by-value scalar expansion).
Breaking¶
N/A — fixes latent codegen/typecheck gaps; parallel/disjoint tests that already compiled keep behavior.
Security¶
N/A — proof builtins are compile-time hooks only (no runtime trust change).
Performance¶
N/A — no hot-path change; li-tests/run_all.sh full manifest ~146 tests.
Downstream¶
- Composable
import_physics_runtime.linow builds (was SIGSEGV on voidrigid_integrate_semi_implicitcall). - Bootstrap
bootstrap/lic/main.libuilds withstrcmp(li_rt_argv(1), "--version").