an smt based approach to coverability analysis
play

An SMT-Based Approach to Coverability Analysis Javier Esparza 1 , - PowerPoint PPT Presentation

An SMT-Based Approach to Coverability Analysis Javier Esparza 1 , Rusln Ledesma-Garza 1 , Rupak Majumdar 2 , Philipp Meyer 1 , Filip Niksic 2 1 Technische Universitt Mnchen 2 MPI-SWS Petri net coverability is important, but difficult


  1. An SMT-Based Approach to Coverability Analysis Javier Esparza 1 , Ruslán Ledesma-Garza 1 , Rupak Majumdar 2 , Philipp Meyer 1 , Filip Niksic 2 1 Technische Universität München 2 MPI-SWS

  2. Petri net coverability is important, but difficult • Many verification problems reduce to Petri net coverability problem • Petri net coverability is EXPSPACE-complete � • Sophisticated tools and algorithms: MIST — Expand-enlarge-check [GRB ’06] BFC — Minimal uncoverability proof [KKW ’12] IIC — Incremental, inductive coverability [KMNP ’13]

  3. MIST, BFC and IIC don’t scale well Examples proved safe 115 92 69 64 61 46 51 33 23 MIST BFC IIC Together

  4. Reducing coverability to feasibility of linear constraints Method LinCon : � • Based on marking equation [Murata ’77] Incomplete � • Strengthened with traps [EM ’00] Traps — essentially Boolean constraints Still incomplete �

  5. Use SMT for linear and Boolean constraints. But LinCon is incomplete. � Does it make sense to use it?

  6. Yes! For the right class of examples, LinCon is “quite complete” Examples proved safe 115 92 96 69 64 61 46 51 33 23 MIST BFC IIC Together LinCon

  7. Yes! For the right class of examples, LinCon is “quite complete” Examples proved safe All but one example in under 100 s 115 92 96 69 64 61 46 51 33 23 MIST BFC IIC Together LinCon

  8. Contributions Main contribution: • Extensive experimental evaluation showing that LinCon works well � Also: • Using duality of linear programming to derive succinct inductive invariants

  9. Contributions Main contribution: • Extensive experimental evaluation showing that LinCon works well � Also: • Using duality of linear programming to derive succinct inductive invariants

  10. In this talk Petri nets Experiments and LinCon

  11. In this talk Petri nets Experiments and LinCon

  12. Petri nets are state transition systems s x t y z r

  13. Petri nets are state transition systems s transitions token x t y z r places

  14. Petri nets are state transition systems s initial marking transitions (0, 1, 0) token x t y z r places

  15. Petri nets are state transition systems s initial marking transitions (0, 1, 0) token x t y z r places

  16. Petri nets are state transition systems s initial marking transitions (0, 1, 0) token x +(1, 0, 0) t y (1, 1, 0) z r places

  17. Petri nets are state transition systems s initial marking transitions (0, 1, 0) token x +(1, 0, 0) t y (1, 1, 0) z r places

  18. Petri nets are state transition systems s initial marking transitions (0, 1, 0) token x +(1, 0, 0) t y (1, 1, 0) +(-1, 0, 1) z (0, 1, 1) r places

  19. Petri nets are state transition systems s initial marking transitions (0, 1, 0) token x +(1, 0, 0) t y (1, 1, 0) +(-1, 0, 1) z (0, 1, 1) r places reachable markings

  20. Reachable markings satisfy marking equation s Ignore the order of transitions: • marking equation [Murata ’77] x         0 1 − 1 0 x s t  =  + y 1 0 0 0 y t       0 0 1 − 1 z r z r

  21. Reachable markings satisfy marking equation s Ignore the order of transitions: • marking equation [Murata ’77] x t M = m 0 + CX y z transition marking initial vector r vector marking incidence matrix

  22. Coverability problem Given a Petri net with: • initial marking m 0 m r m t • target marking m t Is there a reachable m 0 marking m r that covers m t ?

  23. Coverability problem Given a Petri net with: • initial marking m 0 m r m t • target marking m t Is there a reachable m 0 marking m r that covers m t ? If m t is not coverable , Petri net is safe .

  24. Adding coverability constraint to marking equation yields basic LinCon M = m 0 + CX M ≥ m t X ≥ 0 If the constraints are not feasible , the Petri net is safe .

  25. Strengthening LinCon using traps [EM ’00] Trap — set of places such that every transition that consumes tokens from it also puts tokens into it. y x z

  26. Strengthening LinCon using traps [EM ’00] Trap — set of places such that every transition that consumes tokens from it also puts tokens into it. y x z

  27. Strengthening LinCon using traps [EM ’00] Trap — set of places such that every transition that consumes tokens from it also puts tokens into it. If a trap is marked, y it stays marked. x z

  28. Strengthening LinCon using traps [EM ’00] Trap — set of places such that every transition that consumes tokens from it also puts tokens into it. If a trap is marked, y it stays marked. x x + y ≥ 1 z

  29. LinCon with traps [EM ’00] M = m 0 + CX M ≥ m t X ≥ 0

  30. LinCon with traps [EM ’00] M = m 0 + CX no solution M ≥ m t safe X ≥ 0

  31. LinCon with traps [EM ’00] M = m 0 + CX no solution M ≥ m t safe X ≥ 0 M = m r X = x r

  32. LinCon with traps [EM ’00] M = m 0 + CX no solution M ≥ m t safe X ≥ 0 M = m r X = x r Is there a trap • initially marked • empty at m r

  33. LinCon with traps [EM ’00] M = m 0 + CX no solution M ≥ m t safe X ≥ 0 M = m r X = x r SAT query: Is there a trap • initially marked • empty at m r

  34. LinCon with traps [EM ’00] M = m 0 + CX no solution M ≥ m t safe X ≥ 0 M = m r X = x r SAT query: Is there a trap no solution • initially marked inconclusive • empty at m r

  35. LinCon with traps [EM ’00] M = m 0 + CX no solution M ≥ m t safe X ≥ 0 ( M = m r 1 , p in trap T p = 0 , otherwise X = x r SAT query: Is there a trap no solution • initially marked inconclusive • empty at m r

  36. LinCon with traps [EM ’00] M = m 0 + CX no solution M ≥ m t safe X ≥ 0 T τ M ≥ 1 ( M = m r 1 , p in trap T p = 0 , otherwise X = x r SAT query: Is there a trap no solution • initially marked inconclusive • empty at m r

  37. In this talk Petri nets Experiments and LinCon

  38. In this talk Petri nets Experiments and LinCon

  39. The origin of examples • MIST — https://github.com/pierreganty/mist Examples from the literature • BFC — http://www.cprover.org/bfc/ Examples from verification of concurrent C programs • Provenance verification for message-passing programs [MMW ’13] Examples modeling a medical system and a bug-tracking system • SOTER — http://mjolnir.cs.ox.ac.uk/soter/ [DKO ’13] Examples from verification of Erlang programs Contains a Petri net with 66,950 places and 213,625 transitions

  40. Main point here: LinCon works well even without traps

  41. LinCon without traps is fast 100000 10000 1000 BFC (time in sec) 100 10 1 0,1 0,01 0,01 0,1 1 10 100 1000 10000 100000 LinCon (time in sec)

  42. LinCon without traps is fast 100000 10000 30 min 1000 BFC (time in sec) 100 10 1 0,1 0,01 0,01 0,1 1 10 100 1000 10000 100000 LinCon (time in sec)

  43. LinCon without traps is fast 100000 25 s 10000 30 min 1000 BFC (time in sec) 100 10 1 0,1 0,01 0,01 0,1 1 10 100 1000 10000 100000 LinCon (time in sec)

  44. LinCon without traps is fast 100000 25 s 2 h 10000 30 min 1000 BFC (time in sec) 100 10 1 0,1 0,01 0,01 0,1 1 10 100 1000 10000 100000 LinCon (time in sec)

  45. LinCon is “quite complete” Examples proved safe 115 92 96 69 64 61 46 51 33 23 MIST BFC IIC Together LinCon

  46. LinCon without traps is “quite complete” Examples proved safe Examples proved safe 115 115 92 92 96 84 69 69 64 64 61 61 46 46 51 51 33 33 23 23 MIST MIST BFC BFC IIC IIC Together Together LinCon LinCon

  47. If LinCon were combined with other tools Examples proved safe 115 107 105 92 69 64 61 46 23 BFC BFC+LinCon Together Together+LinCon

  48. Summary • We’ve revisited a linear constraint approach to Petri net coverability • LinCon is incomplete , but useful … on its own … as a cheap preprocessing step in other tools

Recommend


More recommend