You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b2f4131
Browse filesBrowse the repository at this point in the historyBrowse files
resource-effects Stage 3: the inference suite and the E3 mixed-return rule
EXPLORATORY (research/resource-effects-v1; pre-registered in Own.NET-paperwork
stage3-inference-prereg-v1.json). E3 / INF-R3prime in both engines behind
OWEN_RE_MIXED_RETURN=1: a mixed return skeleton whose every returned local
is acquired here or bound to one first-party callee's result is a forward
to that callee (fresh iff the callee is fresh); verdict-identical off.
corpus/re-inference/t-suite.cs carries the 14 pre-registered tests; the
controls test pins the suite's verdicts under the body arm with and
without E3. Measured (stage3-inference-v1.json): 13 of 14 met with
Python == Rust in every arm; T12 (mutual recursion) resolves to unknown by
the spec's fail-closed cycle rule INF-F5 (not repaired); the fact-level
mutants M3/M5/M7 fail as required, M4 is inexpressible (aliasing holds by
construction) and is retired with the reason recorded.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Am9eQwzNfbugH72eVKetC2
| T04 receiver release (`c.Kill()`) | Run clean, RunUse OWN002 | as expected |
23
+
| T05 release wrapper (`Drop(c) { c.Kill(); }`) | c must | c must |
24
+
| T06 conditional / T07 negated guard | r may | r may / r may |
25
+
| T08 ambiguous branch (mixed) | fresh (none today) | none without E3, **fresh with E3**; the caller's leak appears |
26
+
| T09 forwarded ownership | r must | r must |
27
+
| T10 borrowed param | r no | r no |
28
+
| T11 returned param (`=> x`, `{ return x; }`) | never fresh | no record / `none`|
29
+
| T12 recursive / SCC (`A => b ? new R() : B(); B => A(false)`) | fresh (fixpoint) |**unknown**: INF-F5 resolves a forward-return CYCLE to `unknown` (fail-closed) — the expectation assumed an optimistic cycle policy the engine does not have; NOT MET, recorded, not repaired |
30
+
| T13 unresolved external | never fresh | no record; the caller is silent |
31
+
| T14 virtual / interface | never fresh; never a release |`unknown`; no release |
32
+
33
+
## 3. Fact-level mutants (each applied to the extracted facts; each MUST fail its target)
34
+
35
+
-**M3 ignore a branch** — fails as required: T06/T07 become a fabricated `must`, T12 becomes `fresh`, a new
36
+
finding appears.
37
+
-**M5 ignore overload identity** — fails as required on the P-037-X control x2b-c3: both callers degrade to
38
+
OWN051 and the guarded selection is lost.
39
+
-**M7 ignore virtual/interface** — fails as required: `Via` becomes fresh and its caller gets a false OWN001.
40
+
-**M4 ignore return aliasing** — NOT APPLICABLE at the fact level: the frontend never emits
41
+
`return <parameter>` (the return is a bare exit) and the engine claims `fresh` only for a local it saw
42
+
acquired, so the mutant cannot be expressed without fabricating an acquire. The aliasing rule holds by
43
+
construction; the mutant is retired and the reason recorded.
44
+
45
+
## 4. Reading
46
+
47
+
The intra-body effects the algebra names are inferred as pre-registered. The additions of this track so
48
+
far are E1 (+ expression bodies), E2 and E3: no OwnIR field, no lattice value, one skeleton-derivation rule.
49
+
The two departures are policy, not effect failures (the fail-closed cycle rule; aliasing by construction).
50
+
Stage 4 now asks where the two EXTERNAL effects of the frozen witnesses can come from — the dependency
51
+
source through exactly these rules, or the explicit two-row model.
0 commit comments