rfc: define shared enum and nested owner observation candidate

This commit is contained in:
dev committed 2026-10-09 09:03:12 +03:00
1 parent a5f84eb170
commit d041c07ad2
4 files changed
+164

No files matched your search

+4
View File
@@ -339,3 +339,7 @@ Q-054/RFC 0039 Draft identifies the missing executable contract model. Public pr
The next design increment prefers leading `contract.pre/old/post` operations, isolated uses currently E0004, with no entry predecessors, contract-only snapshots and per-return access checks. The candidate specifies pending-return dispatch, ordinary fuel/quantum accounting and temporary observations without resurrecting consumed values. Current ordinary observations before returning an owner accept and preserve 42; observing its old binding after a call transfer rejects E2001. Verified invariant probes return width 10 after a repaired exclusive update, expose an invalid mid-update Copy and trap T0003 in a shared reader. Source struct-zero rejects E7006, while AIR struct-zero accepts; Q-056 records that separate surface question. Claude independently reviewed the candidate and identified dispatch/availability clarifications. A body use of an unknown snapshot additionally yields E5001; use only by a post yields E0004s alone. Q-055 retains the invalid body-use rejection-code audit. All twelve targeted probes match their reported results, and local documentation links/diff checks pass. These are current-language probes of design obligations, not conformance tests for an implemented contract feature. Type/module boundaries, predicate closure and status rules remain open; Draft status and the full P6-6 exit criterion are unchanged.
The purity increment supplies a closed opcode/type candidate, authority-free Copy Data (including opaque iref identity), and greatest-fixed-point call closure. Read-only linear-record fields are admitted without loading owners/capabilities; auxiliary mut helpers can write fresh frame scratch, proved from entry signature restrictions and ordinary borrow rules. No write-summary subsystem or totality proof is claimed. Current probes confirm a scratch/helper/hash predicate (1), linear count read (7), identity after graph destruction (1), accepted Copy capability extraction, and E1001 for borrowed linear variant/nested owner inspection. Mutual recursion returns 1; nontermination is stopped by fuel and recursive frame exhaustion by T0007. Claude independently reviewed the freshness proof and identified the need to freeze predicate classification under §8.7; proposed feature dependencies and immutable classifications are explicit. Q-057 records the missing non-consuming observation surface required before full contract coverage. Type/module invariants, audit statuses, diagnostics and vertical implementation remain open; RFC 0039 stays Draft and normative bundles are unchanged.
RFC 0040 Draft develops Q-057 as a separate vertical prerequisite: selective shared enum dispatch and nested scalar/array owner views. Explicit `match ref place` creates only named payload views; skipped payloads stay owned, with no partial moves or general borrowed block joins. Current probes confirm a legal 65-payload enum returning 0 and E5101 for its value match. Unknown enum-view forms report E0004 alone; isolated owner-view forms report E0004, and a used owner-view result also reports E5001. All seven baseline probes are checked with the existing compiler; executed programs use fuel 10,000. Q-055's dependent-error interpretation remains open. These Draft rules allocate no feature/code and change no normative bundle, compiler or conformance fixture; type/module invariants, contract statuses and full P6-6 delivery remain open.
Claude independently reviewed RFC 0040; corrections preserve existing E0004 name lookup, distinguish E2102 SSA origins from E2108 frame roots, count unreachable ingress and clarify unchanged complete-state joins and pattern-binder status. Three further source probes independently confirm both ref-parameter place spellings (combined result 6), wrong SSA-root return E2102 and Copy-frame escape E2108. All ten probes confirm only current-language constraints, not the proposed operations' implementation.