A Detailed Account of The Inconsistent Labelling Problem of Stutter-Preserving Partial-Order Reduction
Full text
This is a self-archived version of an original article. This version may differ from the original in pagination and typographic details. Author(s): Title: Year: Version: Copyright: Rights: Rights url: Please cite the original version: CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ A Detailed Account of The Inconsistent Labelling Problem of Stutter-Preserving Partial- Order Reduction © T. Neele, A. Valmari, and T.A.C. Willemse Published version Neele, Thomas; Valmari, Antti; Willemse, Tim A. C. Neele, T., Valmari, A., & Willemse, T. A. C. (2021). A Detailed Account of The Inconsistent Labelling Problem of Stutter-Preserving Partial-Order Reduction. Logical Methods in Computer Science, 17(3), Article 8. https://doi.org/10.46298/lmcs-17(3:8)2021 2021
Logical Methods in Computer Science Volume 17, Issue 3, 2021, pp. 8:1–8:27 https://lmcs.episciences.org/ Submitted Jan. 04, 2021 Published Jul. 21, 2021 A DETAILED ACCOUNT OF THE INCONSISTENT LABELLING PROBLEM OF STUTTER-PRESERVING PARTIAL-ORDER REDUCTION ∗ THOMAS NEELE a, ANTTI VALMARI b, AND TIM A.C. WILLEMSE c aRoyal Holloway University of London, Egham, UK e-mail address: [email protected] bUniversity of Jyv¨askyl¨a, Jyv¨askyl¨a, Finland e-mail address: antti.v[email protected] cEindhoven University of Technology, Eindhoven, The Netherlands e-mail address: [email protected] Abstract. One of the most popular state-space reduction techniques for model checking is partial-order reduction (POR). Of the many different POR implementations, stubborn sets are a very versatile variant and have thus seen many different applications over the past 32 years. One of the early stubborn sets works shows how the basic conditions for reduction can be augmented to preserve stutter-trace equivalence, making stubborn sets suitable for model checking of linear-time properties. In this paper, we identify a flaw in the reasoning and show with a counter-example that stutter-trace equivalence is not necessarily preserved. We propose a stronger reduction condition and provide extensive new correctness proofs to ensure the issue is resolved. Furthermore, we analyse in which formalisms the problem may occur. The impact on practical implementations is limited, since they all compute a correct approximation of the theory. 1. Introduction In the field of formal methods, model checking is a push-button technique for establishing the correctness of systems according to certain criteria. A fundamental issue in model checking is the state-space explosion problem: the size of the state space can grow exponentially with the number of concurrent components, due to all their possible interleavings. One of the prime methods of reducing the number of states is partial-order reduction (POR). The literature contains many different implementations of POR, but they are all centred around the idea that some interleavings may be considered similar and thus only one interleaving from each equivalence class needs to be explored. The main variants of POR are ample sets [ Pel93 ], persistent sets [ God96 ] and stubborn sets [ Val91b , VH17 ]. The basic conditions set out by each of these variants can be strengthened, such that the resulting conditions are sufficient for the preservation of stutter-trace equivalence. The extra conditions resolve the Key words and phrases: partial-order reduction, stutter equivalence, LTL, stubborn sets. ∗An extended abstract of this paper appeared earlier as [NVW20]. LOGICAL METHODS l IN COMPUTER SCIENCE DOI:10.46298/LMCS-17(3:8)2021 © T. Neele, A. Valmari, and T.A.C. Willemse CC Creative Commons
8:2 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 so-called action-ignoring problem [ Val91b ]. Since LTL without the next operator (LTL −X ) is invariant under finite stuttering, this allows one to check most LTL properties under POR. However, the correctness proofs for these methods are intricate and not reproduced often. For stubborn sets, LTL −X -preserving conditions and an accompanying correctness result were first presented in [ Val91a ]; the corresponding proofs appeared in [ Val92 ]. When attempting to reproduce the proof of [ Val92 , Theorem 2] (see also Theorem 2.5 in the current work), we were unable to show that the two alternative paths considered by [ Val92 , Construction 1], a core component of the proof, are stutter equivalent. The consequence is that stutter-trace equivalence is not necessarily preserved, contrary to what the theorem states! We call this the inconsistent labelling problem. The essence of the problem is that POR in general, and the proofs in [ Val92 ] in particular, reason mostly about actions, which label the transitions. In POR theory, the only relevance of the state labelling is that it determines which actions must be considered visible. On the other hand, stutter-trace equivalence and the LTL semantics are purely based on state labels. The correctness proof in [ Val92 ] does not deal properly with this disparity. Consequently, any application of stubborn sets in LTL −X model checking is possibly unsound, both for safety and liveness properties. In literature, the correctness of several theories [LPvdPH16, LW19, Val96] relies on the incorrect theorem. In earlier work [ NVW20 ], we identified the inconsistent labelling problem and investigated the theoretical and practical consequences. As detailed in ibid., the problem is witnessed by a counter-example, which is valid for weak stubborn sets and, with a small modification, in a non-deterministic setting for strong stubborn sets. A slight strengthening of one of the stubborn set conditions is sufficient to repair the issue (Theorems 5.2 and 5.3 in the current work). The fix is local, in the sense that it reduces the reduction potential in those places where the inconsistent labelling problem might otherwise occur. Petri nets can be susceptible to the issue, depending on what notion of invisibility and what types of atomic propositions are used. We used this knowledge about formalisms in which the inconsistent labelling problem may manifest itself to determine its impact on related work. The investigation in [ NVW20 ] shows that probably all practical implementations of stubborn sets compute an approximation which resolves the inconsistent labelling problem. Furthermore, POR methods based on the standard independence relation, such as ample sets and persistent sets, are not affected. The current paper improves on [ NVW20 ] with extended explanation and full proofs. In particular, we introduce each of the existing stubborn set conditions with reworked proofs to aid the reader’s intuition. The rest of the paper is structured as follows. In Section 2, we introduce the basic concepts of transition systems and stutter-trace equivalence. Section 3 introduces the stubborn set conditions one by one and shows what they preserve through several lemmata. Our counter-example to the preservation of stutter-trace equivalence is presented in Section 4. We propose a solution to the inconsistent labelling problem in Section 5, together with an updated correctness proof. Sections 6 and 7 discuss several settings in which correctness is not affected. Finally, Section 8 discusses related work and Section 9 presents a conclusion. 2. Preliminaries 2.1. Labelled State Transition Systems and Paths. Since LTL relies on state labels and POR relies on edge labels, we assume the existence of some fixed set of atomic propositions
Vol. 17:3 THE INCONSISTENT LABELLING PROBLEM 8:3 AP to label the states and a fixed set of edge labels Act , which we will call actions. Actions are typically denoted with the letter a. Definition 2.1. Alabelled state transition system, short LSTS, is a directed graph TS = (S, →,ˆs, L), where: •Sis the state space; • → ⊆ S×Act ×Sis the transition relation; •ˆs∈Sis the initial state; and •L:S→2AP is a function that labels states with atomic propositions. We write sa −→ s0 whenever ( s, a, s0 ) ∈ → . An action a is enabled in a state s , notation sa −→ , if and only if there is a transition sa −→ s0 for some s0 . In a given LSTS TS , enabledTS ( s ) is the set of all enabled actions in a state s . We may drop the subscript TS if it is clear from the context. A state sis a deadlock in TS if and only if enabledTS (s) = ∅. Apath is a (finite or infinite) alternating sequence of states and actions that respects the transition relation: s0a1 −→ s1a2 −→ s2. . . . We sometimes omit the intermediate and/or final states if they are clear from the context or not relevant, and write sa1...an −−−−→ s0 or sa1...an −−−−→ for finite paths and sa1a2... −−−−→ for infinite paths. The empty sequence is denoted with ε . Thus, for all states s and s0 , sε −→ s0 holds if and only if s = s0 . A path is deadlocking if and only if it ends in a deadlock. A path is complete if and only if it is infinite or deadlocking. Paths that start in the initial state ˆsare called initial paths. Given a path π = s0a1 −→ s1a2 −→ s2. . . , the trace of π is the sequence of state labels observed along π ,viz. L ( s0 ) L ( s1 ) L ( s2 ) . . . . The no-stutter trace of π , notation no-stut ( π ), is the sequence of those L(si) such that i= 0 or L(si)6=L(si−1). A set I of invisible actions is chosen such that if (but not necessarily only if) a∈ I , then for all states s and s0 , sa −→ s0 implies L ( s ) = L ( s0 ). Note that this definition allows the set I to be under-approximated. An action that is not invisible is called visible. The projection of a1. . . an on the visible actions is the result of the removal of all elements of I from a1. . . an . We denote it with visI ( a1. . . an ). The notion extends naturally to infinite sequences a1a2. . . . We furthermore lift the function vis to paths, such that visI ( s0a1 −→ s1a2 −→ . . . ) = visI(a1a2. . . ). The subscript Iis omitted when it is clear from the context. We say TS is deterministic if and only if sa −→ s1 and sa −→ s2 imply s1 = s2 , for all states s , s1 and s2 and actions a . To indicate that TS is not necessarily deterministic, we say TS is non-deterministic. 2.2. Petri Nets. Petri nets are a widely-known formalism for modelling concurrent processes and have seen frequent use in the application of stubborn set theory [ BJLM19 , LW19 , VH17 , Var05 ]. We will use Petri nets for presenting examples. In Section 7, we will also reassess the correctness of some published POR theories that use Petri nets. Other than that, the theory in the present paper is fairly general, that is, it does not depend on Petri Nets. A Petri net ( P, T, W, ˆm ) contains a set of places P and a set of structural transitions T . These sets are disjoint. In this paper they are finite. Figure 1 shows an example of a Petri net. Places are drawn as circles and structural transitions as rectangles. Arcs between places and structural transitions and their weights are specified via a total function W : ( P×T ) ∪ ( T×P ) →N . The values W ( p, t ) and W ( t, p ) are called weights. There is an arc from place p to structural transition t , drawn as an arrow, if and only if W ( p, t ) > 0; and similarly in the opposite direction if and only if W ( t, p ) > 0. If W ( p, t ) > 1
8:4 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 p1p2p3p4p5p6 t1t2t3t5t6 t4 2 2 32 Figure 1. An example Petri net. or W ( t, p ) > 1, then it is written as a number next to the arc. Figure 1 contains 11 arcs of weight 1, three arcs of weight 2, and one arc of weight 3. Amarking m : P→N is a function that assigns a number of tokens to each place. Let M denote the set of all markings. A Petri net has an initial marking ˆm . The initial marking of the example satisfies ˆm(p3) = 2, ˆm(p1) = ˆm(p4) = ˆm(p6) = 1 and ˆm(p2) = ˆm(p5) = 0. Structural transition t is enabled in marking m if and only if m ( p ) ≥W ( p, t ) for every p∈P , and disabled otherwise. In our example, t1 , t3 and t6 are enabled. Because ˆm ( p3 ) = 2 but W ( p3, t4 ) = 3, t4 is disabled. An enabled transition may occur resulting in the marking m0 such that m0 ( p ) = m ( p ) −W ( p, t ) + W ( t, p ) for every p∈P . We denote this with mt −→ m0 , and extend the notation to paths similarly to Section 2.1. If m is the marking such that ˆmt1 −→ m in our example, then m ( p1 ) = 0, m ( p2 ) = 1, and m ( p ) = ˆm ( p ) for the remaining places. If ˆmt3 −→ m0, then m0(p4) = 0 and m0(p) = ˆm(p) for the remaining places. A marking m is reachable if and only if there are t1 , . . . , tn such that ˆmt1...tn −−−→ m . Let Mreach denote the set of reachable markings, and →0 the restriction of → on Mreach ×T× Mreach . Assume that a set of atomic propositions AP and a function L0 : Mreach → 2 AP are given. A Petri net together with these induces the LSTS ( Mreach ,→0,ˆm, L0 ). In this context Act =T. It is customary to abuse notation by forgetting about the distinction between → and →0 , and using the same symbol for both. This is done because it is often not known in advance whether a marking is reachable, making it impractical to define →0 instead of → . Similarly instead of L0 , it is customary to define a function L from all markings M to 2 AP , let L0 be its restriction on Mreach , and abuse notation by using the same symbol for both. These are general practice instead of being restricted to Petri nets. 2.3. Weak and Stutter Equivalence. Stubborn sets save effort by constructing, instead of the full LSTS TS = ( S, →,ˆs, L ), a reduced LSTS TSr = ( Sr,→r,ˆs, Lr ) such that Sr⊆S , →r⊆ → and Lr is the restriction of L on Sr (more details will be given in Section 3). To reason about the similarity of an LSTS TS and its reduced LSTS TSr , we introduce the notions weak equivalence, which operates on actions, and stutter equivalence, which operates on states. For the purpose of the discussion in Section 7, these concepts respectively depend on a set of actions and a labelling function. Definition 2.2. Two paths π and π0 are weakly equivalent with respect to a set of actions A , notation π∼Aπ0 , if and only if they are both finite or both infinite, and their respective projections on Act \Aare equal, i.e.,visA(π) = visA(π0). Definition 2.3. Paths π and π0 are stutter equivalent under L , notation π,Lπ0 , if and only if they are both finite or both infinite, and they yield the same no-stutter trace under L . We typically consider weak equivalence with respect to the set of invisible actions I . In that case, we simply refer to the equivalence as weak equivalence and we write π∼π0 ,
Vol. 17:3 THE INCONSISTENT LABELLING PROBLEM 8:5 which intuitively means that π and π0 contain the same visible actions. We also omit the subscript for stutter equivalence when reasoning about the labelling function of the LSTS under consideration and write π,π0 . Note that stutter equivalence is invariant under finite repetitions of state labels, hence its name. We lift both equivalences to LSTSs, and say that TS and TS0 are weak-trace equivalent iff for every complete initial path π in TS , there is a weakly equivalent complete initial path π0 in TS0 and vice versa. Likewise, TS and TS0 are stutter-trace equivalent iff for every complete initial path π in TS , there is a stutter equivalent complete initial path π0in TS0and vice versa. In general, weak equivalence and stutter equivalence are incomparable, even for complete initial paths. However, for some LSTSs, these notions are related in a certain way. We formalise this in the following definition. Definition 2.4. An LSTS is labelled consistently iff for all complete initial paths π and π0 , π∼π0implies π,π0. It follows from the definition that, if an LSTS TS is labelled consistently and weak-trace equivalent to a subgraph TS0, then TS and TS0are also stutter-trace equivalent. Stubborn sets as defined in the next section aim to preserve stutter-trace equivalence between the original and the reduced LSTS. The motivation behind this is that two stuttertrace equivalent LSTSs satisfy exactly the same formulae [ BK08 ] in LTL −X . The following theorem, which is frequently cited in the literature [ LPvdPH16 , LW19 , Val96 ], aims to show that stubborn sets indeed preserve stutter-trace equivalence. Its original formulation reasons about the validity of an arbitrary LTL −X formula. Here, we give the alternative formulation based on stutter-trace equivalence. Theorem 2.5. [ Val92 , Theorem 2] For every LSTS TS , the reduced LSTS TSr (defined in Section 3) is stutter-trace equivalent to TS. The original proof correctly establishes the four items listed below. For a long time it was believed that they suffice to ensure that TSr gives the same truth values to LTL −X formulas as TS gives. While investigating the application of stubborn sets to parity games [ NWW20 ], Thomas Neele (the main author of the current paper, but not the author of this sentence) took the effort of checking this self-evident “fact”, and found out that it does not hold. We call this the inconsistent labelling problem. A counter-example is in Section 4. (1) Every initial deadlocking path of TS has a weakly equivalent initial deadlocking path in TSr. (2) Every initial deadlocking path of TSr has a weakly equivalent initial deadlocking path in TS. (3) Every initial infinite path of TS has a weakly equivalent initial infinite path in TSr. (4) Every initial infinite path of TSrhas a weakly equivalent initial infinite path in TS. Because the four items in this list are sufficient for TS ∼TSr , the issue could be resolved with the additional requirement that TS is consistently labelled, which would yield TS ,TSr (since TSr is a subgraph of TS , see Definition 3.1). However, this requirement is rather strong; we propose a more local solution in Section 5.
8:6 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 p1p2p3p4p5p6 t1t2t3t5t6 t4 2 2 32 Figure 2. An example motivating D1 and D2w. 3. Stubborn Sets 3.1. Basic Ideas. In POR, reduction functions play a central role. A reduction function r : S→ 2 Act indicates which actions to explore in each state. When starting at the initial state ˆs, a reduction function induces a reduced LSTS as follows. Definition 3.1. Let TS = ( S, →,ˆs, L ) be an LSTS and r : S→ 2 Act a reduction function. Then the reduced LSTS induced by r is defined as TSr = ( Sr,→r,ˆs, Lr ), where Lr is the restriction of Lon Sr, and Srand →rare the smallest sets such that the following holds: •ˆs∈Sr; and •If s∈Sr,sa −→ s0and a∈r(s), then s0∈Srand sa −→rs0. Note that we have →r⊆ →. In the first paper on stubborn sets [ Val88 ], the set r ( s ) was constructed so that if enabled actions exist, then it contains an enabled action that the outside world cannot disable. This inspired the thought that the set is “stubborn”, that is, determined to do something and not letting the outside world prevent it. Much more than this is needed to make TSr yield correct answers to verification questions concerning TS . Furthermore, some more recent methods do not necessarily put an enabled action in r ( s ) even if enabled actions do exist. So the name is imprecise, but has remained in use. The main question now is how to implement a practical reduction function so that answers to interesting verification questions can be obtained from the reduced LSTSs. Because this publication is about fixing an error that had been lurking for decades, we feel appropriate to present the full proof of the affected theorem anew as clearly as possible, in more detail than originally, to minimise the possibility that other errors remain. To this end, we proceed in small steps. We first discuss the motivating example from Figure 1, reproduced here in Figure 2. Assume that we know that the places adjacent to t3 are p3 and p4 ; they contain 2 and 1 tokens, respectively; the transitions adjacent to p3 and p4 are t2 to t5 ; and the arcs between them and their weights are as is shown in Figure 2. That is, we know the black part but not the grey part in the figure. Although our knowledge is incomplete, we can reason as follows that t3 is enabled and remains enabled until t3 or t5 occurs. It is enabled by the numbers of tokens in p3 and p4 , and by the weights of the arcs from them to t3 . An occurrence of t2 does not decrement the numbers of tokens in p3 and p4 , so it cannot disable t3 . The same applies to t1 and t6 . An occurrence of t4 decrements the number of tokens in p3 (but not in p4 ). However, thanks to the arc weight 2, it is guaranteed to leave at least 2 tokens in p3 . So it cannot disable t3either. This is an example of the kind of observations that stubborn set methods exploit. Together with some other observations that will be discussed soon, it will let us choose
Vol. 17:3 THE INCONSISTENT LABELLING PROBLEM 8:7 ss1. . . sn−1sn s0 n /∈r(s) a1an a∈r(s)⇒ ss1. . . sn−1sn s0s0 1s0 n−1s0 n a a a1an a a⇒ ss1. . . sn−1sn s0s0 1 s00 1s00 2. . . s0 n−1s0 n s00 n aa a a a1an a1a2an ⇒ ss1. . . sn−1sn s0s0 1. . . s0 n−1s0 n a a a1an a a1an a Figure 3. Visual representation of why D1 holds on the example. r ( s ) = {t3, t5, t6} , where s denotes the marking shown in Figure 2. Unfortunately, the observation is Petri net-specific. We now introduce a more abstract notion that captures the same idea: t3 is a key action of r ( s ) = {t3, t5, t6} in the sense of the following definition. Definition 3.2. An action a is a key action of r ( s ) in s if and only if for all paths sa1...an −−−−→ s0 such that a1/∈r(s), . . . , an/∈r(s), it holds that s0a −→. We typically denote key actions by akey . Note that a key action must be enabled in s : by setting n= 0, we have s=s0and sa −→. Many stubborn set methods assume that the sets r(s) satisfy the following condition. D2w: If enabled(s)6=∅, then r(s) contains a key action in s. In Figure 2, t5 is not a key action of {t3, t5, t6} , because it is disabled. Also t6 is not, because the sequence t1t2t4disables it. On the other hand, we now show that t3 , t5 and t6 have another property that stubborn set methods exploit: Figure 3 holds for each of them in the role of a and any finite sequence of elements of {t1, t2, t4} in the role of a1. . . an . We call t1 , t2 and t4 the outside transitions. Although the outside transitions can disable t6 , they cannot enable it again, because none of them can add tokens to p6 . Therefore, if t6 is enabled after the occurrence of some sequence a1. . . an of outside transitions, then it was enabled in the original marking s and in every marking between s and sn . This is illustrated by the first implication in Figure 3, with t6 in the role of a . The first implication applies to t3 as well, because its right-hand side applies, because t3is a key action of {t3, t5, t6}in s. Neither t3 nor t6 can disable outside transitions, because although they temporarily consume tokens from p3 or p6 , they put the same number of tokens back to them; and the outside transitions do not need tokens from p4 . This yields the second implication in the figure. Furthermore, Petri nets are commutative in the sense that if mt0t −→ m0 and mtt0 −→ m00 , then m0=m00. The last implication in the figure holds because of this. The implication chain also applies to t5 as a , but for a different reason: t5 is disabled, and no sequence of outside transitions can enable it, because only t6 can enable it. Therefore, no member of the chain holds for t5, so the chain holds vacuously.
8:8 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 ss1. . . sn−1sn s0 n /∈r(s) a1an a∈r(s)⇒ ss1. . . sn−1sn s0s0 1. . . s0 n−1s0 n a1an a a1an a Figure 4. Visual representation of condition D1. Again, we appealed to particular properties of Petri nets. To make the ideas applicable to a wide variety of formalisms for representing systems, we introduce the following condition, which is required to hold for all r ( s ). It is illustrated in Figure 4. We showed above that it holds for r(s) = {t3, t5, t6}in Figure 2. D1: For all states s1, . . . , sn, s0 n and all a∈r ( s ) and a1/∈r ( s ) , . . . , an/∈r ( s ), if sa1 −→ · · · an −→ sna −→ s0 n, then there are states s0, s0 1, . . . , s0 n−1such that sa −→ s0a1 −→ s0 1 a2 −→ · · · an −→ s0 n. 3.2. Deadlock Detection and Its Implementation. The conditions D2w and D1 are important, because they suffice for proving that all reachable deadlocks of the full LSTS are present also in the reduced LSTS. Furthermore, the deadlocks can be reached in the reduced LSTS by re-ordering the actions in the paths in the full LSTS that lead to them. In the theory below, recall that →rindicates which transitions occur in the reduced LSTS. Theorem 3.3. Assume that each r ( s )obeys D1 and D2w . If s0∈Sr , sn is a deadlock in TS , and s0a1 −→ s1a2 −→ . . . an −→ sn , then there is a permutation b1. . . bn of a1. . . an such that s0b1...bn −−−−→rsn. Proof. We prove the claim by induction on n . If n = 0 then sn = s0 and a1. . . an = ε , so the claim holds trivially with b1. . . bn=ε. From now on, let n > 0. We have s0a1 −→ and thus enabled ( s0 ) 6 = ∅ . By D2w , r ( s0 ) contains a key action akey . If none of a1 , . . . , an is in r ( s0 ), then by definition sn akey −−→ . However, that cannot be the case, because we assumed that sn is a deadlock. Therefore, there is 1 ≤i≤n such that ai∈r ( s0 ). We choose the smallest such i , yielding aj/∈r ( s0 ) for 1 ≤j < i . By this choice, D1 applies with ai in the role of a . So there are states s0 0 , s0 1 , . . . , s0 i−1 such that s0 i−1 = si and s0ai −→ s0 0 a1 −→ s0 1 a2 −→ · · · ai−1 −−−→ s0 i−1 . Because ai∈r ( s0 ) we have s0 0∈Sr and ( s0, ai, s0 0 ) ∈ →r , that is, s0ai −→rs0 0 . We remember that si ai+1...an −−−−−→ sn , so s0 0 a1...ai−1ai+1...an −−−−−−−−−−−→ sn . This path is one shorter than s0a1...an −−−−→ sn . Therefore, the induction assumption yields a permutation b2. . . bn of a1. . . ai−1ai+1 . . . an such that s0 0 b2...bn −−−−→rsn . As a consequence, s0aib2...bn −−−−−→rsn. The preservation of deadlocks needs also the following facts, which are easy to check from the definitions. •If s0a1...an −−−−→rsn, then s0a1...an −−−−→ sn. •s∈Sris a deadlock in TSrif and only if it is a deadlock in TS. To implement this deadlock detection method, an algorithm is needed that, given state s , computes a set r ( s ) that satisfies D1 and D2w . We already illustrated with Figure 2 that this may depend on the details of the formalism used to represent the system under
Vol. 17:3 THE INCONSISTENT LABELLING PROBLEM 8:15 s s0 a a1a2 a1a2 a s s0 a a1a2 a1a2 a s s0 a a1a2 a1a2 a s s0 a a1a2 a1a2 a s s0 a a1a2 a1a2 a s s0 a a1a2 a1a2 a s s0 a a1a2 a1a2 a s s0 a a1a2 a1a2 a s s0 a a1a2 a1a2 a a1and a2invisible ainvisible inconsistent labelling Figure 8. Nine possible scenarios when a∈r ( s ) and a1/∈r ( s ) , a2/∈r ( s ), according to conditions D1 and V . The dotted and dashed lines indicate when aor a1, a2are invisible, respectively. The core of the problem lies in the fact that condition D1 , even when combined with V , does not enforce that the two paths it considers are stutter equivalent. Consider the paths sa −→ and sa1a2a −−−→ and assume that a∈r ( s ) and a1/∈r ( s ) , a2/∈r ( s ). Condition V ensures that at least one of the following two holds: (i) a is invisible, or (ii) a1 and a2 are invisible. Half of the possible scenarios are depicted in Figure 8; the other half are symmetric. Again, the grey states (and only those states) are labelled with {q}. The two cases delimited with a solid line are problematic. In both LSTSs, the paths sa1a2a −−−→ s0 and saa1a2 −−−→ s0 are weakly equivalent, since a is invisible. However, they are not stutter equivalent, and therefore these LSTSs are not labelled consistently. The topmost of these two LSTSs forms the core of the counter-example TSC , with the rest of TSC serving to satisfy condition D2/D2w. 5. Strengthening Condition D1 To fix the issue with inconsistent labelling, we propose to strengthen condition D1 as follows1. 1 Based on a comment by one of the journal’s reviewers, we noticed that condition D1’ can be weakened further, by changing the last sentence to: “Furthermore, if none of a1,...,an is visible, then sia −→ s0 i for every 1 ≤i < n .” This weakening additionally allows a reduction in the bottom-middle LSTS of Figure 8, although this is hard to exploit in practice (see Section 5.2). However, given the nature of this study, we chose to not make any last-minute changes to avoid making new mistakes. This choice was further motivated by the following remark by another reviewer (for which we are grateful): “I really carefully checked all the results and proofs and can accept the arguments and conclusions.”
8:16 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 D1’: For all states s1, . . . , sn, s0 n and all a∈r ( s ) and a1/∈r ( s ) , . . . , an/∈r ( s ), if sa1 −→ s1a2 −→ · · · an −→ sna −→ s0 n , then there are states s0, s0 1, . . . , s0 n−1 such that sa −→ s0a1 −→ s0 1 a2 −→ · · · an −→ s0 n. Furthermore, if ais invisible, then sia −→ s0 ifor every 1 ≤i<n. On top of what is stated in D1 , the new condition D1’ requires the presence of intermediate vertical transitions sia −→ s0 i whenever a is invisible. In this case, V implies that a is invisible and, consequently, the presence of transitions sia −→ s0 i implies L ( si ) = L ( s0 i ). Thus, condition D1’ provides a form of local consistent labelling. Hence, the problematic cases of Figure 8 are resolved; a correctness proof is given below. Condition D1’ is very similar to condition C1 [ GKPP99 ], which is common in the context of ample sets. However, C1 requires that action a is globally independent of each of the actions a1, . . . , an , while D1’ merely requires a kind of local independence. Persistent sets [ God96 ] also rely on a condition similar to D1’ , and require local independence. Thus, under ample sets and persistent sets, the vertical transitions sia −→ s0 i are always present, and hence they do not suffer from the inconsistent labelling problem. 5.1. Correctness. To show that D1’ indeed resolves the inconsistent labelling problem, we amend the lemmata and proofs of Section 3. The core of the revised argument lies in a new version of Lemma 3.4 that relates the state labels of the two paths considered by D1’. Lemma 5.1. Assume that D1’ yields ρ = s0a −→ s0 0 a1 −→ s0 1 a2 −→ · · · an −→ s0 n from π = s0a1 −→ s1a2 −→ · · · an −→ sna −→ s0 n. If Vholds, then π,ρ. Proof. If a is invisible, then D1’ enforces that sia −→ s0 i for every 1 ≤i<n . Thus, we have L ( si ) = L ( s0 i ) for 1 ≤i≤n and π,ρ follows. From now on assume that a is visible. Because D1’ only applies if a∈r ( s ), r ( s ) contains an enabled visible action. By V , r ( s ) contains all visible actions. Because none of a1 , . . . , an is in r ( s ), they must be invisible and we have L ( s0 ) = L ( s1 ) = . . . = ( Ln ) and L ( s0 0 ) = L ( s0 1 ) = . . . = L ( s0 n ). So the traces of πand ρare L(s0)n+1L(s0 n) and L(s0)L(s0 n)n+1, respectively. We conclude that π,ρ. We use the same reasoning to derive the existence of a transition sk akey −−→ s0 k for every k > 0 in the proof of Lemma 3.6, which yields the stronger result that, if akey is invisible, no-stut ( π ) = no-stut ( ρ ). The other lemmata are changed by replacing every occurrence of vis by no-stut . Furthermore, in the proof of Lemma 3.9, we reason about a visible action ai,v that actually changes the state labelling. This results in the following two theorems that replace Theorems 3.5 and 3.10 respectively. Theorem 5.2. Assume that each r ( s )obeys D1’ , D2w and V . If s∈Sr , sn is a deadlock in TS , then for all paths π = sa1...an −−−−→ sn , there is a path ρ = sb1...bn −−−−→rsn such that no-stut(π) = no-stut(ρ). Theorem 5.3. Assume that each r ( s )obeys D1’ , D2w , V , I and L . For all s∈Sr and π=sa1a2... −−−−→, there is a path ρ=sb1b2... −−−−→rsuch that no-stut(π) = no-stut(ρ). With →r⊆ → , it follows immediately that the replacement of condition D1 by D1’ is sufficient to ensure the reduced transition system TSr is stutter-trace equivalent to the original transition system TS. Thus, the problem with Theorem 2.5 is resolved.
Vol. 17:3 THE INCONSISTENT LABELLING PROBLEM 8:17 5.2. Implementation. As discussed in Section 3.2, most, if not all, implementations of stubborn sets approximate D1 based on a binary relation ; on actions. This relation may even (partly) depend on the current state s , in which case we write ;s , and it should be such that condition D1 is satisfied whenever a∈r ( s ) and a;sa0 together imply a0∈r ( s ). A set satisfying D0 , D1 , D2 , V and I or D1 , D2w , V and I can be found by searching for a suitable strongly connected component in the graph ( Act,;s ). Condition L is dealt with by other techniques. Practical implementations construct ;s by analysing how any two actions a and a0 interact. If a is enabled, the simplest (but not necessarily the best possible) strategy is to make a;sa0 if and only if a and a0 access at least one place (in the case of Petri nets) or variable (in the more general case) in common. This can be relaxed, for instance, by not considering commutative accesses, such as writing to and reading from a FIFO buffer. As a result, ;scan only detect reduction opportunities in (sub)graphs of the shape ss1. . . sn−1sn s0s0 1. . . s0 n−1s0 n a1an a a1an aa a where a∈r ( s ) and a1/∈r ( s ) , . . . , an/∈r ( s ). The presence of the vertical a transitions in s1, . . . , sn−1implies that D1’ is also satisfied by such implementations. 5.3. Deterministic LSTSs. As already noted in Section 4, strong stubborn sets for deterministic systems do not suffer from the inconsistent labelling problem. The following lemma, which also appeared as [Val17, Lemma 4.2], shows why. Lemma 5.4. For deterministic LSTSs, conditions D1 and D2 together imply D1’. Proof. Let TS be a deterministic LSTS, π = s0a1 −→ s1a2 −→ · · · an −→ sna −→ s0 n a path in TS and r a reduction function that satisfies D1 and D2 . Furthermore, assume that a∈r ( s0 ) and a1/∈r ( s0 ) , . . . , an/∈r ( s0 ). By applying D1 , we obtain the path π0 = s0a −→ s0 0 a1 −→ · · · an −→ s0 n , which satisfies the first part of condition D1’ . With D2 , we have sia −→ si i for every 1 ≤i≤n . Then, we can also apply D1 to every path s0a1 −→ · · · ai −→ sia −→ si i to obtain, for all 1 ≤i≤n , paths πi = s0a −→ si 0 a1 −→ si 1 a2 −→ · · · ai −→ si i . Since TS is deterministic, every path πi must coincide with a prefix of π0 . We conclude that si i = s0 i and so the requirement that sia −→ s0 i for every 1 ≤i≤nis also satisfied. 6. Safe Logics In this section, we will identify two logics, viz. reachability and CTL −X , which are not affected by the inconsistent labelling problem. This is either due to their limited expressivity or the additional POR conditions that are required on top of the conditions we have introduced so far.
8:18 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 6.1. Reachability properties. Although the counter-example of Section 4 shows that stutter-trace equivalence is in general not preserved by stubborn sets, some fragments of LTL −X are preserved. One such class of properties is reachability properties, which are of the shape for 3f, where fis a formula not containing temporal operators. Theorem 6.1. Let TS be an LSTS, r a reduction function that satisfies either D0 , D1 , D2 , V and L or D1 , D2w , V and L and TSr the reduced LSTS. For all possible labellings l⊆AP , TS contains an initial path to a state s such that L ( s ) = l iff TSr contains an initial path to a state s0such that L(s0) = l. Proof. The “if” case is trivial, since TSr is a subgraph of TS . For the “only if” case, we reason as follows. Let TS = ( S, →,ˆs, L ) be an LSTS and π = s0a1 −→ · · · an −→ sn an initial path, i.e., s0 = ˆs . We mimic this path by repeatedly taking some enabled action a that is in the stubborn set, according to the following schema. Below, we assume the path to be mimicked contains at least one visible action. Otherwise, its first state would have the same labelling as sn. (1) If there is an i such that ai∈r ( s0 ), we consider the smallest such i ,i.e., a1/∈ r ( s0 ) , . . . , ai−1/∈r ( s0 ). Then, we can shift ai forward by D1 , move towards sn along s0ai −→ s0 0and continue by mimicking s0 0 a1 −→ · · · ai−1 −−−→ si ai+1 −−−→ · · · an −→ sn. (2) If all of a1/∈r ( s0 ) , . . . , an/∈r ( s0 ), then, by D0 and D2 or by D2w , there is a key action akey in s0 . By the definition of key actions and D1 , akey leads to a state s0 0 from which we can continue mimicking the path s0 0 a1 −→ s0 1 a2 −→ · · · an −→ s0 n . Note that L ( sn ) = L ( s0 n ), since akey is invisible by condition V. The second case cannot be repeated infinitely often, due to condition L . Hence, after a finite number of steps, we reach a state s0 nwith L(s0 n) = L(sn). We remark that more efficient mechanisms for reachability checking under POR have been proposed, such as condition S [ VH17 ], which can replace L , or conditions based on up-sets [ Sch00 ]. Another observation is that model checking of LTL −X properties can be reduced to reachability checking by computing the cross-product of a B¨uchi automaton and an LSTS [ BK08 ], in the process resolving the inconsistent labelling problem. Peled [ Pel96 ] shows how this approach can be combined with POR, but please note the correctness issues detailed in [Sie19]. 6.2. Deterministic LSTSs and CTL−XModel Checking. In this section, we consider the inconsistent labelling problem in the setting of CTL −X model checking. When applying stubborn sets in that context, stronger conditions are required to preserve the branching structure that CTL −X reasons about. Namely, the original LSTS must be deterministic and one more condition needs to be added [GKPP99]: C4: Either r(s) = Act or r(s)∩enabled(s) = {a}for some a∈Act. We slightly changed its original formulation to match the setting of stubborn sets. A weaker condition, called ¨ A8 , which does not require determinism of the whole LSTS is proposed in [ Val97 ]. With C4 , strong and weak stubborn sets collapse, as shown by the following lemma. Lemma 6.2. Conditions D2w and C4 together imply D0 and D2.
Vol. 17:3 THE INCONSISTENT LABELLING PROBLEM 8:19 p1 p2 p3 p4 p5 p6 t1t2 t t3 tkey 2 101100 ˆm 010100 {qp} 001110 101010 010010 {ql} 001020 101001 010001 {qp} 001011 001000 {q} t t1t2 t1t2 t tkey t1t2 tkey tkey t3 Figure 9. Example of a Petri net whose LSTS suffers from the inconsistent labelling problem. Proof. Let TS be an LSTS, s a state and r a reduction function that satisfies D2w and C4 . Condition D0 is trivially implied by C4 . Using C4 , we distinguish two cases: either r ( s ) contains precisely one enabled action a , or r ( s ) = Act . In the former case, this single action a must be a key action, according to D2w . Hence, D2 , which requires that all enabled actions in r ( s ) are key actions, is satisfied. Otherwise, if r ( s ) = Act , we consider an arbitrary action a that satisfies D2 ’s precondition that sa −→ . Given a path sa1...an −−−−→ , the condition that a1/∈r ( s ) , . . . , an/∈r ( s ) only holds if n = 0. We conclude that D2 ’s condition sa1...ana −−−−−→ is satisfied by the assumption sa −→. It follows from Lemmata 5.4 and 6.2 and Theorems 5.2 and 5.3 that CTL −X model checking of deterministic systems with stubborn sets does not suffer from the inconsistent labelling problem. The same holds for condition ¨ A8, as already shown in [Val97]. 7. Petri Nets In this section, we discuss the impact of the inconsistent labelling problem on Petri nets. Contrary to Section 2.2, here we assume the LSTS of a Petri net has the set of all markings M as its set of states. This does not affect the correctness of POR, as long as the set of reachable states Mreach is finite. As before, we assume that the LSTS contains some labelling function L : M → 2 AP . More details on how a labelling function arises from a Petri net are given below. Like in the Petri net examples we saw earlier, markings and structural transitions take over the role of states and actions respectively. Note that the LSTS of a Petri net is deterministic. We want to stress that all the theory in this section is specific for the semantics defined in Section 2.2. Example 7.1. Consider the Petri net with initial marking ˆm on left of Figure 9. Here, all arcs are weighted 1, except for the arc from p5 to t3 , which is weighted 2. Its LSTS is infinite, but the substructure reachable from ˆm is depicted on the right. The number of tokens in each of the places p1, . . . , p6 is inscribed in the nodes, the state labels (if any) are written beside the nodes. The LSTS practically coincides with the counter-example of Section 4. Only the selfloops are missing and the state labelling, with atomic propositions q , qp and ql , differs slightly; the latter will be explained later. For now, note that t and tkey are invisible and
8:20 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 that the trace ∅{qp}∅∅{q} , which occurs when firing transitions t1t2tt3 from ˆm , can be lost when reducing with weak stubborn sets. In the remainder of this section, we fix a Petri net ( P, T, W, ˆm ) and its LSTS ( M,→ ,ˆm, L ). Below, we consider three different types of atomic propositions. Firstly, polynomial propositions [ BJLM19 ] are of the shape f ( p1, . . . , pn ) ./ k where f is a polynomial over p1, . . . , pn , ./ ∈ {<, ≤, >, ≥, = ,6 = } and k∈Z . Such a proposition holds in a marking m iff f ( m ( p1 ) , . . . , m ( pn )) ./ k . A linear proposition [ LW19 ] is similar, but the function f over places must be linear and f (0 ,..., 0) = 0, i.e., linear propositions are of the shape k1p1 + · · · + knpn./ k , where k1, . . . , kn, k ∈Z . Finally, we have arbitrary propositions [ Var05 ], whose shape is not restricted and which can hold in any given set of markings. Several other types of atomic propositions can be encoded as polynomial propositions. For example, fireable ( t ) [ BJLM19 , LW19 ], which holds in a marking m iff t is enabled in m , can be encoded as Qp∈PQW(p,t)−1 i=0 ( p−i ) ≥ 1. The proposition deadlock , which holds in markings where no structural transition is enabled, does not require special treatment in the context of POR, since it is already preserved by D1 and D2w . The sets containing all linear and polynomial propositions are henceforward called APl and APp , respectively. The corresponding labelling functions are defined as Ll ( m ) = L ( m ) ∩APl and Lp ( m ) = L ( m ) ∩APp for all markings m . Below, the two stutter equivalences ,Ll and ,Lp that follow from the new labelling functions are abbreviated ,l and ,p , respectively. Note that AP ⊇APp⊇APland ,⊆,p⊆,l. For the purpose of introducing several variants of invisibility, we reformulate and generalise the definition of invisibility from Section 2. Given an atomic proposition q∈AP , a relation R ⊆ M×M is q -invisible if and only if ( m, m0 ) ∈ R implies q∈L ( m ) ⇔q∈L ( m0 ). We consider a structural transition t q -invisible iff its corresponding relation { ( m, m0 ) | mt −→ m0} is q -invisible. Invisibility is also lifted to sets of atomic propositions: given a set AP0⊆AP , relation R is AP0 -invisible iff it is q -invisible for all q∈AP0 . If R is AP -invisible, we plainly say that R is invisible. AP0 -invisibility and invisibility carry over to structural transitions. We sometimes refer to invisibility as ordinary invisibility for emphasis. Note that the set of invisible structural transitions I is no longer an under-approximation, but contains exactly those structural transitions t for which mt −→ m0 implies L ( m ) = L ( m0 ) (cf. Section 2). We are now ready to introduce three orthogonal variations on invisibility. Definition 7.2. Let R ⊆ M × M be a relation on markings. Then, • R is reach q-invisible [VH17] iff R ∩ (Mreach × Mreach ) is q-invisible; and • R is value q-invisible iff –q = ( f ( p1, . . . , pn ) ./ k ) is polynomial and for all pairs of markings ( m, m0 ) ∈ R , we have that f(m(p1), . . . , m(pn)) = f(m0(p1), . . . , m0(pn)); or –qis not polynomial and Ris q-invisible. Intuitively, under reach q -invisibility, all pairs of reachable markings ( m, m0 ) ∈ R have to agree on the labelling of q . For value invisibility, the value of the polynomial f must never change between two markings ( m, m0 ) ∈ R . Reach and value invisibility are lifted to structural transitions and sets of atomic propositions as before, i.e., by taking R={(m, m0)|mt −→ m0}when considering invisibility of t. Definition 7.3. A structural transition t is strongly q -invisible iff the set { ( m, m0 ) | ∀p∈ P:m0(p) = m(p) + W(t, p)−W(p, t)}is q-invisible.
Vol. 17:3 THE INCONSISTENT LABELLING PROBLEM 8:21 IsIv I Ir sIr v Ir Ir sv Isv Figure 10. Lattice of sets of invisible actions. Arrows represent a subset relation. Strong invisibility does not take the presence of a transition mt −→ m0 into account, and purely reasons about the effects of t . Value invisibility and strong invisibility are new in the current work, although strong invisibility was inspired by the notion of invisibility that is proposed by Varpaaniemi in [ Var05 ]. Our definition of strong invisibility weakens the conditions of Varpaaniemi. We indicate the sets of all value, reach and strongly invisible structural transitions with Iv , Ir and Is respectively. Since Iv⊆ I , Is⊆ I and I ⊆ Ir , the set of all their possible combinations forms the lattice shown in Figure 10. In the remainder, the weak equivalence relations that follow from each of the eight invisibility notions are abbreviated, e.g., ∼Ir sv becomes ∼r sv. Example 7.4. Consider again the Petri net and LSTS from Example 7.1. We can define ql and qpas linear and polynomial propositions, respectively: •ql := p3 + p4 + p6 = 0 is a linear proposition, which holds when neither p3 , p4 nor p6 contains a token. Structural transition t is ql -invisible, because mt −→ m0 implies that m ( p3 ) = m0 ( p3 ) ≥ 1, and thus neither m nor m is labelled with ql . On the other hand, t is not value ql -invisible (by the transition 101100 t −→ 101010) or strongly reach ql -invisible (by 010100 and 010010). However, tkey is strongly value ql -invisible: it moves a token from p4to p6and hence never changes the value of p3+p4+p6. •qp := (1 −p3 )(1 −p5 ) = 1 is a polynomial proposition, which holds in all reachable markings m where m ( p3 ) = m ( p5 ) = 0 or m ( p3 ) = m ( p5 ) = 2. Structural transition t is reach value qp -invisible, but not qp -invisible (by 002120 t −→ 002030) or strongly reach qp invisible. Strong value qp -invisibility of tkey follows immediately from the fact that the adjacent places of tkey,viz. p4and p6, do not occur in the definition of qp. This yields the state labelling which is shown in Example 7.1. Given a weak equivalence relation R∼ and a stutter equivalence relation R, , we write R∼R, to indicate that R∼ and R, yield consistent labelling (Definition 2.4). We spend the rest of this section investigating under which notions of invisibility and propositions from the literature, the LSTS of a Petri net is labelled consistently. More formally, we check for each weak equivalence relation R∼ and each stutter equivalence relation R, whether R∼R, . This tells us when existing stubborn set theory can be applied without problems. The two lattices containing all weak and stuttering equivalence relations are depicted in Figure 11; each dotted arrow represents a consistent labelling result. Before we continue, we first introduce an auxiliary lemma.
8:22 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 ∼s∼v ∼ ∼r s∼r v ∼r ∼r sv ∼sv , ,p ,l Theorem 7.9 Theorem 7.8 Theorem 7.6 Figure 11. Two lattices containing variations of weak equivalence and stutter equivalence, respectively. Solid arrows indicate a subset relation inside the lattice; dotted arrows follow from the indicated theorems and show when the LSTS of a Petri net is labelled consistently. Lemma 7.5. Let I be a set of invisible structural transitions and L some labelling function. If for all t∈I and paths π = m0t1 −→ m1t2 −→ . . . and π0 = m0t −→ m0 0 t1 −→ m0 1 t2 −→ . . . , it holds that π,Lπ0, then ∼I,L. Proof. We assume that the following holds for all paths and t∈I: m0t1 −→ m1t2 −→ · · · ,Lm0t −→ m0 0 t1 −→ m0 1 t2 −→ . . . (†) To prove ∼I,L , we need to consider two initial paths π and π0 such that π∼Iπ0 and prove that π,Lπ0 (see Definition 2.4). The proof proceeds by induction on the combined number of invisible structural transitions (taken from I ) in π and π0 . In the base case, π and π0 contain only visible structural transitions, and π∼Iπ0 implies π = π0 since Petri nets are deterministic. Hence, π,Lπ0. For the induction step, we take as hypothesis that, for all initial paths π and π0 that together contain at most k invisible structural transitions, π∼Iπ0 implies π,Lπ0 . Let π and π0 be two arbitrary initial paths such that π∼Iπ0 and the total number of invisible structural transitions contained in π and π0 is k . We consider the case where an invisible structural transition is introduced in π0 , the other case is symmetric. Let π0 = σ1σ2 for some σ1 and σ2 . Let t∈I be some invisible structural transition and π00 = σ1tσ0 2 such that σ2 and σ0 2 contain the same sequence of structural transitions. Clearly, we have π0∼Iπ00 . Here, we can apply our original assumption ( † ), to conclude that σ2,tσ0 2 ,i.e., the extra stuttering step t thus does not affect the labelling of the remainder of π00 . Hence, we have π0,Lπ00 and, with the induction hypothesis, π,Lπ00 . Note that π and π00 together contain k + 1 invisible structural transitions. In case πand π0together contain an infinite number of invisible structural transitions, π∼Iπ0 implies π,Lπ0 follows from the fact that the same holds for all finite prefixes of π and π0that are related by ∼I. The following theorems each focus on a class of atomic propositions and show which notion of invisibility is required for the LSTS of a Petri net to be labelled consistently. In the proofs, we use a function dt , defined as dt ( p ) = W ( t, p ) −W ( p, t ) for all places p , which indicates how structural transition t changes the state. Furthermore, we also consider functions of type P→N as vectors of type N|P| . This allows us to compute the pairwise addition of a marking m with dt ( m + dt ) and to indicate that t does not change the marking (dt= 0). Theorem 7.6. Under reach value invisibility, the LSTS underlying a Petri net is labelled consistently for linear propositions, i.e.,∼r v,l.
Vol. 17:3 THE INCONSISTENT LABELLING PROBLEM 8:23 Proof. Let t∈ Ir v be a reach value invisible structural transition such that there exist reachable markings m and m0 with mt −→ m0 . If such a t does not exist, then ∼r v is the reflexive relation and ∼r v,l is trivially satisfied. Otherwise, let q := f ( p1, . . . , pn ) ./ k be a linear proposition. Since t is reach value invisible and f is linear, we have f ( m ) = f ( m0 ) = f ( m + dt ) = f ( m ) + f ( dt ) and thus f ( dt ) = 0. It follows that, given two paths π = m0t1 −→ m1t2 −→ . . . and π0 = m0t −→ m0 0 t1 −→ m0 1 t2 −→ . . . , the addition of t does not influence f , since f ( mi ) = f ( mi ) + f ( dt ) = f ( mi + dt ) = f ( m0 i ) for all i . As a consequence, t also does not influence q. With Lemma 7.5, we deduce that ∼r v,l. Whereas in the linear case one can easily conclude that π and π0 are stutter equivalent under f , in the polynomial case, we need to show that f is constant under all value invisible structural transitions t , even in markings where t is not enabled. This follows from the following proposition. Proposition 7.7. Let f : Nn→Z be a polynomial function, a, b ∈Nn two constant vectors and c = a−b the difference between a and b . Assume that for all x∈Nn such that x≥b , where ≥ denotes pointwise comparison, it holds that f ( x ) = f ( x + c ). Then, f is constant in the vector c,i.e.,f(x) = f(x+c)for all x∈Nn. Proof. Let f , a , b and c be as above and let 1∈Nn be the vector containing only ones. Given some arbitrary x∈Nn , consider the function gx ( t ) = f ( x + t·1 + c ) −f ( x + t·1 ). For sufficiently large t , it holds that x + t·1≥b , and it follows that gx ( t ) = 0 for all sufficiently large t . This can only be the case if gx is the zero polynomial, i.e., gx ( t ) = 0 for all t . As a special case, we conclude that gx(0) = f(x+c)−f(x) = 0. The intuition behind this is that f ( x + c ) −f ( x ) behaves like the directional derivative of f with respect to c . If the derivative is equal to zero in infinitely many x , f must be constant in the direction of c. We will apply this result in the following theorem. Theorem 7.8. Under value invisibility, the LSTS underlying a Petri net is labelled consistently for polynomial propositions, i.e.,∼v,p. Proof. Let t∈ Iv be a value invisible structural transition, m and m0 two markings with mt −→ m0 , and q := f ( p1, . . . , pn ) ./ k a polynomial proposition. Note that infinitely many such (not necessarily reachable) markings exist in M , so we can apply Proposition 7.7 to obtain f ( m ) = f ( m + dt ) for all markings m . It follows that, given two paths π = m0t1 −→ m1t2 −→ . . . and π0 = m0t −→ m0 0 t1 −→ m0 1 t2 −→ . . . , the addition of t does not alter the value of f , since f ( mi ) = f ( mi + dt ) = f ( m0 i ) for all i . As a consequence, t also does not change the labelling of q. Application of Lemma 7.5 yields ∼v,p. Varpaaniemi shows that the LSTS of a Petri net is labelled consistently for arbitrary propositions under his notion of invisibility [ Var05 , Lemma 9]. Our notion of strong visibility, and especially strong reach invisibility, is weaker than Varpaaniemi’s invisibility, so we generalise the result to ∼r s,. Theorem 7.9. Under strong reach visibility, the LSTS underlying a Petri net is labelled consistently for arbitrary propositions, i.e.,∼r s,. Proof. Let t∈ Ir s be a strongly reach invisible structural transition and π = m0t1 −→ m1t2 −→ . . . and π0 = m0t −→ m0 0 t1 −→ m0 1 t2 −→ . . . two paths. Since, m0 i = mi + dt for all i , it holds that either (i) dt = 0 and mi = m0 i for all i ; or (ii) each pair ( mi, m0 i ) is contained in { ( m, m0 ) | ∀p∈P : m0 ( p ) = m ( p ) + W ( t, p ) −W ( p, t ) } , which is the set that underlies strong
8:24 T. Neele, A. Valmari, and T.A.C. Willemse Vol. 17:3 reach invisibility of t . In both cases, L ( mi ) = L ( m0 i ) for all i . It follows from Lemma 7.5 that ∼r s,. To show that the results of the above theorems cannot be strengthened, we provide two negative results. Theorem 7.10. Under ordinary invisibility, the LSTS underlying a Petri net is not necessarily labelled consistently for arbitrary propositions, i.e.,∼ 6 ,. Proof. Consider the Petri net from Example 7.1 with the arbitrary proposition ql . Disregard qp for the moment. Structural transition t is ql -invisible, hence the paths corresponding to t1t2tt3 and tt1t2t3 are weakly equivalent under ordinary invisibility. However, they are not stutter equivalent. Theorem 7.11. Under reach value invisibility, the LSTS underlying a Petri net is not necessarily labelled consistently for polynomial propositions, i.e.,∼r v6 ,p. Proof. Consider the Petri net from Example 7.1 with the polynomial proposition qp := (1 −p3 )(1 −p5 ) = 1 from Example 7.4. Disregard ql in this reasoning. Structural transition t is reach value qp -invisible, hence the paths corresponding to t1t2tt3 and tt1t2t3 are weakly equivalent under reach value invisibility. However, they are not stutter equivalent for polynomial propositions. It follows from Theorems 7.10 and 7.11 and transitivity of ⊆ that Theorems 7.6, 7.8 and 7.9 cannot be strengthened further. In terms of Figure 11, this means that the dotted arrows cannot be moved downward in the lattice of weak equivalences and cannot be moved upward in the lattice of stutter equivalences. The implications of these findings on related work will be discussed in the next section. 8. Related Work There are many works in the literature that apply stubborn sets. We will consider several works that aim to preserve LTL −X and discuss whether they are correct when it comes to the inconsistent labelling problem. Furthermore, we also identify several unrelated issues. Liebke and Wolf [ LW19 ] present an approach for efficient CTL model checking on Petri nets. For some formulas, they can reduce CTL model checking to LTL model checking, which allows greater reductions under POR. They rely on the incorrect LTL preservation theorem, and since they apply the techniques on Petri nets with ordinary invisibility, their theory is incorrect (Theorem 7.10). Similarly, the overview of stubborn set theory presented by Valmari and Hansen in [ VH17 ] applies reach invisibility and does not necessarily preserve LTL −X . Varpaaniemi [ Var05 ] also applies stubborn sets to Petri nets, but relies on a visibility notion that is stronger than strong invisibility. The correctness of these results is thus not affected (Theorem 7.9). A generic implementation of weak stubborn sets for the LTSmin model checker is proposed by Laarman et al. [ LPvdPH16 ]. They use abstract concepts such as guards and transition groups to implement POR in a way that is agnostic of the input language. The theory they present includes condition D1 , which is too weak and thus incorrect, but the accompanying implementation follows the framework of Section 5.2, and thus it is correct by Theorems 5.2 and 5.3. The implementations proposed in [ VH17 , Wol18 ] are similar, albeit specific for Petri nets.