Caco-2 cell permeability assay for drug absorption
New Search Strategies for the Petri Net CEGAR Approach
1. New Search Strategies for the Petri Net CEGAR Approach
Budapest University of Technology and Economics
Department of Measurement and Information Systems
New Search Strategies for the
Petri Net CEGAR Approach
Ákos Hajdu1, András Vörös1, Tamás Bartha2
1Department of Measurement and Information Systems
Budapest University of Technology and Economics, Budapest, Hungary
2Institute for Computer Science and Control
MTA SZTAKI, Budapest, Hungary
Petri Nets 2015, Brussels, Belgium, 26.06.2015.
2. New Search Strategies for the Petri Net CEGAR Approach
Outline of the talk
1. Introduction
2. The CEGAR approach on Petri nets
3. New iteration strategy
4. Search strategies
5. Evaluation
6. Conclusions
3. New Search Strategies for the Petri Net CEGAR Approach
Outline of the talk
1. Introduction
2. The CEGAR approach on Petri nets
3. New iteration strategy
4. Search strategies
5. Evaluation
6. Conclusions
4. New Search Strategies for the Petri Net CEGAR Approach
Introduction – Reachability analysis
Reachability analysis
o Is a given marking reachable from the initial marking?
o Drawback: complexity
• Decidable [Mayr’81]
• At least EXPSPACE-hard [Lipton’76]
• No precise upper bound is known
o Possible solutions
• Partial order reduction
• Symbolic methods
• Abstraction
5. New Search Strategies for the Petri Net CEGAR Approach
Introduction – Abstraction
Abstraction
o General approach to handle large (infinite) state
spaces
• Less detailed (finite, smaller) state space representation
o Abstraction refinement is required
• A behavior in the abstract model may not be realizable
• Refine using information from the explored part
o CounterExample Guided Abstraction Refinement
o Applying CEGAR on Petri nets [Wimmel & Wolf’11]
6. New Search Strategies for the Petri Net CEGAR Approach
Outline of the talk
1. Introduction
2. The CEGAR approach on Petri nets
3. New iteration strategy
4. Search strategies
5. Evaluation
6. Conclusions
7. New Search Strategies for the Petri Net CEGAR Approach
CEGAR approach on Petri nets
Abstraction of Petri nets: state equation
m0 + Cx = m1
Initial
abstraction
Reachability
problem
State
equation
Initial marking Target marking
Firing count
of transitions
(unknown)
Incidence matrix
8. New Search Strategies for the Petri Net CEGAR Approach
Initial
abstraction
Reachability
problem
State
equation
CEGAR approach on Petri nets
Analysis of the abstract model
o Solving the state equation for the
firing count of transitions
o Integer Linear Programming problem
o Necessary, but not sufficient criterion for reachability
Analysis of the
abstract model
Not reachable
No solution
m0 + Cx = m1
9. New Search Strategies for the Petri Net CEGAR Approach
CEGAR approach on Petri nets
Examining the solution
o Bounded exploration of the state space
Initial
abstraction
Analysis of the
abstract modelReachability
problem
State
equation
Not reachable
No solution
Examine the
solution
Reachable
Solution
Realizable
Realizable
solution
Partial
solution
Partial
solution
10. New Search Strategies for the Petri Net CEGAR Approach
CEGAR approach on Petri nets
Abstraction refinement
o Exclude the counterexample without
losing any realizable solution
o Constraints can be added to the state equation
• The state equation may become infeasible
• A new solution can be obtained
o Traversing the solution space of the state equation
Initial
abstraction
Analysis of the
abstract model
Examine the
solutionReachability
problem
State
equation
Not reachable Reachable
No solution
Solution
Realizable
Refine the
abstraction Not realizableConstraints
11. New Search Strategies for the Petri Net CEGAR Approach
CEGAR approach on Petri nets
Traversing the solution space
o Semi-linear space
• Base solutions
• T-invariants
o Two types of constraints
• Jump: obtain different base solution
• Increment: reach non-base solutions
by adding T-invariants
Initial
abstraction
Analysis of the
abstract model
Examine the
solutionReachability
problem
State
equation
Not reachable Reachable
No solution
Solution
Realizable
Refine the
abstraction Not realizableConstraints
m0 + Cx = m1
12. New Search Strategies for the Petri Net CEGAR Approach
CEGAR approach on Petri nets
Constraint examples
Initial
abstraction
Analysis of the
abstract model
Examine the
solutionReachability
problem
State
equation
Not reachable Reachable
No solution
Solution
Realizable
Refine the
abstraction Not realizableConstraints
(t0) (t2,t1)
Jump: t0 < 1
(t0) (t1,t0,t2)
Increment: t1 > 0
Invariants can
“lend” tokens
13. New Search Strategies for the Petri Net CEGAR Approach
Our previous results
Correctness of the algorithm [Hajdu et al.’14]
o The algorithm may give a wrong answer
o Detect these cases and also solve some of them
Completeness of the algorithm [Hajdu et al.’13]
o The algorithm may…
• …fail to decide the problem
• …fail to terminate
o Improvements, but still incomplete
14. New Search Strategies for the Petri Net CEGAR Approach
Outline of the talk
1. Introduction
2. The CEGAR approach on Petri nets
3. New iteration strategy
4. Search strategies
5. Evaluation
6. Conclusions
15. New Search Strategies for the Petri Net CEGAR Approach
New iteration strategy
A reason for incompleteness
o Increment constraints add a T-invariant to a solution
o Possible cases:
1. Cannot fire
2. Fires and enables some other transition
3. Fires but does not enable any transition
– Different solution is obtained without any progress terminate
– There may be „distant” invariants
} Repeat refinement
cycle
16. New Search Strategies for the Petri Net CEGAR Approach
New iteration strategy
Our new strategy
o Extending increment constraints
• “Lending” tokens to places “lending” tokens to invariants
o Distant invariant
• Z is a distant invariant for Y if Z can produce tokens in places
connected to Y
o Problems to be solved
• Number of tokens to “borrow”
• Termination criterion
– E.g.: X lends to Y and Y lends to X infinite loop
17. New Search Strategies for the Petri Net CEGAR Approach
New iteration strategy
Number of tokens „borrowed”
o One token at a time and repeat
o Some problems cannot be solved this way
Termination criterion
o Form a chain of invariants
• If Z did not help Y find distant invariant for (Z + Y)
• Union of transitions finite
18. New Search Strategies for the Petri Net CEGAR Approach
Outline of the talk
1. Introduction
2. The CEGAR approach on Petri nets
3. New iteration strategy
4. Search strategies
5. Evaluation
6. Conclusions
19. New Search Strategies for the Petri Net CEGAR Approach
Search strategies
The algorithm traverses the solution space
o Multiple jump/increment constraints
o We examined different strategies
• Depth-first search
• Breadth-first search
o We developed a complex strategy
20. New Search Strategies for the Petri Net CEGAR Approach
Search strategies
Depth-first search
+ Efficient regarding memory usage
+ Fast convergence
- May not find the minimal solution
- May not terminate
Breadth-first search
+ Always finds the minimal solution
- Less efficient than DFS
- May not terminate if there is no solution
21. New Search Strategies for the Petri Net CEGAR Approach
Search strategies
Complex strategy
o Based on DFS
o Expand one level of the solution space
• All partial solutions of a solution vector
o Define an ordering between the partial
solutions
o Filter based on the order
22. New Search Strategies for the Petri Net CEGAR Approach
Search strategies
Ordering
o Partial order: Parikh image of firing sequence
Filtering
o Maximal solutions
• Closest to a realizable solutions
• Infinite loops can be detected
o Minimal solutions
• Slower convergence
• May involve different T-invariants
23. New Search Strategies for the Petri Net CEGAR Approach
Outline of the talk
1. Introduction
2. The CEGAR approach on Petri nets
3. New iteration strategy
4. Search strategies
5. Evaluation
6. Conclusions
24. New Search Strategies for the Petri Net CEGAR Approach
Evaluation
Implementation: PetriDotNet framework
Comparison of algorithms
o SARA tool
• Wimmel & Wolf
o Saturation-based method (developed at our group)
• Symbolic algorithm
Comparison of search strategies
o BFS ↔ DFS ↔ Complex strategy
25. New Search Strategies for the Petri Net CEGAR Approach
Comparison of the algorithms
FMS
o Flexible manufacturing system
o Fixed structure
o Parameter affects state space
1E-3
1E-2
1E-1
1E+0
1E+1
1E+2
10 100 1000 10000
Runtime(s)
Model parameter
Our algorithm Saturation SARA
0,001
0,01
0,1
1
10
100
10 100
Runtime(s)
Model parameter
Our algorithm Saturation SARA
Dining philosophers
o Illustration of mutual exclusion
o Structure grows with parameter
26. New Search Strategies for the Petri Net CEGAR Approach
Comparison of search strategies
Models with large solution space
0,1%
1,0%
10,0%
100,0%
Chain
1+2
Chain
1+3
Chain
1+4
Chain
1+4*
Chain
2+2
Chain
2+3
Chain
2+3*
Runtime/runtimeofBFS
Model
DFS Complex
0%
20%
40%
60%
80%
100%
120%
140%
160%
180%
Chain
1+2
Chain
1+3
Chain
1+4
Chain
1+4*
Chain
2+2
Chain
2+3
Chain
2+3*
Length/lengthofBFS
Model
DFS Complex
BFS
BFS
27. New Search Strategies for the Petri Net CEGAR Approach
Outline of the talk
1. Introduction
2. The CEGAR approach on Petri nets
3. New iteration strategy
4. Search strategies
5. Evaluation
6. Conclusions
28. New Search Strategies for the Petri Net CEGAR Approach
Conclusions
Theoretical results
o New iteration strategy and limitations
Practical results
o Behavior of BFS, DFS and a complex strategy
Future work
o Forward reachability: did we reach the limits?
o How structure and behavior affects performance?
hajduakos182@gmail.com
vori@mit.bme.hu
PetriDotNet: bit.ly/1Rqnare
Measurements: bit.ly/1CoMJSG
29. New Search Strategies for the Petri Net CEGAR Approach
References
[Mayr’81] MAYR, EW. "An algorithm for the general Petri net reach-
ability problem." Proc. 13th Annual ACM Symposium on Theory of
Computing, 1981. 1981.
[Lipton’76] Lipton, Richard. "The reachability problem requires
exponential space." Research Report 62, Department of Computer
Science, Yale University, New Haven, Connecticut (1976).
[Wimmel & Wolf’11] Wimmel, Harro, and Karsten Wolf. "Applying
CEGAR to the Petri net state equation." Tools and Algorithms for the
Construction and Analysis of Systems. Springer Berlin Heidelberg,
2011. 224-238.
[Hajdu et al.’13] Hajdu, Ákos, et al. "Extensions to the CEGAR
approach on Petri Nets." (2013): 274-288.
[Hajdu et al.’14] Hajdu, Akos, et al. "Extensions to the CEGAR
Approach on Petri Nets." Acta Cybernetica 21 (2014): 401-417.
30. New Search Strategies for the Petri Net CEGAR Approach
Models
FMS
Dining philosophers
Chain 2+3