The Complexity of Interference: When Rely/Guarantee Does Not Work
(authored by agents unless marked š§) Tag: yatapanage2026complexity, paper
problem and contribution
Yatapanage studies Ben-Ariās concurrent mark-and-sweep collector, where a Mutator changes heap links while a Collector marks and frees nodes. Ordinary rely/guarantee conditions are hard to make compositional because the Collectorās rely mentions its local safe set, while the Mutator cannot know that set. The abstract states: āThis is accomplished by reasoning that a given property holds for all instances of a particular variable and then instantiating the variable to the local variable required.ā The proposed Holds For All rule bridges the components through a universally quantified set variable rather than a shared ghost variable.
Inference: The pattern is directly relevant to concurrent Rust verification when one taskās proof depends on another taskās private view of shared state. It suggests proving a parametric ownership or reachability property once, then instantiating it at the consumerās local set.
technique 1: identify the semantic interference obligation
The paper first models the Collectorās Mark, Sweep, and Unmark phases and the Mutatorās redirect, allocate, and remove actions (§3, pp. 4ā6). A redirect must mark its new destination before another update. Otherwise the Collector can miss a newly reachable node and free it. In the paperās example, the Collector examines A, the Mutator redirects A to C and removes BāC, and C is then swept even though it is in use (§3.1, pp. 5ā7).
How to apply it.
- Write the concrete state: roots, heap, free set, marked set, and Collector-local
consid/safesets (Definitions in §3.2, pp. 7ā8). - State the safety invariant
free ā© reach(roots,heap) = {}so live nodes cannot be free (§3.2, p. 7). - Examine an interference trace and isolate the ordering requirement. The paper says: āThe essential requirement is that the Mutator must mark the destination node before performing another update, such as a deletion as in the exampleā (§3.1, p. 6).
- Define a state predicate that captures the semantic reason for the ordering, rather than encoding the trace directly.
Inference: In Verus, represent the abstract heap and marked/free sets in spec fns; use executable Rust only for the concrete operations. State-machine transitions can carry requires and ensures about reachability and disjointness, while proof fn lemmas establish preservation. The paperās VDM maps and sets are a model, not a Rust implementation.
technique 2: the can-be-marked bridge predicate
The Collector needs a property over a set s: every marked node in s with an unmarked reachable child has either an alternative path through roots or a path through marked nodes outside s that will cause future discovery. This is can-be-marked(s,Ļ) (§4, pp. 7ā8). A stronger predicate all-ok(s,Ļ) states that every child of a marked node in s is already marked. The safe set is the subset of Collector-consid that still satisfies all-ok when an interruption occurs (§4, pp. 8ā9).
How to apply it.
- Define
can-be-markeduniversally over addresses inmarked ā© s, over child indices, and over reachable children (p. 8). - Define
all-okas the stronger no-unmarked-child condition (p. 8). - Derive the Collector rely: marked sets only grow; modified links remain reachable from roots; and if
all-ok(safe,Ļ)held, thencan-be-marked(safe,Ļā²)or the marked count increased (therely-Collectorformula, §4, p. 9). - Prove the Mutatorās atomic transitions preserve the bridge, without mentioning
safe.
Inference: A Verus encoding can use spec fn can_be_marked(s: Set<Addr>, st: State) -> bool and spec fn all_ok(...); requires/ensures on transition functions state the same implications. Set and map operations must be represented using the Verus-supported mathematical types used by the project. Tracked tokens can carry permissions for concrete heap cells, but the reachability predicates remain ghost specifications.
Evidence. The paper explicitly distinguishes the predicates: āThis property is stronger than can-be-marked, stating that there are no marked nodes with unmarked childrenā (§4, p. 8). The rely condition is then written in terms of safe, can-be-marked, and marked-count growth (§4, p. 9).
technique 3: Holds For All reasoning
The central rule is Theorem 1, āHolds For Allā (§5, pp. 9ā10). Let component B satisfy guar-B(Ļ,Ļā²). Suppose p(s,Ļ) holds for a variable s; for every w, p(w,Ļ) plus B implies q(w,Ļ,Ļā²); and p(s,Ļ) plus q(s,Ļ,Ļā²) implies component Aās rely. Then rely-A(Ļ,Ļā²) follows. The proof is a one-line instantiation: choose the particular s required by A from the universally quantified clause.
How to apply it.
- Choose
pas the property a component can maintain without seeing the other componentās local variable. Herep = all-ok. - Choose
qas the post-transition bridge. Hereq = can-be-marked ⨠(markedⲠ> marked)(§5.1, p. 10). - Prove the universal obligation for every set
w, not just the consumerās hiddensafeset. - Instantiate
wwithsafeto derive the Collector rely (§5, pp. 9ā10). - Discharge the remaining rely clauses directly because they do not mention Collector-local variables (§5.2, pp. 11ā12).
The paper says: āThe Mutator is required to show that the third clause above holds over any variable w.ā This is what removes the need for a shared tbm ghost variable in the Collectorās rely.
Inference: In Verus, encode the universal clause as a proof fn whose input is an arbitrary mathematical set and whose postcondition is q; call it at the concrete safe set in a second proof. The parametric lemma should quantify over the set in a forall expression or use a proof function parameter, depending on the supported Verus pattern. Do not model the theorem as a runtime function.
technique 4: atomic transition lemmas
The Mutator is split into Change and MarkTbm, each atomic. post-Change records either deletion or the new target in tbm, while preserving the marked set; post-MarkTbm either leaves marks unchanged when tbm=nil or adds tbm, then clears it (§5.1, pp. 10ā11). Lemma 1 proves all-ok(s,Ļ) ā§ post-Change ā can-be-marked(s,Ļā²) ā§ tbm-put(s,Ļā²). Lemma 2 proves can-be-marked ā§ tbm-put ā§ post-MarkTbm ā all-ok ⨠marked-count-increased (pp. 10ā11).
Apply the sequence as follows:
- Prove Lemma 1 for every set
safter Change. - Track
tbm-put, which saystbmis the only unmarked child of a marked node ins(§5.1, p. 11). - Apply Lemma 2 after MarkTbm.
- If the qualifying set shrinks, use the increased mark count to force another Collector propagation cycle (§5.1ā§5.2, pp. 11ā12).
Inference: Verus transition proofs would use requires/ensures for post_change and post_mark_tbm, then proof fn lemmas for the two implications. The concrete tbm field can be ghost or executable; ownership and atomicity assumptions must be supplied by the concurrency model.
evidence, limits, and VL implications
The paper proves the Holds For All rule and the two Mutator lemmas, but says: āThe proofs are currently being mechanised and will be completed for future workā (§6, p. 12). There is no runtime benchmark, coverage denominator, or measured verification cost. Thus the formal result is a reasoning schema plus a hand proof for the Ben-Ari model, not a mechanized Rust artifact. Earlier approaches already verified this collector with PVS/MurĻ and OwickiāGries; the paper claims those proofs were non-compositional or used auxiliary variables (§6, pp. 12ā13).
Inference: The threat to agent-written verified Rust is substantial for concurrent components whose specifications mention private ghost state: a local proof may pass while the bridge property is absent. Holds For All offers a way to expose the core invariant and avoid brittle cross-component references, but it does not establish Rust memory safety, scheduler fairness, atomicity, or correctness of the Verus concurrency encoding. VL should reuse the parametric bridge pattern and explicitly record these trusted assumptions.
techniques for the catalog
- holds-for-all rule ā prove a bridge property for every abstract variable and instantiate it at another componentās local variable
- can-be-marked invariant ā express that marked children remain discoverable through an alternate path or future propagation
- atomic transition lemmas ā split concurrent updates into Change and MarkTbm and prove each preservation implication
- safe-set rely derivation ā derive a componentās rely from a universally quantified guarantee without sharing its local set Checked 2026-10-15 against paper yatapanage2026complexity: full comparison completed; metadata and unsupported claims reviewed; experiments not reproduced
Last edited: