An overview of recent research results and directions at Prof. Kim Mens's RELEASeD research lab. Presented in July 2013 at SATTOSE2013 in Bern, Switzerland.
Gen AI in Business - Global Trends Report 2024.pdf
Research @ RELEASeD (presented at SATTOSE2013)
1. Research @ RELEASeD
The RELEASeD Laboratory
Achieving Excellence in Software Development
released.info.ucl.ac.be
Monday 8 July 2013
1
2. RELEASeD – the lab
REsearch Laboratory on
software Evolution And Software Development
Computing Science Engineering Department (INGI)
Institute of Information and Communication Technologies,
Electronics and Applied Mathematics (ICTEAM)
Université catholique de Louvain (UCL)
Monday 8 July 2013
2
3. RELEASeD – the research
Current research domains
Software Evolution Technology
Software Development Technology
Context-Oriented Programming
Strong focus on tools, techniques and languages
Monday 8 July 2013
3
4. RELEASeD – the team
Kim Mens , Professor, Head of RELEASeD group
Kim.Mens@uclouvain.be
Sergio Castro , Teaching and Research Assistant
Sergio.Castro@uclouvain.be
Ángela Lozano , Post-Doctoral Researcher
Angela.Lozano@uclouvain.be
Nicolás Cardozo , PhD student
nicolas.cardozo@uclouvain.be
Sebastián González , Post-Doctoral Researcher
s.gonzalez@uclouvain.be
Monday 8 July 2013
4
5. Some focused presentations
Context-Oriented Programming [Sebastian, Nicolas, Kim]
Recent research on COP : Version Contexts , Context Traits &
Context Petri Nets
Software Quality Assurance [Angela, Kim]
Tools and techniques to improve the structural quality of
software : Usage Contracts & Mendel
Java-Prolog Interoperability [Sergio, Kim]
Monday 8 July 2013
5
7. Software Quality Assurance
Mendel
a code recommendation tool that provides structural
recommendations to software developers based on local
structural properties in the source code of a system
Usage Contracts
a unit testing-like approach to enable developers to
express and verify structural coding conventions in a
seamless way
Monday 8 July 2013
7
8. COP @ RELEASeD
Kim Mens, Sebastian Gonzalez, Nicolas Cardozo
Monday 8 July 2013
8
9. COP @ RELEASeD
Research on COP since 10 years
Ambience [2008], Subjective-C [2010], SCOPJ [2011],
Phenomenal Gem [2012]
Most recent developments
Version Contexts [UCL 2013]
Context Traits [AOSD 2013]
Context Petri Nets [UCL 2013]
Monday 8 July 2013
9
10. Context-Oriented Programming
Motivation : Towards a Mindset Shift
From:
To:
Programming in Isolation
Programming with Context
?
?
?
forward!
?
?
?
Monday 8 July 2013
11
11. Context-Oriented Programming
Motivation : Towards a Mindset Shift
From:
To:
Programming in Isolation
Programming with Context
Contexts
Situations of the surrounding execution
environment to which specific behavior
is associated
Monday 8 July 2013
12
12. Context-Oriented Programming
Motivation : Towards a Mindset Shift
?
?
?
forward!
?
?
?
Monday 8 July 2013
Caution
Design patterns
Plugin architectures
Conditional statements
...
13
13. Context-Oriented Programming
Conditional Statements : some variant of ...
m(a) {
!
if (
) { IE logic }
else if (
) { Opera logic }
else if (
) { Chrome logic }
else if (
) { Safari logic }
else if (
) { Firefox logic }
else
{ default logic }
}
Monday 8 July 2013
14
14. Context-Oriented Programming
Conditional Statements : some variant of ...
m(a) {
!
if (
) { IE logic }
else if (
) { Opera logic }
else if (
) { Chrome logic }
else if (
) { Safari logic }
Tangled
else if (
Adaptable
else
) { Firefox logic
{ default logic
Scattered
}
Fixed
No reuse
}
Complex logic
}
Monday 8 July 2013
14
16. Context-Oriented Programming
A Toy Example
(really)
(default context)
adaptation
CODE: move toward
pacman
CODE: move randomly
in the maze
Context Expert
Monday 8 July 2013
adaptation
Context Beginner
17
17. Context-Oriented Programming
An excerpt of the COP implementation of Pac-Man™ in
Phenomenal Gem
!"#$$!"#$%&
Default behaviour
!!%&'!'()*&+,($%-&-$.
!!!!!"#$%&'"()*%"+,-.)(/0"1-"23%"(,4%
!!!!!"5
!!&(%
&(%
/#$%&0'()*&+,($%-&-$.!!"()*%"+,-.)(/0
Monday 8 July 2013
18
18. Context-Oriented Programming
An excerpt of the COP implementation of Pac-Man™ in
Phenomenal Gem
!"#$$!"#$%&
!!%&'!'()*&+,($%-&-$.
!!!!!"#$%&'"()*%"+,-.)(/0"1-"23%"(,4%
!!!!!"5
!!&(%
&(%
!
+1(+2&,3$.&+1&!4!5$.&+1&0.+6
+1(+2&,3$.&+1&0*)),*)*(&*&-$.)"#$%&7!*+,%#-&.,/$0-0/(7!-1+&7!
22,1/!!3!!"#$%&'"()*%"2)6,+."$,&(,-24
45
/#$%&0'()*&+,($%-&-$.!!"()*%"+,-.)(/0
+1(+2&,3$.&+1&0*3&-8*&+
/#$%&0'()*&+,($%-&-$.2!"()*%"2)6,+."$,&(,Monday 8 July 2013
18
19. Context-Oriented Programming
An excerpt of the COP implementation of Pac-Man™ in
Phenomenal Gem
!"#$$!"#$%&
!!%&'!'()*&+,($%-&-$.
!!!!!"#$%&'"()*%"+,-.)(/0"1-"23%"(,4%
!!!!!"5
Explicit
!!&(%
Contexts
&(%
Definition of Adaptations
!
(even dynamically)
+1(+2&,3$.&+1&!4!5$.&+1&0.+6
+1(+2&,3$.&+1&0*)),*)*(&*&-$.)"#$%&7!*+,%#-&.,/$0-0/(7!-1+&7!
22,1/!!3!!"#$%&'"()*%"2)6,+."$,&(,-24
45
(De)activation of contexts
/#$%&0'()*&+,($%-&-$.!!"()*%"+,-.)(/0
Dynamic Behaviour
+1(+2&,3$.&+1&0*3&-8*&+
Adaptation
/#$%&0'()*&+,($%-&-$.2!"()*%"2)6,+."$,&(,Monday 8 July 2013
18
20. Context-Oriented Programming
Some COP language extensions we have been working on ...
Ambience [CLOS]
Subjective-C [Objective-C]
SCopJ [Java]
Phenomenal Gem [Ruby]
Context Traits [JavaScript]
plus a small educational prototype in Smalltalk
Monday 8 July 2013
19
22. Motivation : Subversion
Maintaining backward compatibility can lead to software erosion
e.g., in the source code of Subversion original functions like
!"#$%&'(#)$%*(%+,-)./!"#$%&'(#)$%,00')./!"#$%&'(#)$122./333
were subsequently extended with new functionality and parameters
!"#$%&'(#)$%*(%+,-)4.//!"#$%&'(#)$%*(%+,-)5
!"#$%&'(#)$%,00')./!"#$%&'(#)$%,00')4./333./
!"#$%&'(#)$%,00')6
!"#$%&'(#)$122./!"#$%&'(#)$1224./333./!"#$%&'(#)$1227
Monday 8 July 2013
21
28. Motivation : Skype
Need for life software updates
without
Service interruption
program state loss
losing old program version
...
Monday 8 July 2013
23
29. The idea
Exploit COP by considering versions as a kind of context that
can be dynamically (de)activated
activating that context = moving to a new version
deactivating = reverting to an older version
Original use of COP in a way it hasn’t been specifically
conceived for
Monday 8 July 2013
24
33. Instance Migration
Object behavior must match the class definition of the
currently active version context
TRADITIONAL
Monday 8 July 2013
NEW
NEW WITH 2 CLASSES
28
34. Instance State
Storing the values of attributes of each object for every
version is inefficient.
Solution :
store them for only one of the versions, e.g. the latest
redirect attribute access for the other versions
Monday 8 July 2013
29
35. Version Mappings
But what if the representation of an attribute evolves?
For example, from money in $ to money in !
VERSION 1
VERSION 2
{ Entity@money in v1 is represented differently in v2 }
Monday 8 July 2013
30
36. Version Mappings
Or what if a class is renamed from one version to another?
VERSION 1
VERSION 2
{ Entity in v1 = Pacman in v2 }
Monday 8 July 2013
31
37. Version Mappings
Or what if an attribute gets renamed?
VERSION 1
VERSION 2
{ Entity@location in v1 = Pacman@position in v2 }
Monday 8 July 2013
32
38. Version Mappings
Need for version mappings to map from the old version to
the new one (and back)
(Bidirectional) functions defined by the programmer to
render explicit these implicit changes between versions
class Pacman
attr_accessor :money
# 1 US$ = 27.435 FB
result_mapping :@money, lambda {|val| val * 27.435 },
lambda {|val| val / 27.435 }
# ...
end
Monday 8 July 2013
33
39. Version Mappings
Currently supported version mappings :
Name version mappings (classes, methods, attributes)
Parameter version mappings
Result version mappings
More version mappings could (should) be added ...
Monday 8 July 2013
34
40. Current Implementation Restrictions
Linear versioning vs branch versioning
Granularity of an update: full version vs delta version
No support for concurrency
Monday 8 July 2013
35
42. The idea
Dynamic Behaviour Adaptation Through Run-Time Trait
Recomposition
Paper presented at AOSD•Composition 2013
Adopt the notion of Traits, a static composition mechanism,
in a more dynamic setting, and use it as a building block for
implementing COP
Monday 8 July 2013
37
50. Contributions
Traits are convenient units of adaptation
more than single methods, less then full classes
Support for flexible composition policies
e.g., non-linear (default policy = by activation age)
Support for overriding behaviour with “proceed”
JavaScript allows for easy definition of contexts, traits and
composition
build on top op traits.js [Van Cutsem & Miller 2011]
Monday 8 July 2013
39
51. In the paper...
‣ Contexts
‣ Traits
‣ Context-Driven Trait Compositions
‣ Composition Policies
‣ Behaviour Extensibility
‣ Context Traits in JavaScript
‣ Implementation Notes
‣ Case Studies
‣ Related Work
‣ Future Work
Monday 8 July 2013
40
53. Research question
How to increase confidence in context-oriented systems that
can dynamically adapt their behavior as context are being
activated and deactivated ?
Support for context dependency relations to express
allowed and disallowed interactions between contexts
Plus a mechanism to ensure consistency of the system
with respect to those declared dependencies
both statically and dynamically
Monday 8 July 2013
42
56. Research goal
How to ensure that
the declared model makes sense
verifying coherence and correctness of interactions
the model is respected by the system at run-time
ensure run-time consistency
Monday 8 July 2013
44
57. Context Petri nets
0.1 slide 14
1
Singleton CoPN
0.1 slide 14
A context is represented by a context Petri net (CoPN)
defined as C = Pc , Pt , Te , Ti , f, f◦ , ρ, L, m0 , Σ
Subjective-C
8%,#)(9):;,2(
2+:;$)+
92:;$)+
81%)'1)(:;,2(
Pc ∩ Pt = φ
Te ∩ Ti = φ
(Pc ∪ P ) ∩ (Te ∪ Ti ) = φ 2+:=;$)+
*3:;$)+ t
f : (P × T × L) ∪ (T × P × L) −→ Z∗
f◦ : P × T −→ {0, 1}
;$)+
0.2 slide 21
ρ : T −→ Z∗
∀ t ∈ Te , ρ(t) = 0
∀ t ∈ Ti , ρ(t) 0
m0 : P × L −→ Z∗
)+*3:;$)+
92:=;$)+
82(1%)'1)(:;,2(
◦({CQ , CN , CM }, {E, CQ , CN , S, CM , CQ })
Context Petri nets.
Subjective-C: Bringing Context to Mobile Platform Programming.
González, Sebastián and Cardozo, Nicolás and Mens, Kim and Cádiz, Alfredo
http://released.info.ucl.ac.be/Tools/Context-PetriNets
and Libbrecht, Jean-Cristophe and Goffaux, Julien. International Conference ◦({C , C }, {S, C , C })
Q M
M Q
on Software Language Engineering (SLE’10).
Modeling and Analyzing Self-adaptive Systems With Context Petri
Nets. Cardozo, Nicolás and González, Sebastián and Mens, Kim and
Ragnhild Van Der Straeten and D’Hondt,Theo. International Symposium on
Theoretical Aspects of Software Engineering (TASE ’13).
Monday 8 July 2013
context
place
external
transition
activation
type
temporary
place
internal
transition
arcs
union({CQ , CM })
extS ({CQ , CM }, {S, CM , CQ })
inhibitor
arcs
46
58. 0.1 slide 14
Context Dependency Relations
E, CA , CB
C, CA , CB
I, CA , CB
1
1
1
Pc ∩ Pt = φ
Te ∩ Ti = φ
(Pc ∪ Pt ) ∩ (Te
f : (P × T × L
f◦ : P × T −→
∧, CA1 , . . . , CAn
E, CA,,,C B@/A#%%?@+01=(-A/*/E,-//'*/=,!B
E, CAACCBBC
Q, C C,
E,
A
Context dependency relations
B
Five types of context dependency relations:
0.2 slide
Exclusion (E), Causality (C), Implication (I),
Requirement (Q), conjunction (∧)
C,C, ,CC,BCB
C, CA , A B @/A#%%:#+$#0-;1/=*/C/-/*/DB 1
CA C
I, I, ,CC,BCB @/A#%%=,0!#-0/(1/=*/C/-/*/DB
I, CA , CB
CA A
, .◦ n
∧,TCA T,, . f,. fC,Aρ,n m0 , Σ
t , C, 1
eA
∧,∧,1CiA,.1.. .. ,, .CACAL,@/A#%%:/(B+(!-0/(C'*/AC/./333./C/BB
n
@
15
0.3 slide 16
.
E,
Q, C , C@/A#%%67!+$0/(8-9(*/;,2(/#(%*/=(?B
Q, CAA,,CCBBB
Q, CA , A B
C C
*3:;$)+
∗
ρ : T −→ Z
8%,#)(9):;,2(
∀ t ∈ Te , ρ(t) = 0
φ I, CA , CB
∀ t ∈ Ti , ρ(t) 2+:;$)+
0
× ,P t , Te ,. T. ,,f, Z◦ , ρ, L, m00 Σ × L −→ Z∗
× L) .−→ f ∗
m, : P
∧, CA1 , i CAn
c P
C
;$)+
C, CA , CB
92:=!;$)+
S ⊆ S
2+:=;$)+R ⊆ R)+*3:;$)+
◦(S
92:;$)+
t , Te , Ti , f, f◦ , ρ, L, m0 , Σ
t , Te , Ti ,,f, f◦ , ρ, L, m0 , Σ
Q, C C
A
B
ρ : T −→ Z∗
Subjective-C
92:92+?
∀ t ∈ Te , ρ(t) = 0
∗
∗
ρ :: T −→ Z
ρt∈T , Z
)=φ
∀ T −→
8%,#)(9):=(? ρ(t) 0
∀ t ∈ P ie ,, L −→= ∗0
∗
∀ t ∈ T × ρ(t)2+:92+?
T × P × L) −→ Z
m0 : Te ρ(t) = 0
Z
*3:92+?
φ Te , Ti , f, f◦ , ρ, L, m0 , Σt ∈ Tii,, ρ(t) 0
∀ t ∈ T ρ(t) 0
φ
∀
},
t
)+*3:92+?
92+?
2+:=92+? slide 22
0.492:=92+?
[Subjective-C:
to Mobile
∗
P × L) −→Bringing Contextm0 :: P Platform Programming. SLE’10]
Z∗
× L −→ Z∗
P × L) −→analyzing self-adaptive systems with context Petri nets.TASE’13]
Z
m0 P × L −→ Z∗
[Modeling and
= Ti 8∪ {deac(A)}
Monday July 2013
ρ : T −→ Z∗
47
59. 0.1 slide 14
Context Dependency Relations
E, CA , CB
C, CA , CB
I, CA , CB
1
1
1
Pc ∩ Pt = φ
Te ∩ Ti = φ
(Pc ∪ Pt ) ∩ (Te
f : (P × T × L
f◦ : P × T −→
∧, CA1 , . . . , CAn
E, CA,,,C B@/A#%%?@+01=(-A/*/E,-//'*/=,!B
E, CAACCBBC
Q, C C,
E,
A
Context dependency relations
B
Five types of context dependency relations:
0.2 slide
Exclusion (E), Causality (C), Implication (I),
Requirement (Q), conjunction (∧)
C,C, ,CC,BCB
C, CA , A B @/A#%%:#+$#0-;1/=*/C/-/*/DB 1
CA C
I, I, ,CC,BCB @/A#%%=,0!#-0/(1/=*/C/-/*/DB
I, CA , CB
CA A
, .◦ n
∧,TCA T,, . f,. fC,Aρ,n m0 , Σ
t , C, 1
eA
∧,∧,1CiA,.1.. .. ,, .CACAL,@/A#%%:/(B+(!-0/(C'*/AC/./333./C/BB
n
@
C, CA , CB
*3:A$'2
A$'2
92:=A$'2
S ⊆ S
2+:=A$'2R ⊆ R)+*3:A$'2
◦(S
92:A$'2
t , Te , Ti , f, f◦ , ρ, L, m0 , Σ
t , Te , Ti ,,f, f◦ , ρ, L, m0 , Σ
Q, C C
A
15
0.3 slide 16
.
E,
Q, C , C@/A#%%67!+$0/(8-9(*/C/#(%*/DB
Q, CAA,,CCBBB
Q, CA , A B
C C
∗
ρ : T −→ Z
∀ t ∈ Te , ρ(t) = 0
φ I, CA , CB
∀ t ∈ Ti , ρ(t) 2+:A$'2
0
× ,P t , Te ,. T. ,,f, Z◦ , ρ, L, m00 Σ × L −→ Z∗
× L) .−→ f ∗
m, : P
∧, CA1 , i CAn
c P
C
%#!)A/+15
B
ρ : T −→ Z∗
92:9$%
∀ t ∈ Te , ρ(t) = 0
∗
∗
ρ :: T −→ Z
ρ t ∈ T , ρ(t) 0
)=φ
∀ T −→ Z
∀ t ∈ P ie ,, L −→= ∗0
∗
∀ t ∈ T × ρ(t) 2+:9$%
T × P × L) −→ Z
m0 : Te ρ(t) = 0
Z
φ
∀ t ∈ T ρ(t) 0
φ
∀
}, Te , Ti , f, f◦ , ρ, L, m0 , Σt ∈ Tii,, ρ(t) 0
t
)+*3:9$%
*3:9$%
9$%
2+:=9$%
0.4
slide 22
92:=9$%
[Subjective-C:
to Mobile
∗
P × L) −→Bringing Contextm0 :: P Platform Programming. SLE’10]
Z∗
× L −→ Z∗
P × L) −→analyzing self-adaptive systems with context Petri nets.TASE’13]
Z
m0 P × L −→ Z∗
[Modeling and
= Ti 8∪ {deac(A)}
Monday July 2013
ρ : T −→ Z∗
48
60. C = Pc , ∈ tT Teρ(t),◦ 0◦ ,× T −→, Σ 1} ∗
, , Ti : P ρ, L, m0 {0,
∪ Ti ) = φ
∀ t P : i(P ,×f f, f ∪ (T × P × L) −→ Z
f
T × L)
∗C = P , P , T , T , f, f , ρ, L, m , Σ
) ∪ (T × P × L) −→ Z
m f◦ e P × T ◦−→∗ 0
c 0t : P: ×i L −→ Z {0, 1}
{0, 1}
Pc ∩ Pt = φ
ρ : T −→ Z∗
m0 : P × L −→ Z∗
Composition of CoPNs
P∩ P =
ρ : T −→ ∈ ∗Te , ρ(t) = 0
Te c ∩Tit = φ
∀t Z
Te ∩ P ) φ
0.2
(Pc ∪ Tit= ∩ (Te ∪ Ti ) = φ slide 16 ∀ t ∈ Te , ∈ Ti= 0
∀ t ρ(t) , ρ(t) 0
(Pc ∪ Pt ) ∩ (Te0.2) = φ
∪ T slide 16
∀ t ∈ T , ρ(t) 0
f f: :(P × T × L) ∪∪i (T × × L) L) −→ Z∗ m : P i× L P ×Z∗ −→ Z∗
× L) (T × P P × −→ Z∗
m0 : −→ L
(P × T
0
92:=92+?
92:92+?
f◦ ◦: :P × T −→ {0, 1}
92+?
)+*3:92+?
f P × T −→ {0, 1}
◦ :*3:92+? × ℘(R) → P × ℘(R) → P
℘(S ) ◦ : ℘(S )
Composition
◦ : ℘(S ) of contexts
S
Given a set × ℘(R) → Pand Sset S
S ⊆ a ⊆ 2+:92+?
2+:=92+?
of context dependency relationsR ⊆ R
R ⊆ R =(?((#%(!
cons(ext(union(S), R), R)
0.2 slide 16
the slide 16
cons(ext(union(S), R), R)
0.2 composition is defined as :
cons(ext(union(S), R), R)
92:;$)+
92:=;$)+
◦ : ℘(S ) × ℘(R) → P
S
: ℘(S ) ×
0.3 ◦slide 22 ℘(R) → P
contexts
- S : ⊆ S =(?((#%(!./;,2(.
2+:;$)+
F((G1+
⊆
⊆RS R
0.3 slide 22
*3:;$)+
;$)+
2+:=;$)+
)+*3:;$)+
◦({CU , CL }, {∨, CU , CL })
cons(ext(union(S), R), R)
;,2(
Exclusion
-R : ⊆ R (B) and
◦({CU , CL }, {∨, CU , CL })
◦({CU , (5)
causality CL }, {∨, CU , CL }) cons(ext(union(S), R), R)
92:=;$)+
92:;$)+
union({CU , CL })
relations
0.3 slide 22
union({CU , CL })
0.3 slide 22
union({CU , CL })
2+:=;$)+
2+:;$)+
◦({CU , CL }, {∨, CU , CL })
;$)+
ext∨*3:;$)+ L }, {∨, CU , CL })
({CU , C
;,2(
)+*3:;$)+
ext∨ ({CU , CL }, {∨, CU , CL }) ◦({CU , CL }, {∨, CU , CL })Pc = Pc ∪ {U|L}
union({C , C })
Pt
Pc = Pc ∪ {U|L}
U
ext∨ ({CU , CL }, {∨,92:=C2++L })
CU , C
L 92:C2++
Pt = Pt ∪ {P r(U|L), P r(¬U|L)}
Pc = Pc ∪ {U|L}
ext∨ ({Cunion({CU , CCL}) Ti ∪ {act(U|L), deac(U|Ln )}
U , CL }, {∨, CU , T })
2+:C2++
2+:=C2++
L =
= Pt ∪ {P r(U|L), P r(¬U|L)}
TMonday 8 July∪ {act(U|L), deac(U|Ln )}
i = Ti 2013
i
Pc
*3:C2++
)+*3:C2++
Pt = Pt ∪ {P r(U|L), P r(¬U|L)}
= PcF((G1+
∪ {U|L}
ρ(t) if t inTe ∪ Ti
49
ρ (t) =
C2++
61. C = Pc , ∈ tT Teρ(t),◦ 0◦ ,× T −→, Σ 1} ∗
, , Ti : P ρ, L, m0 {0,
∪ Ti ) = φ
∀ t P : i(P ,×f f, f ∪ (T × P × L) −→ Z
f
T × L)
∗C = P , P , T , T , f, f , ρ, L, m , Σ
) ∪ (T × P × L) −→ Z
m f◦ e P × T ◦−→∗ 0
c 0t : P: ×i L −→ Z {0, 1}
{0, 1}
Pc ∩ Pt = φ
ρ : T −→ Z∗
Composition of CoPNs
m0 : P × L −→ Z∗
P∩ P =
ρ : T −→ ∈ ∗Te , ρ(t) = 0
Te c ∩Tit = φ
∀t Z
T ∩ Ti = φ
∀ t ∈ Te , ∈ T = 0
∀ t ρ(t) i , ρ(t) 0
if A ∈ t •(PcA∪ Pt ) ∧ (T= ∪ Ti )l = φ slide 16
∧e ∈ •t ∩ p e B ∧ 0.2
/
∈L
(Pc ∪ Pt ) ∩ (Te0.2) = φ
∪ T slide 16
∀ t ∈ T , ρ(t) 0
f f: :(P × T × L) ∪∪i (T × × L) L) −→ Z∗ m : P i× L P ×Z∗ −→ Z∗
× L) (T × P P × −→ Z∗
m0 : −→ L
otherwise (P × T
0
:/DE 92:92+?
92:=92+?
f◦ ◦: :P × T −→ {0, 1}
92+?
)+*3:92+?
f P × T −→ {0, 1}
◦ :*3:92+? × ℘(R) → P × ℘(R) → P
℘(S ) ◦ : ℘(S )
Composition
if A ∈ ℘(S∧ A ∈ •t ∧ → = B ∧ l ∈ L
◦ : ta•set ×/contextsPand a set S
) of ℘(R) p
S
Given
S ⊆ S ⊆ 2+:92+?
2+:=92+?
otherwise dependency relationsR
of context
R ⊆ R ⊆ R
0.2 slide 16
the slide 16
0.2 composition is defined as :
cons(ext(union(S), R), R)
cons(ext(union(S), R), R)
cons(ext(union(S), R), R)
◦ : ℘(S ) × ℘(R) → P
: ℘(S ) ×
0.3 ◦slide 22 ℘(R) → P
contexts
-) :⊆ S → P
℘(S S × ℘(R) =(?((#%(!./;,2(.
S
F((G1+
⊆
⊆RS R
0.3 slide 22
92:;$)+
◦({CU , CL }, {∨, CU , CL })
cons(ext(union(S), R), R)
92:=;$)+
Exclusion
-R : ⊆ R (B) and
◦({CU , CL }, {∨, CU , CL })
2+:=;$)+
2+:;$)+
◦({CU , (5)
)+*3:;$)+
causality CL }, {∨, CU , CL }) cons(ext(union(S), R), R)
*3:;$)+
;$)+
ons(ext(union(S), R), R)
union({CU , CL })
relations
0.3 slide 22
union(S)
union({CU , CL })
union({CU , CL })
0.3 slide 22
◦({CU , CL }, {∨, CU , CL })
ext∨ ({CU , CL }, {∨, CU , CL })
ext(S, R)
ext∨ ({CU , CL }, {∨, CU , CL }) ◦({CU , CL }, {∨, CU , CL })Pc = Pc ∪ {U|L}
union({CU , CL })
ext∨ ({CU , CL }, {∨,92:=C2++L })
CU , C
cons(S, R)
92:C2++
Pt = Pt ∪ {P r(U|L), P r(¬U|L)}
Pc = Pc ∪ {U|L}
Q, CH , CV
Pc = Pc ∪ {U|L}
ext∨ ({Cunion({CU , CCL}) Ti ∪ {act(U|L), deac(U|Ln )}
2+:C2++
2+:=C2++
L })
Pt = Pt ∪ {P r(U|L), P r(¬U|L)} U , CL }, {∨, CU , Ti = *3:C2++
C2++
)+*3:C2++
C, CC , CV
Pt = Pt ∪ {P r(U|L), P r(¬U|L)}
Pc = Pc ∪ {U|L}
ρ(t) if t inTe ∪ Ti
TMonday 8 July∪ {act(U|L), deac(U|Ln )}
i = Ti 2013
49
ρ (t) =
62. C = Pc , ∈ tT Teρ(t),◦ 0◦ ,× T −→, Σ 1} ∗
, , Ti : P ρ, L, m0 {0,
∪ Ti ) = φ
∀ t P : i(P ,×f f, f ∪ (T × P × L) −→ Z
f
T × L)
∗C = P , P , T , T , f, f , ρ, L, m , Σ
) ∪ (T × P × L) −→ Z
m f◦ e P × T ◦−→∗ 0
c 0t : P: ×i L −→ Z {0, 1}
{0, 1}
Pc ∩ Pt = φ
ρ : T −→ Z∗
Composition of CoPNs
m0 : P × L −→ Z∗
P∩ P =
ρ : T −→ ∈ ∗Te , ρ(t) = 0
Te c ∩Tit = φ
∀t Z
T ∩ Ti = ∩
φ
∀ t ∈ Te , ∈ T = 0
∀ t ρ(t) i , ρ(t) 0
if A ∈ t •(PcA∪/Pt ) ∧ (T= ∪ Ti )l = L slide 16
∧eA ∈ •t ∧ p = B ∧ 0.2
/ •t p e B ∧ l ∈ φ
∈L
if A ∈ t • ∧ c ∪ Pt ) ∩ (Te0.2) = φ
(P ∈
∪ T slide 16
∀ t ∈ T , ρ(t) 0
f f: :(P × T × L) ∪∪i (T × × L) L) −→ Z∗ m : P i× L P ×Z∗ −→ Z∗
× L) (T × P P × −→ Z∗
m0 : −→ L
otherwise (P × T
otherwise
0
:/DE 92:92+?
92:=92+?
f◦ ◦: :P × T −→ {0, 1}
92+?
)+*3:92+?
f P × T −→ {0, 1}
◦ :*3:92+? × ℘(R) → P × ℘(R) → P
℘(S ) ◦ : ℘(S )
Composition
if A ∈ ℘(S∧ A ∈ •t ∧ → = B ∧ ll ∈ L
if A ∈ ta•set A ∈contexts= and a setL S
◦ : t • ∧ ×/ •t ∧ p PB ∧ S ∈⊆
) of/
℘(R) p
Given
S ⊆ S
2+:92+?
2+:=92+?
otherwise dependency relationsR
otherwise
of context
R ⊆ R ⊆ R
0.2 slide 16
the slide 16
0.2 composition is defined as :
cons(ext(union(S), R), R)
cons(ext(union(S), R), R)
cons(ext(union(S), R), R)
◦ : ℘(S ) × ℘(R) → P
: ℘(S ) ×
0.3 ◦slide 22 ℘(R) → P
contexts
- ) :⊆ S
℘(S) × ℘(R) → P
℘(S S × ℘(R) =(?((#%(!./;,2(.
S
F((G1+
⊆
⊆RS R
0.3 slide 22
92:;$)+
◦({CU , CL }, {∨, CU , CL })
cons(ext(union(S), R), R)
92:=;$)+
Exclusion
-R : ⊆ R (B) and
◦({CU , CL }, {∨, CU , CL })
2+:=;$)+
2+:;$)+
◦({CU , (5)
)+*3:;$)+
causality CL }, {∨, CU , CL }) cons(ext(union(S), R), R)
*3:;$)+
;$)+
cons(ext(union(S), R), R)
ons(ext(union(S),
R)
union({CU , CL })
relations
0.3 slide 22
union(S)
union(S)
union({CU , CL })
union({CU , CL })
%#!)15
◦({CU , CL }, {∨, CU , CL })
0.3 slide 22
ext∨ ({CU , CL }, {∨, CU , CL })
ext(S, R)
R)
ext(S,
- Add constraints specific C })
ext∨ ({CR) L }, {∨, CU ,to Leach ◦({CU , CL }, {∨, CU , CL })Pc = Pc ∪ {U|L}
,C
U
cons(S, R)
union({CU , CL })
ext∨ ({CU , CL }, {∨,92:=C2++L })
CU , C
cons(S,dependency relation
92:C2++
context
Pt = Pt ∪ {P r(U|L), P r(¬U|L)}
Pc V Pc ∪ {U|L}
=
Q, CH C
Q, CH ,, CV
Pc = Pc ∪ {U|L}
ext∨ ({Cunion({CU , CCL}) Ti ∪ {act(U|L), deac(U|Ln )}
2+:C2++
2+:=C2++
L })
Pt C, Pt ,∪ V r(U|L), P r(¬U|L)} U , CL }, {∨, CU , Ti = *3:C2++
= CC C {P
C2++
)+*3:C2++
C, CC , CV
Pt = Pt ∪ {P r(U|L), P r(¬U|L)}
Pc = Pc ∪ {U|L}
ρ(t) if t inTe ∪ Ti
TMonday 8 July∪ {act(U|L), deac(U|Ln )}
i = Ti 2013
49
ρ (t) =
63. C = Pc , ∈ tT Teρ(t),◦ 0◦ ,× T −→, Σ 1} ∗
, , Ti : P ρ, L, m0 {0,
∪ Ti ) = φ
∀ t P : i(P ,×f f, f ∪ (T × P × L) −→ Z
f
T × L)
∗C = P , P , T , T , f, f , ρ, L, m , Σ
) ∪ (T × P × L) −→ Z
m f◦ e P × T ◦−→∗ 0
c 0t : P: ×i L −→ Z {0, 1}
{0, 1}
Pc ∩ Pt = φ
ρ : T −→ Z∗
Composition of CoPNs
m0 : P × L −→ Z∗
P∩ P =
ρ : T −→ ∈ ∗Te , ρ(t) = 0
Te c ∩Tit = φ
∀t Z
T ∩ Ti = ∩
φ
∀ t ∈ Te , ∈ T = 0
∀ t ρ(t) i , ρ(t) 0
if A ∈ t •(PcA∪/Pt ) ∧ (T= ∪ Ti )l = L slide 16
∧eA ∈ •t ∧ p = B ∧ 0.2
/ •t p e B ∧ l ∈ φ
∈L
if A ∈ t • ∧ c ∪ Pt ) ∩ (Te0.2) = φ
(P ∈
∪ T slide 16
∀ t ∈ T , ρ(t) 0
f f: :(P × T × L) ∪∪i (T × × L) L) −→ Z∗ m : P i× L P ×Z∗ −→ Z∗
× L) (T × P P × −→ Z∗
m0 : −→ L
otherwise (P × T
otherwise
0
:/DE 92:92+?
92:=92+?
f f : ∈ × T −→ {0, 1}
92+?
)+*3:92+?
if A ∈ t • ◦ ◦:AP × T −→ {0, 1} l ∈ L
∧ P •t ∧ p = B ∧
/
◦ :*3:92+? × ℘(R) → P × ℘(R) → P
℘(S ) ◦ : ℘(S )
Composition
if A ∈ ℘(S∧ A ∈ •t ∧ → = B ∧ ll ∈ L
if A ∈ ta•set A ∈contexts= and a setL S
◦ : t • ∧ of/
℘(R) p
otherwise) ×/ •t ∧ p PB⊆∧ S ∈⊆
S
Given
S
2+:92+?
2+:=92+?
otherwise dependency relationsR
otherwise
of context
R ⊆ R ⊆ R
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
cons(ext(union(S), R), R)
0.2 slide 16
the slide 16
cons(ext(union(S), R), R)
0.2 composition is defined as :
otherwise
cons(ext(union(S), R), R)
◦ : ℘(S ) × ℘(R) → P
: ℘(S ) ×
0.3 ◦slide 22 ℘(R) → P
contexts
- ) :⊆ S
℘(S) × ℘(R) → P
℘(S S × ℘(R) =(?((#%(!./;,2(.0.3 slide 22
92:;$)+
92:=;$)+
F((G1+
⊆
S ⊆RS R
◦({CU , CL }, {∨, CU , CL })
cons(ext(union(S), R), R)
Exclusion
-R ⊆ R (B) and
℘(S ) :× ℘(R) → P
◦({CU , CL }, {∨, CU , CL })
2+:=;$)+
2+:;$)+
◦({CU , (5)
)+*3:;$)+
causality CL }, {∨, CU , CL }) cons(ext(union(S), R), R)
*3:;$)+
;$)+
cons(ext(union(S), R), R)
ons(ext(union(S),
R)
union({CU , CL })
relations
0.3 slide 22
union(S)
union(S)
union({CU , R),
cons(ext(union(S),CL })R)
0.3 slide 22
ext(S, R)
ext(S, R)
union(S)
union({CU , CL })
%#!)15
◦({CU , CL }, {∨, CU , CL })
ext∨ ({CU , CL }, {∨, CU , CL })
- Add constraints specific C })
ext∨ ({CR) L }, {∨, CU ,to Leach ◦({CU , CL }, {∨, CU , CL })Pc = Pc ∪ {U|L}
,C
cons(S, R)
union({CU , CL })
ext∨ ({CU , CL }, {∨,92:=C2++L })
CU , C
cons(S,dependency relation
ext(S, U
92:C2++
context
Pt = Pt ∪ {P r(U|L), P r(¬U|L)}
Pc V Pc ∪ {U|L}
=
Q, CH C
cons(S, R)
Q, CH ,, CV
Pc = Pc ∪ {U|L}
ext∨ ({Cunion({CU , CCL}) Ti ∪ {act(U|L), deac(U|Ln )}
2+:C2++
2+:=C2++
L })
Pt-Q,Pt ,∪ V r(U|L), P r(¬U|L)} U , CL }, {∨, CU , Ti = *3:C2++
= C constraints applicable for all
AddC C
C2++
C, C CH ,C {P
)+*3:C2++
CV
C, C , V
Pt = Pt ∪ {P r(U|L), P r(¬U|L)}
Pc = Pc ∪ {U|L}
defined contexts
ρ(t) if t inTe ∪ Ti
TMonday 8 July∪ C
i = Ti C2013V
49
C, C , {act(U|L), deac(U|Ln )}
ρ (t) =
64. Consistent States
Consistent States
No enabled internal transitions, and no marked
temporary places
D#%%67!+$0/(8-9(E!;$)+!#(%*!92+?F
*3:;$)+
92:=!;$)+
;$)+
2+:=;$)+
2+:;$)+ 92:;$)+
92:92+?
2+:92+?
Monday 8 July 2013
)+*3:;$)+
)+*3:92+?
*3:92+?
92+?
2+:=92+?
92:=92+?
50
65. Consistent States
Consistent States
No enabled internal transitions, and no marked
temporary places
D#%%67!+$0/(8-9(E!;$)+!#(%*!92+?F
✓
*3:;$)+
✓
92:=!;$)+
;$)+
2+:=;$)+
2+:;$)+ 92:;$)+
92:92+?
2+:92+?
Monday 8 July 2013
)+*3:;$)+
)+*3:92+?
*3:92+?
92+?
2+:=92+?
92:=92+?
50
66. Consistent States
Consistent States
No enabled internal transitions, and no marked
temporary places
D#%%67!+$0/(8-9(E!;$)+!#(%*!92+?F
*3:;$)+
92:=!;$)+
;$)+
2+:=;$)+
2+:;$)+ 92:;$)+
92:92+?
2+:92+?
Monday 8 July 2013
)+*3:;$)+
)+*3:92+?
*3:92+?
92+?
2+:=92+?
92:=92+?
50
67. Activation Semantics of CoPNs
92:=;$)+
*3:;$)+
2+:;$)+ 92:;$)+
;$)+
2+:=;$)+
)+*3:;$)+
%#!)F/%5
92:9$%
2+:9$%
)+*3:9$%
*3:9$%
9$%
2+:=9$%
92:=9$%
Context Petri Nets: Consistent of Context-dependent Behavior.
Cardozo, Nicolás and Vallejos, Jorge and González, Sebastián and Mens, Kim
and D’Hondt,Theo. International Workshop on Petri Nets and Software
Engineering (PNSE ‘12).
Monday 8 July 2013
51
68. Activation Semantics of CoPNs
92:=;$)+
*3:;$)+
2+:;$)+ 92:;$)+
;$)+
2+:=;$)+
)+*3:;$)+
81%)'1)(:;,2(
%#!)F/%5
92:9$%
2+:9$%
)+*3:9$%
*3:9$%
9$%
2+:=9$%
92:=9$%
1. External transitions fire after G*3-8*+ and G)+*3-8*+
Context Petri Nets: Consistent of Context-dependent Behavior.
Cardozo, Nicolás and Vallejos, Jorge and González, Sebastián and Mens, Kim
and D’Hondt,Theo. International Workshop on Petri Nets and Software
Engineering (PNSE ‘12).
Monday 8 July 2013
51
69. Activation Semantics of CoPNs
92:=;$)+
*3:;$)+
2+:;$)+ 92:;$)+
;$)+
2+:=;$)+
)+*3:;$)+
81%)'1)(:;,2(
%#!)F/%5
92:9$%
2+:9$%
)+*3:9$%
*3:9$%
9$%
2+:=9$%
92:=9$%
1. External transitions fire after G*3-8*+ and G)+*3-8*+
2. Enabled internal transitions are always fired
Context Petri Nets: Consistent of Context-dependent Behavior.
Cardozo, Nicolás and Vallejos, Jorge and González, Sebastián and Mens, Kim
and D’Hondt,Theo. International Workshop on Petri Nets and Software
Engineering (PNSE ‘12).
Monday 8 July 2013
51
70. Activation Semantics of CoPNs
92:=;$)+
*3:;$)+
2+:;$)+ 92:;$)+
;$)+
2+:=;$)+
)+*3:;$)+
81%)'1)(:;,2(
%#!)F/%5
92:9$%
2+:9$%
)+*3:9$%
*3:9$%
9$%
2+:=9$%
92:=9$%
1. External transitions fire after G*3-8*+ and G)+*3-8*+
2. Enabled internal transitions are always fired
3. If there is an inconsistency, actions revert to previous consistent state
Context Petri Nets: Consistent of Context-dependent Behavior.
Cardozo, Nicolás and Vallejos, Jorge and González, Sebastián and Mens, Kim
and D’Hondt,Theo. International Workshop on Petri Nets and Software
Engineering (PNSE ‘12).
Monday 8 July 2013
51
71. Activation Semantics of CoPNs
92:=;$)+
*3:;$)+
2+:;$)+ 92:;$)+
;$)+
2+:=;$)+
)+*3:;$)+
81%)'1)(:;,2(
%#!)F/%5
92:9$%
2+:9$%
)+*3:9$%
*3:9$%
9$%
2+:=9$%
92:=9$%
1. External transitions fire after G*3-8*+ and G)+*3-8*+
2. Enabled internal transitions are always fired
3. If there is an inconsistency, actions revert to previous consistent state
Context Petri Nets: Consistent of Context-dependent Behavior.
Cardozo, Nicolás and Vallejos, Jorge and González, Sebastián and Mens, Kim
and D’Hondt,Theo. International Workshop on Petri Nets and Software
Engineering (PNSE ‘12).
Monday 8 July 2013
51
72. Activation Semantics of CoPNs
92:=;$)+
*3:;$)+
2+:;$)+ 92:;$)+
;$)+
2+:=;$)+
)+*3:;$)+
81%)'1)(:;,2(
81%)'1)(:=,!
%#!)F/%5
92:9$%
2+:9$%
)+*3:9$%
*3:9$%
9$%
2+:=9$%
92:=9$%
1. External transitions fire after G*3-8*+ and G)+*3-8*+
2. Enabled internal transitions are always fired
3. If there is an inconsistency, actions revert to previous consistent state
4. Consistent states are accepted
Context Petri Nets: Consistent of Context-dependent Behavior.
Cardozo, Nicolás and Vallejos, Jorge and González, Sebastián and Mens, Kim
and D’Hondt,Theo. International Workshop on Petri Nets and Software
Engineering (PNSE ‘12).
Monday 8 July 2013
51
76. Petri net analyses
“Unfold” the CoPN to a traditional Petri net
need to introduce bounds = some loss of semantics
92:I
*3:I
I
2+:=I
92:=I
)+*3:I
2+:I
%#!)85
%#!)G5
2+:H 92:H
Monday 8 July 2013
*3:H
H
2+:=H
92:=H
)+*3:H
53
77. 0.8 Slide 18
Petri net analyses
1
1
f (t, p, l) =
1
f (p, t, l)
if p = Q ∧ M ∈ •t ∧ M ∈ •t ∧
/
Q ∈ ◦t ∧ l ∈ L
/
if p = P r(¬Q) ∧ M ∈ •t ∧ M ∈ t • ∧
/
Q ∈ ◦t ∧ l ∈ L
/
if p = P r(Q) ∧ M ∈ t • ∧ M ∈ •t ∧ l ∈ L
/
otherwise
“Unfold” the CoPN to a traditional Petri net
need to introduce bounds = some loss of semantics
92:I
*3:I
I
2+:=I
92:=I
)+*3:I
0.8 Slide 18
2+:I
%#!)85
%#!)G5
2+:H 92:H
*3:H
H
2+:=H
1
92:=H
)+*3:H
req(A)
Pr(A)
A1
act(A)0
req(¬A)
Pr(¬A)
deac(A)1
A0
deac(A)2
1
deac(B)1 deac(B)2
deac(A)1
1
B0
act(B)0
req(B)
Pr(B)
Monday 8 July 2013
1
B1
act(B)1
deac(B)1
1
B2
req(¬B)
Pr(¬B)
deac(B)2
53
78. Petri net analyses
“Unfold” the CoPN to a traditional Petri net
Use a traditional Petri net analysis tool like LoLA
Choose appropriate bounds to avoid too large Petri nets
Use LoLa to reason about properties like reachability and liveness
partly manual (guided by the user)
partly automated (analysis tests generated from
dependencies)
Monday 8 July 2013
54
79. Conclusion
2
1
f (p, t, l) =
f (p, t, l)
1
f (t, p, l) =
f (t, p, l)
requirement
implication
0.4 slide 16
exclusion
disjunction
Formalization Formal basis for adaptations
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
and their interactions
otherwise
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
otherwise
CoPN model
conjunction
suggestion
causality
◦ : ℘(S ) × ℘(R) → P
Context dependency relations
S ⊆ S
R ⊆ R
◦(S, R) = cons(ext(union(S), R), R)
CoPNs composition
union(S)
ext(S, R)
Analysis
cons(S, R)
Q, CH , CV
C, CC , CV
0.5 slide 17
Execution
Monday 8 July 2013
External transition firing: occurs only at the beginning of a step Υ when
P is in a consistent state m (i.e., the marking of P is consistent) and E is empty
˜
(i.e., i.e. no internal transitions are enabled). After firing an external transition,
the marking of the COPN! (COPN!) is modified, possibly enabling transitions
in Ti . Such transitions become the elements in the priority set E.
t ∈ Te , m[tm
˜
55
80. Conclusion
2
1
f (p, t, l) =
f (p, t, l)
1
f (t, p, l) =
f (t, p, l)
0.1 slide 14
otherwise
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
otherwise
CoPN model
1
requirement
slide 14
disjunction
implication
0.4 slide 16
0.1
Formalization Formal basis for adaptations
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
and their interactions
C = Pc , Pt , Te , Ti , f, f◦ , ρ, L, m0 , Σ
Pc ∩ Pt = φ
Te ∩ Ti = φ
(Pc ∪ Pt ) ∩ (Te ∪ Ti ) = φ
f : (P × T × L) ∪ (T × P × L) −→ Z∗
f◦ : P × T −→ {0, 1}
suggestion
ρ : T −→ Z∗
∀ t ∈ Te , ρ(t) = 0
∀ t ∈ Ti , ρ(t) 0
m0 : P × L −→ Z∗
exclusion
conjunction
causality
◦ : ℘(S ) × ℘(R) → P
Context dependency relations
0.2 slide 15
S ⊆ S
slide R
R 0.3⊆ 16
∧
S ⊆ S
R ⊆ R
◦ : ℘(S ) × ℘(R) → P
union(S)
Execution model
for COP systems
CoPNs composition
union(S)
ext(S, R)
2
2
◦(S, R) = cons(ext(union(S), R), R)
◦(S, R) = cons(ext(union(S), R), R)
cons(S, R)
0.4 slide 17
t ∈ E, ∈ T , m[tm
/
External transition firing: toccurs only at the beginning of a step Υ when
(0.2)
PP, E, T , T , m → [m/m ]P, enabledmof P ), T t, t, E, and E˜is empty
is in a consistent state m (i.e., the marking (Ti is consistent) m, m
˜
˜
(i.e., i.e. no internal transitions are enabled). After firing an external transition,
Evaluation of the COPN! (COPN!) is modified, possibly enabling transitions
the marking termination: When there are no more internal transitions to
t cases ∈ possible:
/
0.6be fired22 the set E, three∈ E, the elements in the priority set E.
slide in
in Ti . Such transitions become tare T , m[tm
(0.2) 3
1. The , T m occurs when for m marking multiset of P there are marked
P, E, T first,case → [m/m ]P, enabledm (Ti ), T t, t, E, m, m
˜
˜
t ∈ Te m[tm
˜
temporary places and not all initially, enabled internal transitions have(0.1)
been
2
]P, enabled more internal transitions to
˜
˜
Evaluation termination: → [ ˜ there are no mthe), φ, φ, m of COPN! m
fired. such a P, φ, all changes are rolled back (Ti state of
case all m When
fired. InIn such acase φ, φ,changes m/m rolledback toto the state the the COPN! m
are
besaved before transition firing: If possible: is not empty, firing one of the
fired in the the firing of the first internal transition
Internal set E, three cases are the set E
saved before the firing of the first internal transition t: t:
1.internal transitions with when for m markinga multiset of Pm of the COPN!
The first case occurs highest priority yields new marking there are marked
markedm (P initially T , m[tm π (T transitions have to
temporary placesofand not (Pttbeforet firing ππ(T ), ), 2π2is) saved T a means been
P. The state markedm allt ) ∈ E, m enabled internal T (as
the COPN! ) = φ, ∈ = transition t (T )
= φ, / = 3 3 (T
m
(0.3)
(0.2)
, m T T ˜
˜
state
t,
˜
facilitate P, E, T , T all φ,→ ,[m/m inconsistencies). ),Tthe newE, of m possibly (0.3)
backtracking changesof →enabledm (TtoThe m marking
fired. In such a caseP,φ,in case, m]P,rolled/m]P, φ,φ, ,T ,t,˜ mm,the COPN! m
are [m back i T φ, φ, ˜
P, T , T , m → [m /m]P,
˜
enables some internal occurs when Tforwhich become the
saved before second case transitions internalm marking t: elements P there are
the firing of the first in i , transition multiset of of E.
2. The
Evaluation termination: When there are no more internal transitions to
2. The second the set occurs cases arefor m initially enabled haveof P there are
temporaryfired in case E, three all transitions marking multiset been fired,
be places marked and when possible:
(T
the COPN! is rolledcase occurs = φ,for m marking multiset of T
temporary 1. The markedm (Ptitswhen transitions state 2˜ andPthe firing marked (0.3)
placesfirst back to ) all consistent initially ) there are request is
marked and last m = π3 (T ), π m enabled have been fired,
temporary places and
P,
signaled as rolled φ, , not all →consistent internal m the firing request is
the COPN! isdenied: backTtoT , m initially enabled state, mtransitions have been
its ˜
last [m /m]P, φ, T φ, and
˜ ˜
fired. In such a case all changes are rolled back to the state of the COPN! m
signaled as second case firing of the first )internalπ markingt: multiset of P there are
2. The denied: the occurs when for φ, transition T
saved before
marked (P = m (T )
ext(S, R)
Analysis
cons(S, R)
Q, CH , CV
C, CC , CV
2
temporary places marked T , T , mtransitionsm]P, φ, φ, enabled have been(0.4)
fired,
P,markedmallt)(P φ, = φ,/ 3 initially φ, T
φ, and (P = [m π ˜(T(T π2 (T T m
˜
markedm → m = π2 ), ⊆ ) ˜
t
(0.3)
the COPN! is rolled backP, φ, T ,lastm)→ [m /m]P, φ,)Tm and the firing request (0.4)
to its T consistent state ˜φ, m
is
, ˜
3. The third case φ, T , when , ˜→ marking multiset m
˜
˜
˜
signaled as denied: P,occurs T , mfor m[m /m]P, φ, φ, φ, of P no temporary
m
t
0.5 slide 17
2. The second case occurs when for m marking multiset of P there m
places remain marked, we finish the step by turning the current markingare of
marked and
3. Thetemporary the occurs when all)transitions(T ) multisethaveP nofired,
third case new consistentt state m:
m marking enabled of been temporary
the COPN! into places markedm (Pfor= φ,˜ π2 initiallyT
the COPN! is rolled
˜
places remain marked, weback ,to its last consistent state m andm firing request is (0.4) of
finish the step by˜turning the the
current marking m
˜
signaled as P, φ, T , T m → [m ) m]P, φ, φ, φ, ˜
denied:
markedm (P / =
the COPN! into the new consistent state tm: φ
˜
(0.5)
P, φ, markedm m = φ, πφ, φ, φ, m
T , T m ) P, 2 (T T
˜
3. The third case occurs when ,for(Pt→ marking) multiset of P no temporary
(0.4)
places remain marked, we finish T , m → (Ptturning φ, φ, m
current marking m of
P, φ, T markedm by ) m]P, φ, the ˜
, the step [m / = φ
˜
˜
the COPN!3. Thethe new consistent m →˜ markingφ, φ, m P no temporary (0.5)
into third case occurs when
state
0.5 slide 22 P, φ, T , T , ˜ for mm:P, φ, multiset of
Execution
External transition firing: occurs only at the beginning of a step Υ when
CoPN semantics
0.6 slide 22
P is in a22consistent state m (i.e., the marking of P is consistent) and E is empty
˜
0.5 slide
(i.e., i.e. no internal transitions are enabled). After firing an external transition,
the
CoPNs marking of the COPN! (COPN!) is modified, possibly enabling transitions
in Ti . Such transitions become the elements in the priority set E.
places remain marked, we finish the step by turning the current marking m of
markedm (Pt m:
the COPN! into the new consistent {∨, C˜=Cφ})
◦({CU , CL }, state ) U , L
P, φ, T , T , marked (P ) = φ φ, m
m → P, φ, φ,
˜
m
0.5 slide 22
t
P, φ, T , T , m → CP, φ, φ, φ, m
˜
union({CU , L })
(0.5)
(0.5)
◦({CU , CL }, {∨, CU , CL })
ext∨ ({CU , },L{∨, C CU , CL })
◦({C , C C }, {∨, , C })
U
L
U
L
union({CU , CL CL
◦({CU , CL }, {∨, CU ,}) })
Pc = Pc ∪ {U|L}
Pt = Punion({CU , C,LCLr(¬U|L)}
union({CU })
t ∪ {P r(U|L), P })
ext∨ ({CU , CL }, {∨, CU , CL })
Ti = Ti ∪ {act(U|L), deac(U|Ln )}
ext∨({CU ,P L }, {∨, CU , C })
Pc C C ∪ {U|L}
ext∨ ({CU , =L },c{∨, CU , CLL})
ρ(t) if t inTe ∪ Ti
ρ (t) = P = P Pc = Pc ∪ {U|L}
∪ = r(U|L), ∨
Pif t {Pact(U|L)P r(¬U|L)}
t c = Pc ∪ {U|L} t = deac(U|L)
t2
P = P ∪ {P r(U|L), P r(¬U|L)}
t
t
i
Tt T= T {act(U|L),P r(¬U|L)}
Pi =TPt ∪ i{P{act(U|L), deac(U|Ln )}
∪ r(U|L), deac(U|Ln )}
i
Monday 8 July 2013
Ti = Tiρ(t){act(U|L), deac(U|Ln )}
∪ if t inTe ∪ Ti
ρ (t)ρ(t) if t inTe ∪ Ti
ρ (t) = = 2
if t = act(U|L) ∨ t = deac(U|L)
2
= e ∪ Ti
ρ(t) ifift tinTact(U|L) ∨ t = deac(U|L)
ρ =
(t)
2
if t = act(U|L) ∨ t = deac(U|L)
t ∈ Te , m[tm
˜
55
81. Conclusion
2
1
f (p, t, l) =
f (p, t, l)
1
f (t, p, l) =
f (t, p, l)
0.1 slide 14
otherwise
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
otherwise
CoPN model
1
requirement
slide 14
disjunction
implication
0.4 slide 16
0.1
Formalization Formal basis for adaptations
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
and their interactions
C = Pc , Pt , Te , Ti , f, f◦ , ρ, L, m0 , Σ
Pc ∩ Pt = φ
Te ∩ Ti = φ
(Pc ∪ Pt ) ∩ (Te ∪ Ti ) = φ
f : (P × T × L) ∪ (T × P × L) −→ Z∗
f◦ : P × T −→ {0, 1}
0.8 Slide 18
causality
◦ : ℘(S ) × ℘(R) → P
f (t, p, l) =
Context dependency relations
0.2 slide 15
S ⊆ S
slide R
R 0.3⊆ 16
0.8 Slide 18
◦ : ℘(S ) × ℘(R) → P
CoPNs composition
union(S)
ext(S, R)
2
Execution model
for COP systems
◦(S, R) = cons(ext(union(S), R), R)
◦(S, R) = cons(ext(union(S), R), R)
union(S)
2
1
1
Reasoning and analysis
over dynamic adaptations
1
f (p, t, l)
if p = Q ∧ M ∈ •t ∧ M ∈ •t ∧
/
Q ∈ ◦t ∧ l ∈ L
/
if p = P r(¬Q) ∧ M ∈ •t ∧ M ∈ t • ∧
/
Q ∈ ◦t ∧ l ∈ L
/
if p = P r(Q) ∧ M ∈ t • ∧ M ∈ •t ∧ l ∈ L
/
otherwise
Reasoning module
∧
S ⊆ S
R ⊆ R
5
suggestion
ρ : T −→ Z∗
∀ t ∈ Te , ρ(t) = 0
∀ t ∈ Ti , ρ(t) 0
m0 : P × L −→ Z∗
exclusion
conjunction
cons(S, R)
0.4 slide 17
t ∈ E, ∈ T , m[tm
/
External transition firing: toccurs only at the beginning of a step Υ when
(0.2)
PP, E, T , T , m → [m/m ]P, enabledmof P ), T t, t, E, and E˜is empty
is in a consistent state m (i.e., the marking (Ti is consistent) m, m
˜
˜
(i.e., i.e. no internal transitions are enabled). After firing an external transition,
Evaluation of the COPN! (COPN!) is modified, possibly enabling transitions
the marking termination: When there are no more internal transitions to
t cases ∈ possible:
/
0.6be fired22 the set E, three∈ E, the elements in the priority set E.
slide in
in Ti . Such transitions become tare T , m[tm
(0.2) 3
1. The , T m occurs when for m marking multiset of P there are marked
P, E, T first,case → [m/m ]P, enabledm (Ti ), T t, t, E, m, m
˜
˜
t ∈ Te m[tm
˜
temporary places and not all initially, enabled internal transitions have(0.1)
been
2
]P, enabled more internal transitions to
˜
˜
Evaluation termination: → [ ˜ there are no mthe), φ, φ, m of COPN! m
fired. such a P, φ, all changes are rolled back (Ti state of
case all m When
fired. InIn such acase φ, φ,changes m/m rolledback toto the state the the COPN! m
are
besaved before transition firing: If possible: is not empty, firing one of the
fired in the the firing of the first internal transition
Internal set E, three cases are the set E
saved before the firing of the first internal transition t: t:
1.internal transitions with when for m markinga multiset of Pm of the COPN!
The first case occurs highest priority yields new marking there are marked
markedm (P initially T , m[tm π (T transitions have to
temporary placesofand not (Pttbeforet firing ππ(T ), ), 2π2is) saved T a means been
P. The state markedm allt ) ∈ E, m enabled internal T (as
the COPN! ) = φ, ∈ = transition t (T )
= φ, / = 3 3 (T
m
(0.3)
(0.2)
, m T T ˜
˜
state
t,
˜
facilitate P, E, T , T all φ,→ ,[m/m inconsistencies). ),Tthe newE, of m possibly (0.3)
backtracking changesof →enabledm (TtoThe m marking
fired. In such a caseP,φ,in case, m]P,rolled/m]P, φ,φ, ,T ,t,˜ mm,the COPN! m
are [m back i T φ, φ, ˜
P, T , T , m → [m /m]P,
˜
enables some internal occurs when Tforwhich become the
saved before second case transitions internalm marking t: elements P there are
the firing of the first in i , transition multiset of of E.
2. The
Evaluation termination: When there are no more internal transitions to
2. The second the set occurs cases arefor m initially enabled haveof P there are
temporaryfired in case E, three all transitions marking multiset been fired,
be places marked and when possible:
(T
the COPN! is rolledcase occurs = φ,for m marking multiset of T
temporary 1. The markedm (Ptitswhen transitions state 2˜ andPthe firing marked (0.3)
placesfirst back to ) all consistent initially ) there are request is
marked and last m = π3 (T ), π m enabled have been fired,
temporary places and
P,
signaled as rolled φ, , not all →consistent internal m the firing request is
the COPN! isdenied: backTtoT , m initially enabled state, mtransitions have been
its ˜
last [m /m]P, φ, T φ, and
˜ ˜
fired. In such a case all changes are rolled back to the state of the COPN! m
signaled as second case firing of the first )internalπ markingt: multiset of P there are
2. The denied: the occurs when for φ, transition T
saved before
marked (P = m (T )
1
req(A)
Q, CH , CV
A1
act(A)0
req(¬A)
Pr(¬A)
deac(A)1
A0
deac(A)2
1
ext(S, R)
cons(S, R)
Pr(A)
Analysis
deac(B)1 deac(B)2
deac(A)1
1
B0
act(B)0
req(B)
Pr(B)
B1
act(B)1
deac(B)1
1
1
req(¬B)
Pr(¬B)
deac(B)2
B2
C, CC , CV
2
temporary places marked T , T , mtransitionsm]P, φ, φ, enabled have been(0.4)
fired,
P,markedmallt)(P φ, = φ,/ 3 initially φ, T
φ, and (P = [m π ˜(T(T π2 (T T m
˜
markedm → m = π2 ), ⊆ ) ˜
t
(0.3)
the COPN! is rolled backP, φ, T ,lastm)→ [m /m]P, φ,)Tm and the firing request (0.4)
to its T consistent state ˜φ, m
is
, ˜
3. The third case φ, T , when , ˜→ marking multiset m
˜
˜
˜
signaled as denied: P,occurs T , mfor m[m /m]P, φ, φ, φ, of P no temporary
m
t
0.5 slide 17
2. The second case occurs when for m marking multiset of P there m
places remain marked, we finish the step by turning the current markingare of
marked and
3. Thetemporary the occurs when all)transitions(T ) multisethaveP nofired,
third case new consistentt state m:
m marking enabled of been temporary
the COPN! into places markedm (Pfor= φ,˜ π2 initiallyT
the COPN! is rolled
˜
places remain marked, weback ,to its last consistent state m andm firing request is (0.4) of
finish the step by˜turning the the
current marking m
˜
signaled as P, φ, T , T m → [m ) m]P, φ, φ, φ, ˜
denied:
markedm (P / =
the COPN! into the new consistent state tm: φ
˜
(0.5)
P, φ, markedm m = φ, πφ, φ, φ, m
T , T m ) P, 2 (T T
˜
3. The third case occurs when ,for(Pt→ marking) multiset of P no temporary
(0.4)
places remain marked, we finish T , m → (Ptturning φ, φ, m
current marking m of
P, φ, T markedm by ) m]P, φ, the ˜
, the step [m / = φ
˜
˜
the COPN!3. Thethe new consistent m →˜ markingφ, φ, m P no temporary (0.5)
into third case occurs when
state
0.5 slide 22 P, φ, T , T , ˜ for mm:P, φ, multiset of
Execution
External transition firing: occurs only at the beginning of a step Υ when
CoPN semantics
0.6 slide 22
P is in a22consistent state m (i.e., the marking of P is consistent) and E is empty
˜
0.5 slide
(i.e., i.e. no internal transitions are enabled). After firing an external transition,
the
CoPNs marking of the COPN! (COPN!) is modified, possibly enabling transitions
in Ti . Such transitions become the elements in the priority set E.
places remain marked, we finish the step by turning the current marking m of
markedm (Pt m:
the COPN! into the new consistent {∨, C˜=Cφ})
◦({CU , CL }, state ) U , L
P, φ, T , T , marked (P ) = φ φ, m
m → P, φ, φ,
˜
m
0.5 slide 22
t
P, φ, T , T , m → CP, φ, φ, φ, m
˜
union({CU , L })
(0.5)
(0.5)
◦({CU , CL }, {∨, CU , CL })
ext∨ ({CU , },L{∨, C CU , CL })
◦({C , C C }, {∨, , C })
U
L
U
L
union({CU , CL CL
◦({CU , CL }, {∨, CU ,}) })
Pc = Pc ∪ {U|L}
Pt = Punion({CU , C,LCLr(¬U|L)}
union({CU })
t ∪ {P r(U|L), P })
ext∨ ({CU , CL }, {∨, CU , CL })
Ti = Ti ∪ {act(U|L), deac(U|Ln )}
ext∨({CU ,P L }, {∨, CU , C })
Pc C C ∪ {U|L}
ext∨ ({CU , =L },c{∨, CU , CLL})
ρ(t) if t inTe ∪ Ti
ρ (t) = P = P Pc = Pc ∪ {U|L}
∪ = r(U|L), ∨
Pif t {Pact(U|L)P r(¬U|L)}
t c = Pc ∪ {U|L} t = deac(U|L)
t2
P = P ∪ {P r(U|L), P r(¬U|L)}
t
t
i
Tt T= T {act(U|L),P r(¬U|L)}
Pi =TPt ∪ i{P{act(U|L), deac(U|Ln )}
∪ r(U|L), deac(U|Ln )}
i
Monday 8 July 2013
Ti = Tiρ(t){act(U|L), deac(U|Ln )}
∪ if t inTe ∪ Ti
ρ (t)ρ(t) if t inTe ∪ Ti
ρ (t) = = 2
if t = act(U|L) ∨ t = deac(U|L)
2
= e ∪ Ti
ρ(t) ifift tinTact(U|L) ∨ t = deac(U|L)
ρ =
(t)
2
if t = act(U|L) ∨ t = deac(U|L)
t ∈ Te , m[tm
˜
55
82. Conclusion
2
1
f (p, t, l) =
f (p, t, l)
1
f (t, p, l) =
f (t, p, l)
0.1 slide 14
otherwise
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
otherwise
CoPN model
1
requirement
slide 14
disjunction
implication
0.4 slide 16
0.1
Formalization Formal basis for adaptations
if A ∈ t • ∧ A ∈ •t ∧ p = B ∧ l ∈ L
/
and their interactions
C = Pc , Pt , Te , Ti , f, f◦ , ρ, L, m0 , Σ
Pc ∩ Pt = φ
Te ∩ Ti = φ
(Pc ∪ Pt ) ∩ (Te ∪ Ti ) = φ
f : (P × T × L) ∪ (T × P × L) −→ Z∗
f◦ : P × T −→ {0, 1}
0.8 Slide 18
causality
◦ : ℘(S ) × ℘(R) → P
f (t, p, l) =
Context dependency relations
0.2 slide 15
S ⊆ S
slide R
R 0.3⊆ 16
0.8 Slide 18
◦ : ℘(S ) × ℘(R) → P
CoPNs composition
union(S)
ext(S, R)
2
Execution model
for COP systems
◦(S, R) = cons(ext(union(S), R), R)
◦(S, R) = cons(ext(union(S), R), R)
union(S)
2
1
1
Reasoning and analysis
over dynamic adaptations
1
f (p, t, l)
if p = Q ∧ M ∈ •t ∧ M ∈ •t ∧
/
Q ∈ ◦t ∧ l ∈ L
/
if p = P r(¬Q) ∧ M ∈ •t ∧ M ∈ t • ∧
/
Q ∈ ◦t ∧ l ∈ L
/
if p = P r(Q) ∧ M ∈ t • ∧ M ∈ •t ∧ l ∈ L
/
otherwise
Reasoning module
∧
S ⊆ S
R ⊆ R
5
suggestion
ρ : T −→ Z∗
∀ t ∈ Te , ρ(t) = 0
∀ t ∈ Ti , ρ(t) 0
m0 : P × L −→ Z∗
exclusion
conjunction
cons(S, R)
0.4 slide 17
t ∈ E, ∈ T , m[tm
/
External transition firing: toccurs only at the beginning of a step Υ when
(0.2)
PP, E, T , T , m → [m/m ]P, enabledmof P ), T t, t, E, and E˜is empty
is in a consistent state m (i.e., the marking (Ti is consistent) m, m
˜
˜
(i.e., i.e. no internal transitions are enabled). After firing an external transition,
Evaluation of the COPN! (COPN!) is modified, possibly enabling transitions
the marking termination: When there are no more internal transitions to
t cases ∈ possible:
/
0.6be fired22 the set E, three∈ E, the elements in the priority set E.
slide in
in Ti . Such transitions become tare T , m[tm
(0.2) 3
1. The , T m occurs when for m marking multiset of P there are marked
P, E, T first,case → [m/m ]P, enabledm (Ti ), T t, t, E, m, m
˜
˜
t ∈ Te m[tm
˜
temporary places and not all initially, enabled internal transitions have(0.1)
been
2
]P, enabled more internal transitions to
˜
˜
Evaluation termination: → [ ˜ there are no mthe), φ, φ, m of COPN! m
fired. such a P, φ, all changes are rolled back (Ti state of
case all m When
fired. InIn such acase φ, φ,changes m/m rolledback toto the state the the COPN! m
are
besaved before transition firing: If possible: is not empty, firing one of the
fired in the the firing of the first internal transition
Internal set E, three cases are the set E
saved before the firing of the first internal transition t: t:
1.internal transitions with when for m markinga multiset of Pm of the COPN!
The first case occurs highest priority yields new marking there are marked
markedm (P initially T , m[tm π (T transitions have to
temporary placesofand not (Pttbeforet firing ππ(T ), ), 2π2is) saved T a means been
P. The state markedm allt ) ∈ E, m enabled internal T (as
the COPN! ) = φ, ∈ = transition t (T )
= φ, / = 3 3 (T
m
(0.3)
(0.2)
, m T T ˜
˜
state
t,
˜
facilitate P, E, T , T all φ,→ ,[m/m inconsistencies). ),Tthe newE, of m possibly (0.3)
backtracking changesof →enabledm (TtoThe m marking
fired. In such a caseP,φ,in case, m]P,rolled/m]P, φ,φ, ,T ,t,˜ mm,the COPN! m
are [m back i T φ, φ, ˜
P, T , T , m → [m /m]P,
˜
enables some internal occurs when Tforwhich become the
saved before second case transitions internalm marking t: elements P there are
the firing of the first in i , transition multiset of of E.
2. The
Evaluation termination: When there are no more internal transitions to
2. The second the set occurs cases arefor m initially enabled haveof P there are
temporaryfired in case E, three all transitions marking multiset been fired,
be places marked and when possible:
(T
the COPN! is rolledcase occurs = φ,for m marking multiset of T
temporary 1. The markedm (Ptitswhen transitions state 2˜ andPthe firing marked (0.3)
placesfirst back to ) all consistent initially ) there are request is
marked and last m = π3 (T ), π m enabled have been fired,
temporary places and
P,
signaled as rolled φ, , not all →consistent internal m the firing request is
the COPN! isdenied: backTtoT , m initially enabled state, mtransitions have been
its ˜
last [m /m]P, φ, T φ, and
˜ ˜
fired. In such a case all changes are rolled back to the state of the COPN! m
signaled as second case firing of the first )internalπ markingt: multiset of P there are
2. The denied: the occurs when for φ, transition T
saved before
marked (P = m (T )
1
req(A)
Q, CH , CV
A1
act(A)0
req(¬A)
Pr(¬A)
deac(A)1
A0
deac(A)2
1
ext(S, R)
cons(S, R)
Pr(A)
Analysis
deac(B)1 deac(B)2
deac(A)1
1
B0
act(B)0
req(B)
Pr(B)
B1
act(B)1
deac(B)1
1
1
req(¬B)
Pr(¬B)
deac(B)2
B2
C, CC , CV
2
temporary places marked T , T , mtransitionsm]P, φ, φ, enabled have been(0.4)
fired,
P,markedmallt)(P φ, = φ,/ 3 initially φ, T
φ, and (P = [m π ˜(T(T π2 (T T m
˜
markedm → m = π2 ), ⊆ ) ˜
t
(0.3)
the COPN! is rolled backP, φ, T ,lastm)→ [m /m]P, φ,)Tm and the firing request (0.4)
to its T consistent state ˜φ, m
is
, ˜
3. The third case φ, T , when , ˜→ marking multiset m
˜
˜
˜
signaled as denied: P,occurs T , mfor m[m /m]P, φ, φ, φ, of P no temporary
m
t
0.5 slide 17
2. The second case occurs when for m marking multiset of P there m
places remain marked, we finish the step by turning the current markingare of
marked and
3. Thetemporary the occurs when all)transitions(T ) multisethaveP nofired,
third case new consistentt state m:
m marking enabled of been temporary
the COPN! into places markedm (Pfor= φ,˜ π2 initiallyT
the COPN! is rolled
˜
places remain marked, weback ,to its last consistent state m andm firing request is (0.4) of
finish the step by˜turning the the
current marking m
˜
signaled as P, φ, T , T m → [m ) m]P, φ, φ, φ, ˜
denied:
markedm (P / =
the COPN! into the new consistent state tm: φ
˜
(0.5)
P, φ, markedm m = φ, πφ, φ, φ, m
T , T m ) P, 2 (T T
˜
3. The third case occurs when ,for(Pt→ marking) multiset of P no temporary
(0.4)
places remain marked, we finish T , m → (Ptturning φ, φ, m
current marking m of
P, φ, T markedm by ) m]P, φ, the ˜
, the step [m / = φ
˜
˜
the COPN!3. Thethe new consistent m →˜ markingφ, φ, m P no temporary (0.5)
into third case occurs when
state
0.5 slide 22 P, φ, T , T , ˜ for mm:P, φ, multiset of
Execution
External transition firing: occurs only at the beginning of a step Υ when
CoPN semantics
0.6 slide 22
P is in a22consistent state m (i.e., the marking of P is consistent) and E is empty
˜
0.5 slide
(i.e., i.e. no internal transitions are enabled). After firing an external transition,
Simulation of interactions
the
CoPNs marking of the COPN! (COPN!) is modified, possibly enabling transitions
Simulation tool
in Ti . Such transitions become the elements in the priority set E. between contexts
places remain marked, we finish the step by turning the current marking m of
markedm (Pt m:
the COPN! into the new consistent {∨, C˜=Cφ})
◦({CU , CL }, state ) U , L
P, φ, T , T , marked (P ) = φ φ, m
m → P, φ, φ,
˜
m
0.5 slide 22
t
P, φ, T , T , m → CP, φ, φ, φ, m
˜
union({CU , L })
(0.5)
(0.5)
◦({CU , CL }, {∨, CU , CL })
ext∨ ({CU , },L{∨, C CU , CL })
◦({C , C C }, {∨, , C })
U
L
U
L
union({CU , CL CL
◦({CU , CL }, {∨, CU ,}) })
Pc = Pc ∪ {U|L}
Pt = Punion({CU , C,LCLr(¬U|L)}
union({CU })
t ∪ {P r(U|L), P })
ext∨ ({CU , CL }, {∨, CU , CL })
Ti = Ti ∪ {act(U|L), deac(U|Ln )}
ext∨({CU ,P L }, {∨, CU , C })
Pc C C ∪ {U|L}
ext∨ ({CU , =L },c{∨, CU , CLL})
ρ(t) if t inTe ∪ Ti
ρ (t) = P = P Pc = Pc ∪ {U|L}
∪ = r(U|L), ∨
Pif t {Pact(U|L)P r(¬U|L)}
t c = Pc ∪ {U|L} t = deac(U|L)
t2
P = P ∪ {P r(U|L), P r(¬U|L)}
t
t
i
Tt T= T {act(U|L),P r(¬U|L)}
Pi =TPt ∪ i{P{act(U|L), deac(U|Ln )}
∪ r(U|L), deac(U|Ln )}
i
Monday 8 July 2013
Ti = Tiρ(t){act(U|L), deac(U|Ln )}
∪ if t inTe ∪ Ti
ρ (t)ρ(t) if t inTe ∪ Ti
ρ (t) = = 2
if t = act(U|L) ∨ t = deac(U|L)
2
= e ∪ Ti
ρ(t) ifift tinTact(U|L) ∨ t = deac(U|L)
ρ =
(t)
2
if t = act(U|L) ∨ t = deac(U|L)
t ∈ Te , m[tm
˜
55