construction and verification of unfoldings for petri
play

Construction and Verification of Unfoldings for Petri Nets with Read - PowerPoint PPT Presentation

Construction and Verification of Unfoldings for Petri Nets with Read Arcs C esar Rodr guez joint work with Stefan Schwoon, Paolo Baldan Laboratorire Sp ecification et V erification (LSV) ENS Cachan & CNRS, France MOVEP,


  1. Construction and Verification of Unfoldings for Petri Nets with Read Arcs C´ esar Rodr´ ıguez joint work with Stefan Schwoon, Paolo Baldan Laboratorire Sp´ ecification et V´ erification (LSV) ENS Cachan & CNRS, France MOVEP, Marseille, 6 December 2012

  2. Introduction The problem Verification of concurrent systems by means of the unfolding technique, when the system is modelled as a Petri net with read arcs. ◮ Unfolding up to exponentially more compact ◮ Unfolding algorithm more involved, but has better efficiency ◮ Reachability and deadlock-checking C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 2 / 13

  3. Contextual Petri nets ◮ Contextual nets are Petri nets + read arcs ◮ Natural representation of notion checking without consuming t ′ t p t ′ t p Notation Example p = { t , t ′ } ◮ A c-net is a tuple � P , T , F , C , m 0 � t = { p } ◮ • x for preset, x • for postset ◮ t = { p ∈ P | ( t , p ) ∈ C } for context C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 3 / 13

  4. Contextual net unfoldings N U N p 2 p 1 ( p 2 ) c 2 c 1 ( p 1 ) t 1 ( t 1 ) e 1 ( p 3 ) ( t 4 ) p 3 t 2 t 4 c 3 e 4 ( t 2 ) e 2 t 3 p 4 p 5 ( t 3 ) e 3 c 5 ( p 5 ) c 4 ( p 4 ) c ′ ( p 2 ) 2 Remarks ◮ Labeling f : U N → N ( t 1 ) e ′ 1 ◮ U N is marking-complete ( p 3 ) c ′ e ′ ( t 2 ) 3 2 c ′ . . . ( p 4 ) 4 C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 4 / 13

  5. Contextual unfoldings exploit concurrent read access A B C C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 5 / 13

  6. Asynchronous circuits a c b c 0 a 0 b 0 a 1 b 1 c 1 C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 6 / 13

  7. Asynchronous circuits 10 6 plain 10 5 contextual 10 4 Events 10 3 10 2 10 1 10 0 0 200 400 600 Gates C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 6 / 13

  8. Computing prefix extensions The problem Given P N and t , decide if we can extend P N with e where f ( e ) = t (NP-complete) C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 7 / 13

  9. Computing prefix extensions The problem Given P N and t , decide if we can extend P N with e where f ( e ) = t (NP-complete) ◮ Enumerate sets of conditions S s.t. f ( S ) = • t ∪ t (exponential) ◮ If S is coverable, return YES; otherwise continue (linear) C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 7 / 13

  10. Computing prefix extensions The problem Given P N and t , decide if we can extend P N with e where f ( e ) = t (NP-complete) ◮ Enumerate sets of conditions S s.t. f ( S ) = • t ∪ t (exponential) ◮ If S is coverable, return YES; otherwise continue (linear) How this is done for Petri nets? Definition Conditions c , c ′ are concurrent, c � c ′ , iff some run marks them both C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 7 / 13

  11. Computing prefix extensions The problem Given P N and t , decide if we can extend P N with e where f ( e ) = t (NP-complete) ◮ Enumerate sets of conditions S s.t. f ( S ) = • t ∪ t (exponential) ◮ If S is coverable, return YES; otherwise continue (linear) How this is done for Petri nets? Definition Conditions c , c ′ are concurrent, c � c ′ , iff some run marks them both Proposition Conditions c 1 , . . . , c n are coverable iff c i � c j holds for all i , j ∈ { 1 , . . . , n } C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 7 / 13

  12. However, for contextual unfolding. . . . . . the same approach doesn’t work: c 1 c 2 e 1 c 3 e 2 c 4 e 3 c 5 c 6 We have c 4 � c 5 , and c 4 � c 6 and c 5 � c 6 but { c 4 , c 5 , c 6 } is not coverable. C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 8 / 13

  13. Histories for events and conditions c 2 c 1 Definition A history of e is a set of events H such that: e 1 1. e ∈ H , c 3 e 2 2. Events in H can be arranged to form a run , 3. Any run of the events of H fires e last. e 3 c 4 c ′ 2 e ′ 1 c ′ 3 C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 9 / 13

  14. Histories for events and conditions c 2 c 1 Definition A history of e is a set of events H such that: { e 1 } e 1 1. e ∈ H , { e 1 } c 3 e 2 { e 1 , e 2 } 2. Events in H can be arranged to form a run , { e 1 , e 2 } 3. Any run of the events of H fires e last. { e 1 , e 3 } e 3 c 4 { e 1 , e 2 } { e 1 , e 2 , e 3 } { e 1 , e 3 } Remarks c ′ { e 1 , e 2 , e 3 } 2 ◮ Enriched prefix: events and conditions { e 1 , e 3 , e ′ 1 } e ′ 1 annotated with histories { e 1 , e 2 , e 3 , e ′ 1 } ◮ A pair ( c , H ) is called enriched condition { e 1 , e 3 , e ′ 1 } c ′ 3 { e 1 , e 2 , e 3 , e ′ 1 } ◮ This is the working data structure C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 9 / 13

  15. A concurrency relation for contextual nets Definition Two enriched conditions ρ = ( c , H ) and ρ ′ = ( c ′ , H ′ ) are concurrent, written ρ � ρ ′ , iff: c , c ′ ∈ ( H ∪ H ′ ) • ¬ ( H # H ′ ) and C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 10 / 13

  16. A concurrency relation for contextual nets Definition Two enriched conditions ρ = ( c , H ) and ρ ′ = ( c ′ , H ′ ) are concurrent, written ρ � ρ ′ , iff: c , c ′ ∈ ( H ∪ H ′ ) • ¬ ( H # H ′ ) and Proposition Conditions c 1 , . . . , c n coverable iff there exist histories H 1 , . . . , H n verifying ( c i , H i ) � ( c j , H j ) for all i , j ∈ { 1 , . . . , n } C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 10 / 13

  17. A concurrency relation for contextual nets Definition Two enriched conditions ρ = ( c , H ) and ρ ′ = ( c ′ , H ′ ) are concurrent, written ρ � ρ ′ , iff: c , c ′ ∈ ( H ∪ H ′ ) • ¬ ( H # H ′ ) and Proposition Conditions c 1 , . . . , c n coverable iff there exist histories H 1 , . . . , H n verifying ( c i , H i ) � ( c j , H j ) for all i , j ∈ { 1 , . . . , n } Proposition Let ρ = ( c , H ) and e be the last enriched condition and event appended to the prefix, let ρ ′ = ( c ′ , H ′ ) be an arbitrary enriched condition. Then, � n � ρ � ρ ′ ⇐ ⇒ ( c ′ ∈ e • ∧ H = H ′ ) ∨ c ′ / ( ρ i � ρ ′ ) ∧ • e ∩ H ′ ⊆ H � ∈ • e ∧ i =1 C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 10 / 13

  18. Experiments with Cunf Contextual Ordinary Ratios Net Events Events t C / t P t C / t R t C t P 1866 0.14 12900 0.51 0.27 0.54 bds 1.sync 8044 2.90 14724 3.40 0.85 0.55 byzagr4 1b 50928 34.21 83889 76.74 0.45 0.30 ftp 1.sync 95335 18.34 146606 40.39 0.45 0.42 furnace 4 key 4.fsa 4754 6.33 67954 2.21 2.86 1.47 rw 1w3r 14490 0.45 15401 0.38 1.18 0.65 q 1.sync 10722 1.13 10722 1.21 0.93 0.52 dpd 7.sync 10457 0.91 10457 0.88 1.03 0.92 16856 1.26 16856 2.01 0.63 > 0.01 elevator 4 98361 3.10 98361 3.95 0.78 0.41 rw 12.sync 9241 0.40 9241 0.30 1.33 0.04 rw 2w1r ◮ Contextual unfolding smaller or equal than ordinary unfolding ◮ And in general faster than unfolding the plain encoding C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 11 / 13

  19. Encoding deadlock and reachability into SAT From a marking-complete unfolding prefix P , we construct ◮ φ dead , satisfiable iff N contains a deadlock P ◮ φ reach, M , satisfiable iff places M are coverable in N P C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 12 / 13

  20. Encoding deadlock and reachability into SAT From a marking-complete unfolding prefix P , we construct ◮ φ dead , satisfiable iff N contains a deadlock P ◮ φ reach, M , satisfiable iff places M are coverable in N P Both formulas characterize configurations and reachable markings: φ dead φ conf ∧ φ disable := P P P φ reach, M ∧ φ mark, M φ conf := P P P where φ conf is defined as P φ causal ∧ φ sym ∧ φ asym P P P ◮ Implementation runs twice faster than the best tool we found C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 12 / 13

  21. Summary ◮ Contextual unfoldings are up to exponentially more compact ◮ In our benchmark, verification based on contextual unfoldings performs better than existing methods ◮ Unfolder and unfolding-based analysis tool available at: www.lsv.ens-cachan.fr/~rodriguez/tools/cunf/ Current and future work ◮ Contextual merged processes ◮ Application in diagnosis ◮ We are searching for concurrent systems to evaluate our algorithms !! C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 13 / 13

  22. Summary ◮ Contextual unfoldings are up to exponentially more compact ◮ In our benchmark, verification based on contextual unfoldings performs better than existing methods ◮ Unfolder and unfolding-based analysis tool available at: www.lsv.ens-cachan.fr/~rodriguez/tools/cunf/ Current and future work ◮ Contextual merged processes ◮ Application in diagnosis ◮ We are searching for concurrent systems to evaluate our algorithms !! Thank you for your attention C. Rodr´ ıguez (LSV) Verification of Contextual Nets Marseille, Dec. 2012 13 / 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend