TMPA-2017: Tools and Methods of Program Analysis
3-4 March, 2017, Hotel Holiday Inn Moscow Vinogradovo, Moscow
Compositional Process Model Synthesis based on Interface Patterns
Roman Nesterov, Irina Lomazova, Higher School of Economics
For video follow the link: https://youtu.be/wbT6Wb9B9o8
Would like to know more?
Visit our website:
www.tmpaconf.org
www.exactprosystems.com/events/tmpa
Follow us:
https://www.linkedin.com/company/exactpro-systems-llc?trk=biz-companies-cym
https://twitter.com/exactpro
TMPA-2017: Compositional Process Model Synthesis based on Interface Patterns
1. Compositional Process Model Synthesis based on
Interface Patterns
TMPA-2017
Roman A. Nesterov Irina A. Lomazova
ranesterov@edu.hse.ru, ilomazova@hse.ru
Laboratory of Process-Aware Information Systems
National Research University
Higher School of Economics (Moscow)
March 3, 2017
2. Agenda
1. Introduction
2. Preliminaries
• Petri nets and their properties
3. Related Work
4. Composing Petri nets via interfaces
• General description
• Composition patterns
5. Conclusion
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 2 / 25
3. Introduction
Problem
• Distributed systems with several interacting components –
large-scale models
• Coordination and verification problems – too many possible
states to check
Approach
• Study a system compositionally – a system inherits
component properties
• Composition patterns for constructing system models – a
library of patterns to obtain correct system models
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 3 / 25
4. Petri nets
Structure
A B
B
B
A Petri net is a bipartite graph N = (P, T, F, m0, L), where:
1. P = {p1, p2, p3, ..., pn}
2. T = {t1, t2, t3, ..., tm}, P ∩ T = ∅
3. F ⊆ (P × T) ∪ (T × P)
4. m0 ⊆ P
5. L : T → {A, τ}
•t = {p ∈ P|(p, t) ∈ F}, t• = {p ∈ P|(t, p) ∈ F}, •t• = •t ∪ t•
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 4 / 25
5. Petri nets
Behavior and correctness
A B
B
B
A occurred
1. A transition is enabled at m iff •t ∈ m and m ∩ t• = ∅
2. A marking m is final iff ∀p ∈ m : p• = ∅
3. A marking m is dead iff it enables no transitions (deadlock),
except for a final one
4. A net N is correct iff:
• There are no deadlocks
• A final marking is reachable
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 5 / 25
6. Related work
Composing Petri nets by merging places, transitions [Reisig, 2013]
D
E
C
p
A
B p
D
E
CA
B p
N1 N2 Composition
• Straightforward way to compose nets
• Correctness of a composed net?
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 6 / 25
7. Related work
Composing Petri nets by net morphisms [Pomello et al., 2007-1014]
C D
A
B
A
B
E F
A1A
B
E F
A
C D
B
N1 N2 Composition
• Interacting nets are refinements of an abstract system model
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 7 / 25
8. Related work
Algebra of web services [Hamadi et al., 2003]
S1S2 S1S2
S1
S2
Sequencing Choice Concurrency
Correct
services
• Web services are correct Petri nets
• Input-output relations between interacting services
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 8 / 25
9. Motivating example
Causality on inner actions of interacting Petri nets
…
B
…
…
A
…
A
B
Components
Interface
A correct
Petri net
• Two components
• Observable actions A, B
• Correct behavior
Problem
How to compose nets to get:
• correct composition;
• property inheritance;
• concurrency preservation?
Solution
To adjust approach based on
morphisms to this case
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 9 / 25
10. Morphisms
Definition
Let Ni = (Pi, Ti, Fi, mi
0) for i = 1, 2 be two Petri nets,
Xi = Pi ∪ Ti. The ω-morphism is a map φ : X1 → X2 such that:
1. φ(P1) = P2, φ(m1
0) = m2
0.
2. ∀t1 ∈ T1 : φ(t1) ∈ T2 ⇒ φ(•t1) = •φ(t1) and
φ(t1
•) = φ(t1)•.
3. ∀t1 ∈ T1 : φ(t1) ∈ P2 ⇒ φ(•t1
•) = {φ(t1)}.
A
A’ A
B
B’
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 10 / 25
11. Composing Petri nets via morphisms
Step 1. Constructing canonical representations
NC is a canonical representation with respect to an interface
A
A B
A A B
B
A
A B
A
A BB
N Interface NC
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 11 / 25
12. Composing Petri nets via morphisms
Step 2. Defining morphisms and merging nets
C D
A
B
A
B
E F
A1A
B
E F
A
C D
B
N1 N2 Composition
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 12 / 25
13. Composing Petri nets via morphisms
Preservation of properties
How properties are preserved?
Let N1 and N2 be two Petri nets representing components, and N
be their composition obtained via the interface Petri net NI and
ω-morphisms as described above.
1. The Petri net N is deadlock-free, if N1, N2 and NI are
deadlock-free.
2. The Petri net N terminates properly, if N1, N2 and NI
terminates properly.
A composed net is correct iff component nets are correct
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 13 / 25
14. Compositional patterns
General idea
Compositional pattern is a ready-to-use instrument for modelling
and studying distributed systems with several interacting
components:
• Patterns are developed for typical workflows
• Pattern correctness is justified via net morphism usage
• Pattens can be applied without theoretical knowledge
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 14 / 25
15. Pattern 1: Simple causality
Problem statement
…
B
…
…
A
…
A
B
Components
Interface
A
B
Extended interface
Termination
Start
A correct
Petri net
• Extended interface is weakly bisimilar to the original one
• Preservation of concurrency
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 15 / 25
16. Pattern 1: Simple causality
Primary composition result
N1(S1)
A
N1(S2)
B
N2(S1)
B
N2(S2)
A
A
B
N1(S1)
A
N2(S1)
B
N1(S2)
N2(S2)
Morphisms
Composition
N1 N2
To be
removed
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 16 / 25
17. Pattern 1: Simple causality
Reduced composition result
N1(S1)
A
N1(S2)
B
N2(S1)
B
N2(S2)
A
A
B
N1(S1)
A
N2(S1)
B
N1(S2)
N2(S2)
Morphisms
Composition
N1 N2
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 17 / 25
18. Pattern 2: Extended causality
Problem statement
N1(S3)
A
N1(S4)
N1(S2)
N1(S1)
A
N2(S3)
B
N2(S4)
N2(S2)
N2(S1)
A
A
B
Components
Interface
A B
A A
Extended interface
N1 N2
Termination
Start
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 18 / 25
19. Pattern 2: Extended causality
Composition result and implications
N1(S3)
A
N1(S4)
N1(S2)
N1(S1)
A
N2(S3)
B
N2(S4)
N2(S2)
N2(S1)
A
Result
• Introducing additional
controlling places
• Clearly identified behavior
of components
• Component properties are
inherited by construction
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 19 / 25
20. Pattern 3: Conditional causality
Problem statement
N1(S3)N1(S2)
N1(S1)
A B
N1(S5) N1(S4)
N2(S1)
C
N2(S2)
A
BC
C
Components
Interface
N1
N2
Problem
2 copies of C will not allow to define
morphisms as surjective maps
Solution
Reconstruction of the interface net
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 20 / 25
21. Pattern 3: Conditional causality
Interface modification
A C
A C
2
1
B
3
C
4
Construction idea
1. Restrict execution of C
2. Remember execution of A
3. Restrict execution of B
4. Forbid execution of B when
A occurs
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 21 / 25
22. Pattern 3: Conditional causality
Composition result and implications
N1(S1)
A A
N1(S2) N1(S3)N2(S1)
A BC
N2(S2)N1(S4)
C
N1(S5)
To sum up...
Morphisms help organize connection
of inner actions of components
immediately by construction
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 22 / 25
23. Conclusion
• Compositional approach to modeling distributed systems
• Component relations can be defined on inner actions
• Patterns for composition (causality and its generalizations)
Future research directions
• Coverage of over relations (e.g., choice)
• Combination of patterns
• Relations on several actions
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 23 / 25
24. References
1. Reisig, W.: Understanding Petri nets. Springer-Verlag Berlin
Heidelberg (2013)
2. Bernardinello, L., Mangioni, E., Pomello, L.: Composition of
elementary net systems based on morphisms. CEUR Workshop
Proceedings 853, 87–101 (2012)
3. Bernardinello, L., Monticelli, E., Pomello, L.: On Preserving
Structural and Behavioural Properties by Composing Net Systems
on Interfaces. Fundamenta Informaticae 80(1-3), 31–47 (2007)
4. Pomello, L., Rozenberg, G., Simone, C.: A survey of equivalence
notions for net based systems. Advances in Petri Nets 1992 pp.
410–472 (1992)
5. Hamadi, R., Benatallah, B.: A Petri net-based model for web
service composition. Proceedings of the 14th Australasian Database
Conference 17, 191–200 (2003)
6. Murata, T.: Petri Nets: Properties, Analysis and Applications.
Proceedings of the IEEE 77(4), 541–580 (1989)
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 24 / 25
25. Thank you for your attention!
Compositional Process Model Synthesis
based on Interface Patterns
Roman A. Nesterov Irina A. Lomazova
ranesterov@edu.hse.ru, ilomazova@hse.ru
Laboratory of Process-Aware Information Systems
National Research University
Higher School of Economics (Moscow)
March 3, 2017
R. Nesterov, I. Lomazova Higher School of Economics March 3, 2017 25 / 25