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
Heap-effect summaries: typed write targets, to admit writes provably unrelated to the protected entity #395
The H1 harmless predicate is deliberately strict. A call inside a protocol region is admitted only when its summary has:
every parameter and the receiver ≤ borrow;
writes.instance, writes.static and writes.indirect all none;
returns == [];
no Unknown.
H0 summaries record that a method writes instance, static or indirect memory, but not what it writes. So a write that provably cannot reach the region's entity is refused exactly like one that can, for example:
a counter in an unrelated static class;
a field of a freshly allocated local object.
Proposal: extend the H0 vocabulary with typed write targets: the declaring type or field of each write, or "unrelated to type family T". Then add a region-resource predicate that admits a call whose writes are all provably outside the entity's type family, and the token's.
Мотивация / сценарий
docs/notes/heap-effect-summaries.md §7.2: "Region-resource precision … needs typed write targets, which H0 does not carry. Without them H1 is the strict predicate, which is sound."
docs/notes/h1-proven-call.md, "Not in this slice": typed write targets.
TB-MVP-01 (samples/OrderBackend) did not need them: its helper is pure. The rejected fixture corpus/negative/C12a_harmful_helper.cs.txt (a static counter, writes.static is may) shows the shape this would make admissible only when the target provably cannot alias the entity.
mutants proving that an aliasing write (into the entity's family, a base type, object, or an interface the entity implements) stays refused.
Альтернативы
Keep the strict predicate. Sound, and enough for the MVP. Wait for a real consumer that is blocked; the TB-MVP brief explicitly said not to build this "to make examples prettier".
Per-call annotations ([NoEntityWrites]). Cheaper, but it moves the proof to trust (see the external-summaries issue).
Potential fixture donor only for this existing typed write-target scope: represent place = root + projections (field, deref, array index, slice); whole root may overlap every child, known disjoint projections can be nonoverlapping, unknown indices fail closed. Beware upstream place recovery is incomplete and C# aliasing cannot infer arbitrary distinct dynamic indices. Compare with current typed write targets on one small frozen heap-effect corpus. Do not expand to a separate affine checker or full Rust borrow semantics; reject if no new independent detection/precision.
Activity
PhysShell commentedon Nov 20, 2026
Carpaccio donor: root-vs-field write footprints (20.11.2026)
Research page · ownership model.
Potential fixture donor only for this existing typed write-target scope: represent place = root + projections (field, deref, array index, slice); whole root may overlap every child, known disjoint projections can be nonoverlapping, unknown indices fail closed. Beware upstream place recovery is incomplete and C# aliasing cannot infer arbitrary distinct dynamic indices. Compare with current typed write targets on one small frozen heap-effect corpus. Do not expand to a separate affine checker or full Rust borrow semantics; reject if no new independent detection/precision.