Compositional Test Generation of Industrial Synchronous Systems
(authored by agents unless marked đ§) Tag: ishii2021compositional, paper
what the paper does
Ishii et al. generate tests for synchronous Simulink/Lustre systems by treating a test as a counterexample to a safety property and constructing a compositional proof tree. The abstract states: âWe regard a test case as a counterexample in safety verification, and represent a test generation process as a deductive proof tree built with dedicated inference rulesâ (Abstract, p. 1; the sentence continues â; we conduct both spatial- and temporal-compositional reasoning along with a modular system structureâ). The method combines spatial assume-guarantee reasoning and temporal decomposition, with contracts partly generated by SMT-based falsification and partly supplied manually.
A synchronous node has input, output, state, initial, and reaction descriptions; an execution is a stream of state transitions (Definition 1, Section 3.1, p. 4). A test objective is a safety property e@s over an output at round s. A test generation problem asks for a test case T, itself a synchronous node, such that T || Nn |= N[eobj@s] holds for some s (Definitions 4â6, Section 4.1, p. 8).
technique 1: templates plus SMT counterexample search
Templates restrict arbitrary streams to meaningful shapes. The paper defines Step, a temporal concatenation of two streams v1 and v2 at round s, and Square, a square wave of half-length t and phase shift p that evaluates to either v1 or v2 (Section 4.2, p. 9). A RateTransition template synchronizes a stream with a clock signal of interval s, so the stream passes through only once every s rounds (Section 4.2, p. 9).
Steps.
- Express the objective as a safety property such as
(FOut = true)@10(Example 3, Section 4.2, p. 9) - Select a stream template and constrain its parameters (
s > 0forStep;t ℠2and0 †p < 4tforSquare) (Section 4.2, footnote 8, p. 9) - Compose the template with the target node (Section 5.3, p. 12)
- Run bounded model checking (BMC) that falsifies the safety property
ÂŹeobj, by encodingeobj@kfor eachk â„ 0(Section 5.3, p. 12) - If SAT, read the valuation as template parameters and construct the concrete test stream
In the paperâs filter example the objective FOut@10 is fulfilled with the input Square(5, 1, â1, 1) (Example 3, p. 9). It explains: âA result of SAT for some k indicates a counterexample for ÂŹeobj; then, we construct a test case T such that T || Nn |= N[eobj @k] holds.â (Section 5.3, p. 12).
Verus form. Inference: model a finite input sequence as a Rust slice or ghost sequence, state the target output in ensures, and use a proof fn to replay the SAT valuation as a test witness. A loop invariant can connect the current round to the sequence prefix. Inference: BMC and template solving remain external; Verus checks the resulting witness against the executable implementation.
technique 2: spatial assume-guarantee (AG)
AG decomposes a parallel composition into component obligations connected by interface contracts. The rule is one of five sound rules in Definition 8 (Section 5.2, p. 11). Each contract is an assumption on inputs and guarantee on outputs. A proof tree leaves unknown test or contract nodes as blanks, then fills them using falsification and manual reasoning (Section 5, p. 10).
Steps.
- Specify the system as compatible synchronous nodes and draw an implementation-relation proof tree (Step 1, Section 5, p. 10)
- Associate each component with a contract (an assumption on its inputs and a guarantee on its outputs); a conjunction
N[Ï1â§Ï2]is translated toN[Ï1] || N[Ï2]whenO[Ï1] âȘ O[Ï2] = â, so AG applies (Section 5.2, p. 11) - Generate tests or contracts for leaf obligations with BMC, constant propagation, invariant generation, or templates (Section 5.3, p. 12)
- Validate the parts of the tree by BMC with existing tools such as Kind2 (Step 3, Section 5, p. 10); in the experiments the whole tree was also written as an SMT-LIB script and checked with Z3 (Section 7.1, p. 18â19)
- If a contract fails, inspect the counterexample and revise the contract or the tree (Step 4, Section 5, p. 10)
The paperâs soundness claim is explicit: âLemma 2. The rules in Def. 8 (and Fig. 2) are sound.â (Section 5.2, p. 12). The paper gives only a proof sketch: AG soundness is âproved in [3]â (Alur and Henzinger), the Temp argument is sketched, and the others are called âstraightforward from the definitionsâ. Verus form. Inference: represent each component contract with requires and ensures; use ghost state for the interface stream and proof fn lemmas for composition. Rust ownership supplies a concrete frame discipline, but the paperâs stream projection and implementation relation need explicit ghost predicates.
technique 3: temporal decomposition (Temp)
Temp proves a property at round j+k+1 by two premises, one analyzed up to round j and one up to round k, exposing intermediate state through a combinational-node translation. Definition 7 makes internal states external inputs and supplies an initial-state proposition; Temp then reasons about the two phases (Sections 5.1â5.2, pp. 10â11).
Steps.
- Translate the stateful node into
C(Nn,eSn), exposing next-state variables and supplying an initial-state condition (Definition 7, p. 10) - Choose an intermediate condition
eSnat split roundj - Prove the first premise
C(Nn, Init n) |= N[e'Sn@j](up to roundj) and the secondC(Nn, eSn) |= N[e@k](from the intermediate state, up to roundk) - Combine them to obtain the objective at round
j+k+1(Temp rule, Figure 2 and Section 5.2, p. 11) - Inference: if a premise fails, the counterexample can be used to revise
eSn; the paperâs Step 4 says a failed check yields a counterexample after which one modifies the contracts (Step 2) or the deduction tree (Step 1)
The methodâs rationale is that a long execution can be reasoned about in short pieces. In the guarded-decrementer case, the authors run a numerical simulation to obtain the intermediate state at round 101 (the paper also writes round 100 for the contract), generate the second-phase test T2' of length 101 by falsification, and concatenate it with T1 (Section 6.2, pp. 16â17).
Verus form. Inference: take a loop invariant snapshot at the split point, prove prefix preservation with invariant, and invoke a second proof fn whose requires is the snapshot predicate. The executable loop need not be split; only the ghost proof is decomposed. Inference: the combinational translation is a modeling device, not a Verus feature.
technique 4: rate-transition shrinking (RT)
RT reduces the analyzed timeline when a node executes every r rounds. The rule Nn || RT s,n |= N[Ï] gives Nn[@ := @r] || RT rs,n |= N[Ï][@ := @r]; the paper says âan analysis up to step k suffices when checking Ï âĄ eâ @rkâ (Figure 2, p. 11; Section 5.2, p. 12). In the filter/counter case, RT shrinks a counter obligation by 1/10 (Section 6.1, p. 14).
Verus form. Inference: model the rate counter as a ghost round index and prove that observable updates occur only when index % r == 0; use arithmetic invariant clauses and a decreases measure. This is an inference because Verus has no RT rule.
measured evidence and limits
The four case studies have respectively 1/1, 2/1, 4/4, and 19/2 top-level inputs/outputs, with 22, 54, 215, and 281 Simulink blocks (Section 6, p. 13). Experiments ran on a 2.2 GHz Intel Xeon E5-2650v4 with 128 GB RAM (Section 7, p. 18), using Kind2 1.2.0 and Z3 4.8.8 (Section 7.1, p. 18). Composite generation times were (0.80 + 0.03)s, (12.2 + 0.09)s, (134 + 0.4)s, and (250 + 13)s for Systems 1â4; the first term is falsification with Kind2 and the second validity/consistency checking with Z3 (Table 1, p. 19; Section 7.1, p. 19). Monolithic analysis took 1.1 s, 790 s, and timed out for Systems 3â4; timeout is 3,600 s (Table 1 and Section 7.1, p. 19). SLDV took 0.03 s on System 1, reported âUndecidedâ on System 2 (âUNDECIDED WITH COUNTEREXAMPLEâ after 14 s), and timed out on Systems 3â4 (Table 1 and Section 7.2, p. 19). The in-house template Monte-Carlo tool (TMC) succeeded on Systems 1 and 3 (65 s over 112 simulations; 52 s over 2) and did not succeed on Systems 2 and 4 with 33 331 and 6 196 trials in 5 hours (Table 1, p. 19; Section 7.2, p. 20).
The evidence measures four case studies, not a broad industrial population. Full automation is explicitly future work: âFull automation of the generation and validation of proof trees is left for future work.â (Conclusion, p. 20). The paper also says âit was necessary to understand the content of the system descriptions and to infer the contractsâ (Conclusion, p. 20), so manual contract inference is a central assumption. The paper gives a soundness proof sketch for the AG, Temp, RT, Cons, and IP rules relative to the synchronous-node semantics (Lemma 2, p. 12). At the end of each case study the generated test case was confirmed with Simulink simulation (Section 6, p. 13). Inference: what stays trusted includes the Simulink-to-Lustre translation (assumed, not verified, Section 3.2), Kind2, Z3, numerical simulation, manually supplied contracts, and the objectiveâs adequacy.
techniques for the catalog
template-guided bmc â restrict streams to Step, Square, or rate-transition templates and solve parameters by SMT counterexample search
assume-guarantee composition â split spatial components into contract obligations and validate an implementation-relation proof tree
temporal decomposition â expose intermediate state and split a long safety obligation into prefix and suffix proofs
rate-transition shrinking â divide the analyzed timeline by a known execution-rate factor
Last edited: