petri nets tutorial parametric verification session 3
play

Petri Nets Tutorial, Parametric Verification (session 3) tienne - PowerPoint PPT Presentation

Petri Nets Tutorial, Parametric Verification (session 3) tienne Andr, Didier Lime, Wojciech Penczek, Laure Petrucci LIPN, Universit Paris 13 Etienne.Andre@lipn.univ-paris13.fr LS2N, cole Centrale de Nantes Didier.Lime@ec-nantes.fr


  1. Synthesis Exact synthesis is not feasible in general; It can be done for postT-PPNs: the solution set is upward-closed and we can use Valk and Jantzen’s algorithm Valk and Jantzen [1985] ; Similarly for preT-PPNs: the solution is downward-closed so its complement is upward-closed; Increasing expressiveness to DistinctT-PPNs raises practical issues: we cannot represent the solution set with a formalism for which emptiness of the intersection with equality constraints is decidable: Take a general PPN 1 Duplicate parameters p used in both pre and post arcs as p − used only in pre 2 arcs and p + used only in post arcs; Synthesize the solution set of the obtained DistinctT-PPN; 3 Intersect with p − = p + ; 4 Test emptiness. 5 24 / 70

  2. Conclusion Parametric Petri Nets are an expressive but undecidable model; There are interesting and still expressive decidable subclasses; For those subclasses, parametric coverability is EXPSPACE-complete; We still need efficient (possibly approximate) synthesis algorithms. 25 / 70

  3. Conclusion Parametric Petri Nets are an expressive but undecidable model; There are interesting and still expressive decidable subclasses; For those subclasses, parametric coverability is EXPSPACE-complete; We still need efficient (possibly approximate) synthesis algorithms. Let us now see how timing parameters can be introduced in (time) Petri Nets 25 / 70

  4. 26 / 70

  5. Parametric Time Petri Nets 27 / 70

  6. First of all. . . You now know about: Parametric Petri nets Decidability issues 28 / 70

  7. First of all. . . You now know about: Parametric Petri nets Decidability issues Let us now review Parametric Time Petri nets 28 / 70

  8. Parametric Time Petri Nets (PTPNs) p 0 p 1 t 0 [ 0 , 1 ] t 1 [ 2 , + ∞ [ p 2 29 / 70

  9. Parametric Time Petri Nets (PTPNs) p 0 p 1 t 1 [ 2 , + ∞ [ t 0 [ a , b ] p 2 29 / 70

  10. Undecidability Results for Parametric TPNs We have a structural translation from timed automata to bounded time Petri nets preserving timed language (implying state reachability) Bérard et al. [2013] Has one gadget per simple constraint in guards and timing constants appear explicitly; It extends trivially to parameterized guards. Theorem The EF-emptiness problem is undecidable for bounded parametric time Petri nets. 30 / 70

  11. Decidability Results for Parametric TPNs We also have structural translations the other way round (preserving almost everything); Bérard et al. [2013] All decidability results carry over to parametric Petri nets; The symbolic state abstraction presented earlier can also be defined for PTPNs; Gardey et al. [2006] EFSynth and similar algorithms can be used as is for PTPNs! But TPNs enjoy a “better” symbolic abstraction: Berthomieu & Menasche’s State Classes. Berthomieu and Menasche [1983]; Berthomieu and Diaz [1991] 31 / 70

  12. State Classes for Time Petri Nets State classes also regroup states obtained with the same discrete transition sequence in a pair ( l , Z ) where Z is a zone; But states record time to firing instead of time elapsed; New times to fire: 1 ≤ t 0 ≤ 4 Initially:    p 0 p 1  2 ≤ t ′ 1 + t 0 ≤ 3   1 ≤ t 0 ≤ 4 �  t 0 ≤ t ′ 1 + t 0   2 ≤ t 1 ≤ 3 Disabled (incl. t 0 ): t 0 [ 1 , 4 ] t 1 [ 2 , 3 ] Fire t 0 : � 0 ≤ t ′ 1 ≤ 2 1 ≤ t 0 ≤ 4    Newly enabled:  2 ≤ t 1 ≤ 3 p 2    t 0 ≤ t 1   � 1 ≤ t 0 ≤ 4 0 ≤ t 1 ≤ 2 32 / 70

  13. State Classes for Parametric Time Petri Nets Successive state classes computations are done with classic polyhedral operations; They can be extended to account for timing parameters Traonouez et al. [2009] : New times to fire: Initially: a ≤ t 0 ≤ 4    p 0 p 1  2 ≤ t ′ 1 + t 0 ≤ b  a ≤ t 0 ≤ 4 �   t 0 ≤ t ′ 1 + t 0   2 ≤ t 1 ≤ b Disabled (incl. t 0 ): t 0 [ a , 4 ] t 1 [ 2 , b ] Fire t 0 : � 0 ≤ t ′ 1 ≤ b − a  a ≤ t 0 ≤ 4    2 ≤ t 1 ≤ b   Newly enabled:  p 2  t 0 ≤ t 1      ( a ≤ b )  � a ≤ t 0 ≤ 4  0 ≤ t 1 ≤ b − a 33 / 70

  14. Synthesis for Parametric TPNs EFSynth works the same with parametric state classes; if l ∈ G  Z ↓ P    if S ∈ M  ∅ EF G ( S , M ) =    S ′ = Next ( S , t ) EF G � � otherwise. S ′ , M ∪ { S }  �  t ∈ T    We can also do synthesis for inevitability Jovanovi´ c et al. [2015] : if l ∈ G  Z ↓ P    if S ∈ M  ∅ AF G ( S , M ) =   � � ��  � � � ∪ ( Q P \ S ′ ↓ P ) AF G \ dead ( S ) otherwise  S ′ , M ∪ { S }   t ∈ T   S ′ = Next ( S , t ) S = ( l , Z ) , G a set of markings to reach; M is a list of visited state classes; Next ( S , t ) computes the state class successor of S by transition t ; dead ( S ) is the set of parameters s.t. S has no successor; termination is not guaranteed. 34 / 70

  15. AF: Cutting for More p 1 p 0 p 2 t 1 [ 0 , ∞ ) t 2 [ 1 , 2 a ] Put a token in p 1 : no constraint Put a token in p 2 : a ≥ 1 2 Ensuring both paths are possible (for AF ( p 1 > 0 or p 2 > 0)): a ≥ 1 2 Or we can cut t 2 and p 2 off with a < 1 2 and the property is satisfied with no further constraint Finally, AF ( p 1 > 0 or p 2 > 0) is satisfied for all values of a . 35 / 70

  16. Symbolic Synthesis for Bounded Integers EF-emptiness is undecidable for integer parameters Alur et al. [1993] ; It is undecidable for bounded rational parameters Miller [2000] ; It is PSPACE-complete for bounded integer parameters Jovanovi´ c et al. [2015] . non-deterministically guess a parameter valuation and store it (polynomial storage size); instantiate the PTA or PTPN and solve the problem (PSPACE); PSPACE = NPSPACE (Savitch’s theorem). Synthesis can be done symbolically, using integer hulls: y x 36 / 70

  17. Symbolic Synthesis for Bounded Integer Parameters IEF computes polyhedra containing exactly the “good” integer parameter valuations:  if l ∈ G Z ↓ P    if S ∈ M  ∅ IEF G ( S , M ) =    � � S ′ = IH ( Next ( S , t )) IEF G S ′ , M ∪ { S } otherwise.  �  t ∈ T    It is guaranteed to terminate when the parameters are bounded; AF can be modified similarly. 37 / 70

  18. Density of the Results The question: the result of IEF or IAF is a union of convex polyhedra; we know that these sets contain exactly the “good” integer valuations; but what of the non-integer valuations in those polyhedra? The short answer: they are all “good” for IEF (but we can do a bit better); they are in general not all “good” for IAF (and we can do a bit better). 38 / 70

  19. The Result of IAF is not Dense p 1 p 0 p 2 t 1 [ 0 , ∞ ) t 2 [ 1 , 2 a ] To ensure AF ( p 1 > 0 ) , cut t 2 and p 2 , i.e., take a < 1 2 ; When p 2 is marked, Z 2 = { 1 ≤ x ∧ 1 ≤ 2 a } , so IH ( C 2 ) = { 1 ≤ x ∧ 1 ≤ a } So, to cut ( p 2 = 1 , IH ( Z 2 )) , we need a < 1. 1 2 ≤ a < 1 are not “good” valuations. 39 / 70

  20. Integer-preserving Dense Underapproximations In IAF, we cut off not enough states because IH ( Z ) ⊆ Z ; Solution: use integer hulls only for convergence André et al. [2015] : if l ∈ G  Z ↓ P    if IH ( S ) ∈ M  ∅ RIEF G ( S , M ) =    � � S ′ = Next ( S , t ) EF G S ′ , M ∪ { IH ( S ) } otherwise.  �  t ∈ T    Similarly for RIAF; Gives a “dense” underapproximation containing at least all integer valuations. 40 / 70

  21. Dense Integer-preserving Underapproxations p 1 p 0 p 2 t 1 [ 0 , ∞ ) t 2 [ 1 , 2 a ] AF l 1 : a < 1 2 instead of (erroneous) a < 1 for IAF EF l 2 : a ≥ 1 2 instead of a ≥ 1 for IEF 41 / 70

  22. Conclusion Time Petri nets are well-suited to timing parametrization; Bounded PTPNs globally have the same decidability results as PTA; Synthesis (semi-)algorithms for PTA can be adapted for PTPN (and are sometimes a bit simpler); They can use state classes; General synthesis is hard and approximate/partial synthesis is a good way to address this problem; 42 / 70

  23. Conclusion Time Petri nets are well-suited to timing parametrization; Bounded PTPNs globally have the same decidability results as PTA; Synthesis (semi-)algorithms for PTA can be adapted for PTPN (and are sometimes a bit simpler); They can use state classes; General synthesis is hard and approximate/partial synthesis is a good way to address this problem; R om ´ eo is a tool that supports parametric TPNs (next sequence) 42 / 70

  24. 43 / 70

  25. Roméo in a nutshell 44 / 70

  26. First of all . . . You know that: Time Petri nets are well-suited to timing parametrization; Bounded PTPNs globally have the same decidability results as PTA; Synthesis (semi-)algorithms for PTA can be adapted for PTPN (and are sometimes a bit simpler); They can use state classes; General synthesis is hard and approximate/partial synthesis is a good way to address this problem; 45 / 70

  27. First of all . . . You know that: Time Petri nets are well-suited to timing parametrization; Bounded PTPNs globally have the same decidability results as PTA; Synthesis (semi-)algorithms for PTA can be adapted for PTPN (and are sometimes a bit simpler); They can use state classes; General synthesis is hard and approximate/partial synthesis is a good way to address this problem; R om ´ eo is a tool that supports parametric TPNs 45 / 70

  28. Roméo An analysis tool / model-checker for time Petri nets with timing parameters; hybrid extensions; discrete variables; cost optimisation; Developed at Nantes since 2000, mostly by Olivier H. Roux and Didier Lime; Tool papers Gardey et al. [2005]; Lime et al. [2009] Free and open-source (CeCILL license) Available at http://romeo.rts-software.org/ 46 / 70

  29. Roméo: Some Success Stories Analysis of resilience properties in oscillatory biological systems Andreychenko et al. [2016] ; Environment requirements for an aerial video tracking system (with Thales Research) Parquier et al. [2016] ; Operational scenarios modelling in the DGA OMOTESC project (with Sodius Nantes, Charlotte Seidner’s Ph. D.) Seidner [2009] . 47 / 70

  30. Conclusion At this stage, you know about: Petri nets with discrete parameters time Petri nets with timing parameters 48 / 70

  31. Conclusion At this stage, you know about: Petri nets with discrete parameters time Petri nets with timing parameters Let us address synthesis of actions (next sequence) 48 / 70

  32. 49 / 70

  33. Action Synthesis 50 / 70

  34. First of all. . . You know about: Petri nets with discrete parameters time Petri nets with timing parameters 51 / 70

  35. First of all. . . You know about: Petri nets with discrete parameters time Petri nets with timing parameters Let us now address synthesis of actions 51 / 70

  36. Mixed Transition Systems (MTS) Pecheur and Raimondi [2006] MTS : Kripke structures with action-labelled transitions MTS (model) is a 5-tuple M = ( S , s 0 , A , T , L ) , where: S – a set of states, s 0 ∈ S – the initial state, A – a set of actions, T ⊆ S × A × S – a labelled transition relation, PV – a set of the propositional variables, L : S → 2 PV – a labelling function. A path π in M is a maximal sequence s 0 a 0 s 1 a 1 ... of states and actions such that ( s i , a i , s i + 1 ) ∈ T . 52 / 70

  37. Allowed and disabled actions s 3 s 1 p safe act 4 act 2 act 1 act 3 s 0 s 4 act 2 p p safe s 2 act 4 A ⊆ A – a set of allowed actions Π( A , s ) – the maximal paths over A , starting from s 53 / 70

  38. Allowed and disabled actions s 3 s 1 p safe act 4 act 2 act 1 s 0 act 2 p safe s 2 A ⊆ A – a set of allowed actions Π( A , s ) – the maximal paths over A , starting from s Π( { act 1 , act 2 , act 4 } , s 0 ) = { ( s 0 act 1 s 1 act 4 ) ω + ( s 0 act 1 s 1 act 4 ) ∗ s 0 act 1 s 1 act 2 s 3 + ( s 0 act 1 s 1 act 4 ) ∗ s 0 act 2 s 2 } 53 / 70

  39. Parametric ARCTL pmARCTL : CTL with action (variables) subscripts ActSets – the non-empty subsets of A ActVars – the action variables pmARCTL: the formulae φ generated by the BNF grammar: φ ::= p | ¬ φ | φ ∨ φ | E α X φ | E α G φ | E α ( φ U φ ) p ∈ PV , α ∈ ActSets ∪ ActVars E α – “there exists a maximal path over α ” X , G , U – neXt, Globally, Until 54 / 70

  40. Parametric ARCTL pmARCTL : CTL with action (variables) subscripts ActSets – the non-empty subsets of A ActVars – the action variables pmARCTL: the formulae φ generated by the BNF grammar: φ ::= p | ¬ φ | φ ∨ φ | E α X φ | E α G φ | E α ( φ U φ ) p ∈ PV , α ∈ ActSets ∪ ActVars E α – “there exists a maximal path over α ” X , G , U – neXt, Globally, Until (derived) A α – “for each maximal path over α ” (derived) F – “in the Future” 54 / 70

  41. Parametric ARCTL: semantics States: s 0 Labelled by p Labelled by q forward s 1 Properties: left right s 3 s 2 loop forward s 1 s 2 right loop left s 3 s 2 s 2 . . . . . . . . . . . . 55 / 70

  42. Parametric ARCTL: semantics States: s 0 Labelled by p Labelled by q forward s 1 Properties: left right s 0 | = E { forward , left } Gp s 3 s 2 loop forward s 1 s 2 right loop left s 3 s 2 s 2 . . . . . . . . . . . . 55 / 70

  43. Parametric ARCTL: semantics States: s 0 Labelled by p Labelled by q forward s 1 Properties: left right s 0 | = E { forward , left } Gp s 3 s 2 s 0 | = E { forward , right } pUq loop forward s 1 s 2 right loop left s 3 s 2 s 2 . . . . . . . . . . . . 55 / 70

  44. Parametric ARCTL: semantics States: s 0 Labelled by p Labelled by q forward s 1 Properties: left right s 0 | = E { forward , left } Gp s 3 s 2 s 0 | = E { forward , right } pUq loop forward More examples: E Y GE Y X true – infinite loops s 1 s 2 detection right loop left A Y GE Y X true – deadlock detection AG Y ( p ∧ EF Z safe ) – using two s 3 s 2 s 2 . . . . action variables Y , Z . . . . . . . . 55 / 70

  45. Action synthesis in a nutshell s 3 s 1 p safe act 4 act 2 act 1 act 3 s 0 s 4 act 2 p p safe s 2 act 4 A Y G ( p ∧ E Z F safe ) : for each Y-reachable state p holds and safe is Z-reachable 56 / 70

  46. Action synthesis in a nutshell s 3 s 1 p safe act 4 act 2 act 1 act 3 s 0 s 4 act 2 p p safe s 2 act 4 A Y G ( p ∧ E Z F safe ) : for each Y-reachable state p holds and safe is Z-reachable s 0 | = A { act 1 , act 4 } G ( p ∧ E { act 2 } F safe ) 56 / 70

  47. Action synthesis in a nutshell s 1 p act 4 act 1 s 0 p A Y G ( p ∧ E Z F safe ) : for each Y-reachable state p holds and safe is Z-reachable s 0 | = A { act 1 , act 4 } G ( p ∧ E { act 2 } F safe ) 56 / 70

  48. Action synthesis in a nutshell s 3 s 1 p safe act 2 s 0 act 2 p safe s 2 A Y G ( p ∧ E Z F safe ) : for each Y-reachable state p holds and safe is Z-reachable s 0 | = A { act 1 , act 4 } G ( p ∧ E { act 2 } F safe ) 56 / 70

  49. Action synthesis in a nutshell s 3 s 1 p safe act 4 act 2 act 1 act 3 s 0 s 4 act 2 p p safe s 2 act 4 A Y G ( p ∧ E Z F safe ) : for each Y-reachable state p holds and safe is Z-reachable s 0 �| = A { act 1 , act 3 } G ( p ∧ E { act 2 } F safe ) 56 / 70

  50. Action synthesis in a nutshell s 3 s 1 p safe act 4 act 2 act 1 act 3 s 0 s 4 act 2 p p safe s 2 act 4 A Y G ( p ∧ E Z F safe ) : for each Y-reachable state p holds and safe is Z-reachable Goal: describe all Y , Z s.t.: s 0 | = A Y G ( p ∧ E Z F safe ) 56 / 70

  51. Action synthesis: formal definition M = ( S , s 0 , A , T , L ) , φ ∈ pmARCTL, ActVals := ActSets ActVars Goal Knapik et al. [2015] Build f φ : S → 2 ActVals s.t. for all s ∈ S : υ ∈ f φ ( s ) s | = υ φ ⇐⇒ ( f φ ( s ) contains all valuations that make φ hold in s ) THEOREM Knapik et al. [2015] The problem of deciding whether f φ ( s ) � ∅ is NP-complete. 57 / 70

  52. (Some) fixed-points for pmARCTL Recursive equivalences in pmARCTL: � � E Y XE Y G φ ∨ ¬ E Y X true q | = υ E Y G φ ⇐⇒ q | = υ φ ∧ 58 / 70

  53. (Some) fixed-points for pmARCTL Recursive equivalences in pmARCTL: � � E Y XE Y G φ ∨ ¬ E Y X true q | = υ E Y G φ ⇐⇒ q | = υ φ ∧ Explanation: φ holds along a maximal path starting at q and labelled with a Y –action iff φ holds in q and either there is no outgoing Y –action (deadlock) or there is a Y –action s.t. when fired it leads to a state where E Y G φ holds 58 / 70

  54. (Some) fixed-points for pmARCTL Recursive equivalences in pmARCTL: � � E Y XE Y G φ ∨ ¬ E Y X true q | = υ E Y G φ ⇐⇒ q | = υ φ ∧ Explanation: φ holds along a maximal path starting at q and labelled with a Y –action iff φ holds in q and either there is no outgoing Y –action (deadlock) or there is a Y –action s.t. when fired it leads to a state where E Y G φ holds 58 / 70

  55. (Some) fixed-points for pmARCTL Recursive equivalences in pmARCTL: � � E Y XE Y G φ ∨ ¬ E Y X true q | = υ E Y G φ ⇐⇒ q | = υ φ ∧ Explanation: φ holds along a maximal path starting at q and labelled with a Y –action iff φ holds in q and either there is no outgoing Y –action (deadlock) or there is a Y –action s.t. when fired it leads to a state where E Y G φ holds 58 / 70

  56. (Some) fixed-points for pmARCTL Recursive equivalences in pmARCTL: � � E Y XE Y G φ ∨ ¬ E Y X true q | = υ E Y G φ ⇐⇒ q | = υ φ ∧ Explanation: φ holds along a maximal path starting at q and labelled with a Y –action iff φ holds in q and either there is no outgoing Y –action (deadlock) or there is a Y –action s.t. when fired it leads to a state where E Y G φ holds 58 / 70

  57. (Some) fixed-points for pmARCTL Recursive equivalences in pmARCTL: � � E Y XE Y G φ ∨ ¬ E Y X true q | = υ E Y G φ ⇐⇒ q | = υ φ ∧ Explanation: φ holds along a maximal path starting at q and labelled with a Y –action iff φ holds in q and either there is no outgoing Y –action (deadlock) or there is a Y –action s.t. when fired it leads to a state where E Y G φ holds 58 / 70

  58. (Some) fixed-points for pmARCTL Recursive equivalences in pmARCTL: � � E Y XE Y G φ ∨ ¬ E Y X true q | = υ E Y G φ ⇐⇒ q | = υ φ ∧ Explanation: φ holds along a maximal path starting at q and labelled with a Y –action iff φ holds in q and either there is no outgoing Y –action (deadlock) or there is a Y –action s.t. when fired it leads to a state where E Y G φ holds E Y φ U ψ ⇐⇒ ψ ∨ ( φ ∧ E Y XE Y φ U ψ ) 58 / 70

  59. (Some) fixed-points for pmARCTL Recursive equivalences in pmARCTL: � � E Y XE Y G φ ∨ ¬ E Y X true q | = υ E Y G φ ⇐⇒ q | = υ φ ∧ Explanation: φ holds along a maximal path starting at q and labelled with a Y –action iff φ holds in q and either there is no outgoing Y –action (deadlock) or there is a Y –action s.t. when fired it leads to a state where E Y G φ holds E Y φ U ψ ⇐⇒ ψ ∨ ( φ ∧ E Y XE Y φ U ψ ) Implementation: easy algorithms: implement E Y X and compute fixpoints (using BDDs) similar to CTL, but deal with indicator functions rather than with sets of states see also Jones et al. [2012] . 58 / 70

  60. Conclusion At this stage, you know about action synthesis 59 / 70

  61. Conclusion At this stage, you know about action synthesis Let us see some tool support (next sequence) 59 / 70

Recommend


More recommend