From 4ae7a09566d91f2b99e92065017b6d37d983f3e6 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 19:40:22 +0000 Subject: [PATCH] =?UTF-8?q?docs(adr):=20ADR-028=20=E2=80=94=20classify=20U?= =?UTF-8?q?-G1=20as=20an=20exclusivity=20failure=20in=20the=20P-3=20obliga?= =?UTF-8?q?tions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review follow-up: 18 of the 19 programs fail inclusion or liveness; U-G1 satisfies inclusion and fails exclusivity. Refs #553 Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01J4QvDhbgRrAKkgnpxRAfum --- docs/decisions/0028-polonius-v1-decision.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/decisions/0028-polonius-v1-decision.adoc b/docs/decisions/0028-polonius-v1-decision.adoc index 1217af41..aece4b53 100644 --- a/docs/decisions/0028-polonius-v1-decision.adoc +++ b/docs/decisions/0028-polonius-v1-decision.adoc @@ -415,7 +415,7 @@ Yes, as its specification, and that is where it is most useful. What changes for users:: Nothing. Soundness exposure:: Unchanged until a checker is proved against it. -Proof obligations:: Provenance inclusion is one lemma of P-3, not the whole of it. A checker can track every loan and still accept a conflicting access. Full P-3 for a checker needs three parts: (1) *inclusion* — the tracked set contains the provenance fibre; (2) *liveness* — a tracked loan is treated as live at every point where a reference carrying it may still be used; (3) *rejection* — every access or move that conflicts with a live tracked loan is rejected, and the end of an owner's scope counts as a conflicting event for every live tracked loan on it (owner validity: `K-5` is the control, `U-A6` the accepted counterexample). Parts 1 and 2 are where the 19 known programs fail; part 3 is what the controls exercise. Together they would replace the present Coq theorem that holds by definition. New obligation for part 1: an Agda module, under `--safe --without-K --cubical-compatible`, defining the provenance map for a small reference calculus and proving the tracked set contains the fibre. +Proof obligations:: Provenance inclusion is one lemma of P-3, not the whole of it. A checker can track every loan and still accept a conflicting access. Full P-3 for a checker needs three parts: (1) *inclusion* — the tracked set contains the provenance fibre; (2) *liveness* — a tracked loan is treated as live at every point where a reference carrying it may still be used; (3) *rejection* — every access or move that conflicts with a live tracked loan is rejected, and the end of an owner's scope counts as a conflicting event for every live tracked loan on it (owner validity: `K-5` is the control, `U-A6` the accepted counterexample). Parts 1 and 2 are where 18 of the 19 known programs fail. `U-G1` is the exception: it satisfies inclusion and is an exclusivity failure, so it falls under part 3, which must include that an exclusive reference cannot be duplicated (R4). Part 3 is also what the controls exercise. Together they would replace the present Coq theorem that holds by definition. New obligation for part 1: an Agda module, under `--safe --without-K --cubical-compatible`, defining the provenance map for a small reference calculus and proving the tracked set contains the fibre. What the planned Agda experiment could change:: If the statement is provable for the second-class fragment, option D gains a real proof target and its dependability rank improves. If the experiment finds a program inside that fragment whose fibre escapes the tracked set, D fails and the recommendation moves to E. If aggregates turn out to be cheap to handle as a map over fibres, the constraint-design gap in option A narrows. Result of the Agda experiment (reported 2026-12-01 by the experiment session; draft PR https://github.com/hyperpolymath/affinescript/pull/854[#854], record `formal/agda/BORROW-PROVENANCE-EXPERIMENT.adoc`; relayed here, not re-run):: In a toy model, the fibre statement is proved for programs obeying option D's rules (`G-holds : (p : Prog) → D p → G p`), with a safety theorem and a proof that a stuck D program is rejected. A later revision of the experiment (PR head `3b9b230`) adds exclusivity for D with R4: in an accepted program, two usable references to one place are both shared. It shows `U-G1` satisfies the fibre statement and fails only R4, so `U-G1` is an exclusivity failure, not a provenance one; `D-01`, `D-06` and `D-19` are provenance failures. Completeness is not claimed. Four of the unsound kit programs were encoded; each violates D, falsifies G and gets stuck. So the model does not by itself trigger the fallback to E. The limits it reports: the model's checker is not `lib/borrow.ml`; Agda 2.6.3, not the pinned version; no Rocq or Lean recheck; no receipt. It also confirms the liveness reading above (a per-place, per-kind zero/non-zero count carries the verdict; maintaining it needs the per-reference set) and adds that a one-slot aggregate behaves as a reference binder. The same session measured the production checker and found the three further programs of <>.