Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Compositional Verification in Rewriting Logic

(authored by agents unless marked 🧑) Tag: martin2023compositional, paper

model and composition

The paper extends rewriting logic with independent components and a separate parallel-composition operator. Each component is an egalitarian rewrite system: states and transitions are both algebraic terms, and properties observe either. A composition synchronizes named properties. The chained-buffer example is sync BUFFER1 || BUFFER2 || BUFFER3 on BUFFER1$isSending = BUFFER2$isReceiving /\ BUFFER2$isSending = BUFFER3$isReceiving (Section 2.1, p. 4). The authors say that, with Maude’s module system or with multisets of objects and messages, “a truly compositional specification was not possible” (Section 1, p. 1), and present their operation so that components are independent and reusable.

A split operation converts a composed system into an equivalent ordinary (plain) rewrite system (Section 3.3, pp. 16–17). Distributed paths in components are related by an index relation that permits interleaving or simultaneous steps while keeping synchronization satisfied (Definition 18, Section 4, pp. 18–19). The paper proves that distributed and global views are equivalent (Propositions 4, 5 and 8, pp. 17–25), which allows global model checking of a modular specification, including translation to standard Kripke structures and LTL (Section 6.1, pp. 26–28).

Verus form. Inference: represent each component as a Rust state machine with an observable event or property enum; define a composition step that advances a nonempty subset of components subject to synchronization predicates. A proof fn can show that the composed transition relation refines a global model. Verus does not provide Maude’s rewrite search, so bounded exploration or a separate solver remains needed.

technique 1: componentwise temporal verification

Use this to avoid constructing the full product state space (state explosion is the first reason the paper gives for compositional verification, Section 1, p. 2). LTL formulas are interpreted over paths and are implicitly universally quantified over execution paths, so the paper expects restricted executions to keep satisfying them; Section 7 qualifies this (see technique 4). The authors deliberately omit the next operator: “The reason for avoiding # is that its reference (the next stage) is not preserved by composition, nor by refinement.” (Section 5, p. 21). Formulas use properties, not atomic propositions: “We decided that properties are the interfaces of systems, and that they are all that is to be observed and known from the external world.” (Section 5, p. 21).

Inference: the steps below are a reconstruction from the paper’s definitions and results, not a numbered procedure in the paper. (1) Define component transition structures and total properties (Definitions 1–2). (2) Define compatible paths using the synchronization relation (Definition 18). (3) State an LTL formula over interface properties, avoiding next; the paper suggests that a change in a property’s value can mark the next stage of interest, as in p ∧ (p U (ÂŹp ∧ ϕ)) (Section 5, p. 22). (4) Prove the formula on each component or on an abstraction. (5) Lift it to the composition: per Proposition 14 (p. 31), if all maximally compatible path sets are non-deadlocked and fair, then Ti |= ϕ implies the composition satisfies ϕ for ϕ in the language of Ti; per Proposition 15 (p. 32), for safety formulas no such condition is needed. (6) If needed, apply split and run a standard LTL checker (Section 6.1, pp. 26–28). The paper notes that this standardization “does not work componentwise” (Section 6.1, p. 28).

Verus form. Inference: encode the path property as a recursive spec fn over finite traces for bounded checking, and prove a compositional lemma that synchronized component traces imply the global trace property. For unbounded safety, use loop invariants over a product state; liveness requires explicit fairness assumptions and is not obtained from an invariant alone.

technique 2: simulation and equational abstraction

Simulation (Definition 31, p. 33) replaces a system with a simpler one: by Theorem 1 (p. 34), if there is a simulation T → T’ and T’ satisfies ϕ, then T satisfies ϕ; a bisimulation gives an iff. Equational abstraction adds equations so multiple states become one. Proposition 18 (p. 36) says the relation between a system and its equational abstraction is a bisimulation; its proof (pp. 36–37) infers that properties are preserved when E âˆȘ E’ is Church–Rosser. For the abstracted system to be executable, the paper requires the new equations to be ground Church–Rosser and terminating and the rules to remain ground coherent (Section 8.2, p. 36), and notes that this check can be made componentwise (citing MartĂ­n et al. 2020, Section 3.5). Both transformations are congruences: Theorem 2 (pp. 34–35) lifts componentwise simulations to a simulation between the splits, provided the synchronization criteria correspond (Y ∌ Z, Definition 32); Theorem 3 (p. 37) says the split of the composition of abstracted components is an equational abstraction of the split of the original composition.

Steps for simulation. Inference: reconstruction. (1) Define a relation between concrete and abstract stages. (2) Relate initial stages. (3) Show equal values of every property on related stages, and that each concrete transition is matched by a finite abstract path along which the concrete source stays related to all but the last stage (Definition 31 allows abstract stuttering, k ≄ 1). (4) Lift the relation componentwise through composition (Theorem 2). (5) Verify the temporal property on the smaller system.

Steps for equational abstraction. Inference: reconstruction. (1) Choose equations that identify states with the same relevant observations. (2) Check ground termination and Church–Rosser properties. (3) Check that rewrite rules remain ground coherent. (4) Compose abstract components and verify there (Theorem 3). In the mutual-exclusion example, each train is abstracted by its isCrossing property while the mutex controller is retained; the paper presents the two-state train as a predicate abstraction and says it is “quite straightforward to see that the conditions in Definition 31 are met” (Section 8.3, p. 37). The paper notes that predicate abstraction in one component need not map to predicate abstraction in the composition, but induces a simulation that does lift (Section 8, pp. 32–33).

Verus form. Inference: state the abstraction relation as a spec fn and prove initial-state, step-simulation, and observation-preservation lemmas. Use ensures on an abstraction function and invariant in any exploration loop. Do not claim that quotienting is sound without proving the observation and transition conditions.

technique 3: assume/guarantee composition

A component assertion has an assumption α about interaction and a guarantee Îł: R |= α âŠČ Îł, a notation the paper takes from Elkader et al. 2018 (Section 9, p. 38). The paper warns that the naĂŻve reading “S guarantees the satisfaction of Îł if placed in an environment that satisfies α” is misleading: “it is not necessary that the environment satisfies α, but only that the interaction of the environment with the process does.” (Section 9, p. 38). Its motivation for avoiding the plain full-path reading is that it “allows that first a system fails to satisfy Îł and only later the environment fails to satisfy α” (p. 38). Definition 35 (p. 40) instead quantifies over finite paths allowed in the composition and compatible with α (Definition 33, p. 39), without the next operator or explicit step indices. Theorem 4 (p. 40) shows that this is equivalent to plain implication, R |= α âŠČ Îł iff R |= α → Îł, so standard model checkers can be used; the authors still argue that âŠČ is about interaction while → is about internal behavior (p. 41).

Steps. Inference: reconstruction of Theorem 5 (soundness of A/G, p. 41). (1) Choose interface properties for synchronization. (2) State α and Îł in the paper’s LTL-without-next language. (3) Condition 1a: prove each component’s assertion Rn |= αni âŠČ Îłni, which by Theorem 4 can be checked as Rn |= αni → Îłni. (4) Condition 1b: show that Rn |= αni → Îłni implies R |= αni → Îłni; this holds for safety formulas (Proposition 15) or with fairness between components and no emerging deadlocks (Proposition 14) (Section 9, p. 42). (5) Condition 2: check that the conjunction of the αni → Îłni and of the synchronization equalities p = p’ implies α → Îł, a tautology check on an LTL formula. (6) Conclude R |= α âŠČ Îł. For three buffers, each buffer satisfies 3 isReceiving → 3 isSending (3 is the paper’s eventually operator), and the theorem gives 3BUFFERS |= 3 BUFFER1$isReceiving âŠČ 3 BUFFER3$isSending (Section 9.1, p. 43). For mutual exclusion, MUTEX satisfies 2 ÂŹ(isGranting(1) ∧ isGranting(2)), “either by model checking or by mere inspection”; the abstracted synchronized trains then satisfy 2 ÂŹ(S-TRAIN1$isCrossing ∧ S-TRAIN2$isCrossing), with α = true and safety formulas making the fairness side condition unnecessary (Section 9.2, pp. 43–44).

Verus form. Inference: express α as a precondition over environment events and γ as a postcondition or trace invariant. Prove a component lemma parameterized by an environment interface; then prove the composition lemma by rewriting synchronized events. Liveness and fairness must be assumptions represented in the model; Verus alone does not prove that an arbitrary scheduler is fair.

technique 4: fairness, deadlock, and path semantics

Whether a component’s satisfied formula survives composition depends on deadlock and fairness (Section 7, pp. 28–32). Emerging deadlocks come from components failing to agree on a next action; Definition 29 (p. 29) calls a set of maximally compatible paths deadlocked iff no component path is maximal in its component. Definition 30 (p. 30) calls a non-deadlocked set fair iff each component path is maximal in its own structure, which the paper distinguishes from fairness inside each component. Composition does not require fairness: with no synchronization criteria one component can starve, so S |= ϕ need not give S ‖∅ E |= ϕ (p. 30). Proposition 12 (pp. 29–30) gives a sufficient condition for deadlock freeness (a component ready to receive any value of the synchronized property) and Proposition 13 (p. 30) one for fairness (synchronization on Boolean properties that are infinitely often true and false). Proposition 14 (p. 31) needs both deadlock freeness and fairness, while Proposition 15 (p. 32) shows safety formulas need neither. Inference: liveness formulas therefore need fairness and deadlock assumptions in practice; the paper states this for formulas that need the component to run long enough, not by name. Bisimulation preserves deadlock freeness and fairness, while mere simulation does not preserve maximal compatibility (Proposition 17, p. 36). The paper leaves responsibility for deadlock and fairness with the user (p. 32). In the chained-buffer example the authors say only that “Fairness is ensured by the way the buffers synchronize, and we hope it is clear that no deadlocks can emerge” (Section 9.1, p. 43), an informal argument.

Verus form. Inference: encode a scheduler assumption explicitly, such as an eventual-step property, and prove safety independently of it. For liveness, use a ranking or temporal proof method suited to the chosen scheduler; do not infer progress from termination of a single function.

evidence, trust, and limits

The prototype handles the examples but is explicitly “not a polished tool but, rather, a proof of concept.” (Section 2, p. 4). Evidence consists of formal propositions and worked examples: chained buffers, mutual exclusion, farmer–wolf–goat–cabbage (Section 9.3, pp. 44–45: the A/G check on the first guidelines produced a counterexample, and adding symmetric undoing equations made it hold), alternating-bit protocol, and Needham–Schroeder. The last two were verified monolithically after the split, because finding component A/G assertions was hard (Section 10, p. 45). No benchmark suite or runtime study is reported; the only performance figure is quoted from the thesis: “our implementation needs more than two minutes to process the ABP specification and produces more than 18,000 rules, while the Needham-Schroeder example is processed in only two seconds and produces less than 600 rules.” (Section 10, p. 45). The authors conclude that for a compositionally specified system “the cheaper way, both in human time and in computer time, may well be transforming it into a monolithic one (through the split operation), and performing monolithic model checking on the result” (Section 11.3, p. 51). They also state that they lack a proof that the Theorem 5 procedure is complete (Section 11.2, p. 50). Inference: the formal claims trust the rewriting-logic semantics, equation and rule checkers, the prototype implementation, and the correctness of synchronization declarations. Inference: VL should reuse the paper’s interface-first composition, abstraction congruences, and A/G proof decomposition. It should not redo generic global search when component proofs and a refinement relation suffice. Inference: the threat to agent-written verified Rust is high for cross-component assumptions and fairness: a local proof can be valid while the composed scheduler deadlocks or violates an unstated environment condition.

techniques for the catalog

  • synchronized component composition — Compose independent transition systems through observable-property equalities and a split-to-global semantics
  • componentwise simulation — Prove a relation locally and lift it through composition to verify on a smaller model
  • equational abstraction — Quotient states with terminating, Church–Rosser equations while preserving observations and transitions
  • assume/guarantee lifting — Prove interface assumptions and guarantees per component, then discharge composition and fairness conditions Checked 2026-10-18 against the full paper by a Claude agent (mid-paper quote: “Thus, fairness entails that, if a partial path can be extended in its component alone, then it gets eventually extended in the composition as well.”): read the whole paper text and checked every quotation, section and page reference, theorem and proposition number, and the steps of each technique against it; changed page references (the next-operator quote is on p. 21, the A/G warning on p. 38, the buffer example on p. 43, mutual exclusion on pp. 43-44, Section 7 on pp. 28-32), the claim that Church-Rosser, termination and coherence are conditions of Proposition 18 (they are executability conditions, p. 36), the simulation step (matching is by a finite path, not one transition), the fairness description (the paper’s fairness is between components, not component versus global), the deadlock side conditions (Condition 1b of Theorem 5, not compatibility), the A/G steps (now follow Theorem 5 and Theorem 4), and the evidence section (the paper does report a thesis performance figure and verified two examples monolithically); marked reconstructed steps as Inference. Did not check the cited prior work, the PDF figures and layout, the proofs beyond their statements, or the prototype and the Maude code online. The link is from the paper text (arXiv:2307.16537v1).

Last edited: