SlideShare a Scribd company logo
Petri Net (versus) State Spaces


               Karsten Wolf




    UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
My experience with
                                                          state spaces
-INA    Integrated Net Analyzer

-LoLA   A Low Level Analyzer

-The service-technology.org tool family


Case studies and applications:

-Finding hazards in a GALS wrapper
-Integration into Pathway Logic Assistent
-Soundness check for 700+ industrial business process models in (avg) 2 msec
-Verification of web service choreographies
-Verification of parameterized Boolean programs
-Solving AI planning challenges
-Integration into BP related tools like ProM, Oryx
-Integration into model checking platforms (MC Kit, PEP, CPN-AMI,…)
-….To be continued
         UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
Why state spaces?                                                                                    Why Petri nets?




                                 Verification based on state space




            UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
-Consider asynchronously communicating
                                              components rather than global state changes

Why state spaces?




                                             -Consider causality of events rather than their
                                              ordering in time!




            UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
Petri net principles
                                                          Presence or absence of ressources
Monotonicity of firing                                    rather than reading / writing variables




Linearity of firing rule                     -Consider asynchronously communicating
                                              components rather than global state changes



Locality


                                             -Consider causality of events rather than their
Partially ordered                             ordering in time!
event structures



            UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
Petri net specific
                                                                  verification
Monotonicity of firing
                                                     Coverability graphs
                                                     Siphons / traps


Linearity of firing rule
                                                     invariants



Locality
                                                     Net reduction


Partially ordered
event structures
                                                     Branching prefixes


            UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
State space generation

1. Checking enabledness

2. Firing a transition

3. Backtracking

4. Managing the visited states




           UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
State space generation

1. Checking enabledness
                                                                                                                   it   y
                                                                                                          oto n ic
                                                                                                    Mon
         After firing, only check:
              previously enabled transitions which have lost tokens
              previously disabled transitions which have gained tokens
                    ... managed through explicitly stored lists

                      … typical: reduction from linear to constant time
                                                                                                            li   ty
                                                                                                      L oca
2. Firing a transition

3. Backtracking

4. Managing the visited states
           UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
State space generation

1. Checking enabledness

2. Firing a transition


                  Marking changed via list of pre-, list of post-places
                  - effort does not depend on size of net
                  - Typically: constant effort
                                                                                                          li   ty
                                                                                                    L oca


3. Backtracking

4. Managing the visited states
           UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
State space generation

1. Checking enabledness

2. Firing a transition

3. Backtracking
                                                                                                           ri   ty
                                                                                                    Li nea
      In depth-first search: fire transition backwards

      In breadth-first search: implemented as incremental depth-first search



                                                                                                          li   ty
                                                                                                    L oca
4. Managing the visited states
           UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
Consequence:
                                          „write-only“ storage of markings



         current marking                             m


    -fire                                        old/new
    -fire backwards
                                                                               Set of visited markings



Search
stack       t1
            t2
            t3
            ...


           UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
4. Managing the visited states
 only performed actions: search, insert


         p1       p2         p3         p4        p5         p6         p7        p8
                                                                                                      in e arity
                                                                                                  L

        a1 p1 + a2 p2 + a3 p3 = const.
                                                                                         Place
                                                                                         invariants
        b2 p2 + b4 p4 + b6 p6 = const.

        c3 b3 + c7 p7 + c8 p8 = const.



30-60% less memory
preprocessing <1sec
run time gain: 30-60%

        UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
Reduction techniques


1. Linear Algebra

2. The Sweep-Line Method

3. Symmetries

4. Stubborn Sets




    UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
1. Linear algebra

•   The invariant calculus
     – originally invented for replacing state spaces
     – in LoLA: used for optimizing state spaces




      Already seen: place invariants

      Transition invariant: firing vector of a potential cycle




           UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
Transition invariants
                                                                                                          ty
                                                                                                L in eari



for termination sufficient: store one state per cycle of occurrence graph

implementation in LoLA:
transition invariants
        - set of transitions that occur in every cycle
        - store states where those transitions enabled

saves space, if applied in connection with stubborn sets, costs time




       UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
2. The sweep-line method

•   Relies on progress measure
                                                                                                                 ty
                                                                                                       L in eari
    LoLA computes measure automatically:


                                       m4: p4
                                               t3
                                                                        transition invariant
    p2=p1+Δt1                 m3: p3
    p3 = p2+Δt2                    t2
    ...                       m2: p2
                                      t1
                                  m1: p1


              UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
3. The symmetry method

                                                                                                       li   ty
                                                                                                 L oca



LoLA:   A symmetry = a graph automorphism of the PT-Net

All graph automorphisms = a group (up to exponentially many members)
    - stored in LoLA: polynomial generating set

A marking class: all markings that can be transformed into each other by a
  symmetry
   - executed in LoLA: polynomial time approximation



        UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
Example




UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
… as derived from a program




UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
4. Stubborn set method


•   Dedicated method for each supported property
                                                                                                        li   ty
traditional LTL-preserving method:                                                               L o ca
    - one enabled transition
   - the basic stubborness principal
    - only invisible transitions
   - at least once, on every cycle, all enabled transitions
                                                                                                                  n
                                                                                                      Tra d i t io
LoLA:                                                                                            PN
  - can avoid some of the criteria, depending on property




        UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
Conclusion




Why state spaces?                                                                                    Why Petri nets?



                                                That‘s why

    Further reading:
    • Tools:                           www.service-technology.org
    • Group / Papers:                www.informatik.uni-rostock.de/tpp/

            UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK

More Related Content

More from Universität Rostock

Where did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process modelsWhere did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process models
Universität Rostock
 
Artifact-centric modeling using BPMN
Artifact-centric modeling using BPMNArtifact-centric modeling using BPMN
Artifact-centric modeling using BPMN
Universität Rostock
 
Compliance by Design for Artifact-Centric Business Processes
Compliance by Design for Artifact-Centric Business ProcessesCompliance by Design for Artifact-Centric Business Processes
Compliance by Design for Artifact-Centric Business Processes
Universität Rostock
 
Verification with LoLA
Verification with LoLAVerification with LoLA
Verification with LoLA
Universität Rostock
 
Verification with LoLA: 7 Implementation
Verification with LoLA: 7 ImplementationVerification with LoLA: 7 Implementation
Verification with LoLA: 7 Implementation
Universität Rostock
 
Verification with LoLA: 6 Integrating LoLA
Verification with LoLA: 6 Integrating LoLAVerification with LoLA: 6 Integrating LoLA
Verification with LoLA: 6 Integrating LoLA
Universität Rostock
 
Verification with LoLA: 5 Case Studies
Verification with LoLA: 5 Case StudiesVerification with LoLA: 5 Case Studies
Verification with LoLA: 5 Case Studies
Universität Rostock
 
Verification with LoLA: 4 Using LoLA
Verification with LoLA: 4 Using LoLAVerification with LoLA: 4 Using LoLA
Verification with LoLA: 4 Using LoLA
Universität Rostock
 
Verification with LoLA: 3 State Space Reduction
Verification with LoLA: 3 State Space ReductionVerification with LoLA: 3 State Space Reduction
Verification with LoLA: 3 State Space Reduction
Universität Rostock
 
Verification with LoLA: 1 Basics
Verification with LoLA: 1 BasicsVerification with LoLA: 1 Basics
Verification with LoLA: 1 Basics
Universität Rostock
 
Verification with LoLA: 2 The LoLA Input Language
Verification with LoLA: 2 The LoLA Input LanguageVerification with LoLA: 2 The LoLA Input Language
Verification with LoLA: 2 The LoLA Input Language
Universität Rostock
 
Saarbruecken
SaarbrueckenSaarbruecken
Saarbruecken
Universität Rostock
 
Ws4 dsec talk @ Kickoff RS3
Ws4 dsec talk @ Kickoff RS3Ws4 dsec talk @ Kickoff RS3
Ws4 dsec talk @ Kickoff RS3
Universität Rostock
 
Internal Behavior Reduction for Services
Internal Behavior Reduction for ServicesInternal Behavior Reduction for Services
Internal Behavior Reduction for Services
Universität Rostock
 
Implementation of an Interleaving Semantics for TLDA
Implementation of an Interleaving Semantics for TLDAImplementation of an Interleaving Semantics for TLDA
Implementation of an Interleaving Semantics for TLDA
Universität Rostock
 
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
Universität Rostock
 
Demonstration of BPEL2oWFN and Fiona
Demonstration of BPEL2oWFN and FionaDemonstration of BPEL2oWFN and Fiona
Demonstration of BPEL2oWFN and Fiona
Universität Rostock
 
service-technology.org — A tool family for correct
business processes and ser...
service-technology.org — A tool family for correct
business processes and ser...service-technology.org — A tool family for correct
business processes and ser...
service-technology.org — A tool family for correct
business processes and ser...
Universität Rostock
 
Tools4BPEL Tutorial
Tools4BPEL TutorialTools4BPEL Tutorial
Tools4BPEL Tutorial
Universität Rostock
 
Diagnosis of Open Workflow Nets
Diagnosis of Open Workflow NetsDiagnosis of Open Workflow Nets
Diagnosis of Open Workflow Nets
Universität Rostock
 

More from Universität Rostock (20)

Where did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process modelsWhere did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process models
 
Artifact-centric modeling using BPMN
Artifact-centric modeling using BPMNArtifact-centric modeling using BPMN
Artifact-centric modeling using BPMN
 
Compliance by Design for Artifact-Centric Business Processes
Compliance by Design for Artifact-Centric Business ProcessesCompliance by Design for Artifact-Centric Business Processes
Compliance by Design for Artifact-Centric Business Processes
 
Verification with LoLA
Verification with LoLAVerification with LoLA
Verification with LoLA
 
Verification with LoLA: 7 Implementation
Verification with LoLA: 7 ImplementationVerification with LoLA: 7 Implementation
Verification with LoLA: 7 Implementation
 
Verification with LoLA: 6 Integrating LoLA
Verification with LoLA: 6 Integrating LoLAVerification with LoLA: 6 Integrating LoLA
Verification with LoLA: 6 Integrating LoLA
 
Verification with LoLA: 5 Case Studies
Verification with LoLA: 5 Case StudiesVerification with LoLA: 5 Case Studies
Verification with LoLA: 5 Case Studies
 
Verification with LoLA: 4 Using LoLA
Verification with LoLA: 4 Using LoLAVerification with LoLA: 4 Using LoLA
Verification with LoLA: 4 Using LoLA
 
Verification with LoLA: 3 State Space Reduction
Verification with LoLA: 3 State Space ReductionVerification with LoLA: 3 State Space Reduction
Verification with LoLA: 3 State Space Reduction
 
Verification with LoLA: 1 Basics
Verification with LoLA: 1 BasicsVerification with LoLA: 1 Basics
Verification with LoLA: 1 Basics
 
Verification with LoLA: 2 The LoLA Input Language
Verification with LoLA: 2 The LoLA Input LanguageVerification with LoLA: 2 The LoLA Input Language
Verification with LoLA: 2 The LoLA Input Language
 
Saarbruecken
SaarbrueckenSaarbruecken
Saarbruecken
 
Ws4 dsec talk @ Kickoff RS3
Ws4 dsec talk @ Kickoff RS3Ws4 dsec talk @ Kickoff RS3
Ws4 dsec talk @ Kickoff RS3
 
Internal Behavior Reduction for Services
Internal Behavior Reduction for ServicesInternal Behavior Reduction for Services
Internal Behavior Reduction for Services
 
Implementation of an Interleaving Semantics for TLDA
Implementation of an Interleaving Semantics for TLDAImplementation of an Interleaving Semantics for TLDA
Implementation of an Interleaving Semantics for TLDA
 
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
 
Demonstration of BPEL2oWFN and Fiona
Demonstration of BPEL2oWFN and FionaDemonstration of BPEL2oWFN and Fiona
Demonstration of BPEL2oWFN and Fiona
 
service-technology.org — A tool family for correct
business processes and ser...
service-technology.org — A tool family for correct
business processes and ser...service-technology.org — A tool family for correct
business processes and ser...
service-technology.org — A tool family for correct
business processes and ser...
 
Tools4BPEL Tutorial
Tools4BPEL TutorialTools4BPEL Tutorial
Tools4BPEL Tutorial
 
Diagnosis of Open Workflow Nets
Diagnosis of Open Workflow NetsDiagnosis of Open Workflow Nets
Diagnosis of Open Workflow Nets
 

Karsten Wolf @ Carl Adam Petri Memorial Symposium

  • 1. Petri Net (versus) State Spaces Karsten Wolf UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 2. My experience with state spaces -INA Integrated Net Analyzer -LoLA A Low Level Analyzer -The service-technology.org tool family Case studies and applications: -Finding hazards in a GALS wrapper -Integration into Pathway Logic Assistent -Soundness check for 700+ industrial business process models in (avg) 2 msec -Verification of web service choreographies -Verification of parameterized Boolean programs -Solving AI planning challenges -Integration into BP related tools like ProM, Oryx -Integration into model checking platforms (MC Kit, PEP, CPN-AMI,…) -….To be continued UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 3. Why state spaces? Why Petri nets? Verification based on state space UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 4. -Consider asynchronously communicating components rather than global state changes Why state spaces? -Consider causality of events rather than their ordering in time! UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 5. Petri net principles Presence or absence of ressources Monotonicity of firing rather than reading / writing variables Linearity of firing rule -Consider asynchronously communicating components rather than global state changes Locality -Consider causality of events rather than their Partially ordered ordering in time! event structures UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 6. Petri net specific verification Monotonicity of firing Coverability graphs Siphons / traps Linearity of firing rule invariants Locality Net reduction Partially ordered event structures Branching prefixes UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 7. State space generation 1. Checking enabledness 2. Firing a transition 3. Backtracking 4. Managing the visited states UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 8. State space generation 1. Checking enabledness it y oto n ic Mon After firing, only check: previously enabled transitions which have lost tokens previously disabled transitions which have gained tokens ... managed through explicitly stored lists … typical: reduction from linear to constant time li ty L oca 2. Firing a transition 3. Backtracking 4. Managing the visited states UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 9. State space generation 1. Checking enabledness 2. Firing a transition Marking changed via list of pre-, list of post-places - effort does not depend on size of net - Typically: constant effort li ty L oca 3. Backtracking 4. Managing the visited states UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 10. State space generation 1. Checking enabledness 2. Firing a transition 3. Backtracking ri ty Li nea In depth-first search: fire transition backwards In breadth-first search: implemented as incremental depth-first search li ty L oca 4. Managing the visited states UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 11. Consequence: „write-only“ storage of markings current marking m -fire old/new -fire backwards Set of visited markings Search stack t1 t2 t3 ... UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 12. 4. Managing the visited states only performed actions: search, insert p1 p2 p3 p4 p5 p6 p7 p8 in e arity L a1 p1 + a2 p2 + a3 p3 = const. Place invariants b2 p2 + b4 p4 + b6 p6 = const. c3 b3 + c7 p7 + c8 p8 = const. 30-60% less memory preprocessing <1sec run time gain: 30-60% UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 13. Reduction techniques 1. Linear Algebra 2. The Sweep-Line Method 3. Symmetries 4. Stubborn Sets UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 14. 1. Linear algebra • The invariant calculus – originally invented for replacing state spaces – in LoLA: used for optimizing state spaces Already seen: place invariants Transition invariant: firing vector of a potential cycle UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 15. Transition invariants ty L in eari for termination sufficient: store one state per cycle of occurrence graph implementation in LoLA: transition invariants - set of transitions that occur in every cycle - store states where those transitions enabled saves space, if applied in connection with stubborn sets, costs time UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 16. 2. The sweep-line method • Relies on progress measure ty L in eari LoLA computes measure automatically: m4: p4 t3 transition invariant p2=p1+Δt1 m3: p3 p3 = p2+Δt2 t2 ... m2: p2 t1 m1: p1 UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 17. 3. The symmetry method li ty L oca LoLA: A symmetry = a graph automorphism of the PT-Net All graph automorphisms = a group (up to exponentially many members) - stored in LoLA: polynomial generating set A marking class: all markings that can be transformed into each other by a symmetry - executed in LoLA: polynomial time approximation UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 18. Example UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 19. … as derived from a program UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 20. 4. Stubborn set method • Dedicated method for each supported property li ty traditional LTL-preserving method: L o ca - one enabled transition - the basic stubborness principal - only invisible transitions - at least once, on every cycle, all enabled transitions n Tra d i t io LoLA: PN - can avoid some of the criteria, depending on property UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK
  • 21. Conclusion Why state spaces? Why Petri nets? That‘s why Further reading: • Tools: www.service-technology.org • Group / Papers: www.informatik.uni-rostock.de/tpp/ UNIVERSITÄT ROSTOCK | FAKULTÄT INFORMATIK UND ELEKTROTECHNIK | INSTITUT FÜR INFORMATIK