Diagnosis of Large Software Systems Based on Colored Petri Nets Supervised by Tarek Melliti 2 and Philippe Dague 1 Yingmin Li 1 1 LRI IASI, Univ. Paris-Sud, CNRS/INRIA Saclay, France 2 IBISC, Univ. d Evry Val d Essonne, CNRS, France December 9, 2010 1 / 101
Context: basic Web services Web service: Technology allowing applications to dialogue remotely via Internet independently of the platforms and the languages they rest on. Cheaper and simpler for connection and integration. 2 / 101
Context: composite Web services A travel agency example An orchestrated Web service consists of a travel agency, an airline search engine, and a bank billing system On 09/07/2010, a client, reserved a round trip Paris-Rome, 07/11/2010-07/12/2010 09/07/2010-07/12/2010 Paris-Rome The cheapest flight should be around 200 euros. I have 500 euros in my account 3 / 101
Context: diagnosis problems of Web services A travel agency example Reservation failed because of no enough credit? Client was confused and asked why the tickets were so expensive No enough credit 09/07/2010-07/12/2010 Paris-Rome The cheapest flight should be around 200 euros. I have 500 euros in my account Alarm Fault 4 / 101
An abstract view Large software systems Consist of several components located on different sites Dysfunctions are generated and transformed among the components through data (signals, interface data, etc) A communicating components system Fault Component1 Component2 Observation Completely ordered: O1, O2,..., On Component3 Alarm Partially ordered: O1, O3 O2, O4 Non-ordered: {O1, O2,..., On} On Diagnosis To detect and explain the possible fault(s) 5 / 101
A possible solution: model based diagnosis A communicating components system diagnosis Component1 Partially ordered obs O1, O3 Abstract system model Fault Component2 Diagnoser O2, O4 Partially ordered obs Component3 Alarm Partially ordered obs O5, O6 Diagnosis To detect and explain the possible data, control or event fault(s) might come from other components 6 / 101
A possible solution: model based diagnosis To model the faulty events as unobservable events Component1 Partially ordered obs O1, O3 Abstract system model Fault Component2 Diagnoser O2, O4 Partially ordered obs Component3 Alarm Partially ordered obs O5, O6 Diagnosis To detect and explain the possible data, control or event fault(s) might come from other components 7 / 101
Existing works DES models Discrete event system (DES) models: Petri net (Petri [1973]), automata (Arto and N. [1969]), process algebra (van Glabbeek [1987]), etc. Most of them focus on the state evolution driven by the discrete events Faults are modeled as unobservable events (Sampath et al. [1995]) while faulty data is usually not modeled 8 / 101
Existing works: diagnoser (Sampath et al. [1995, 1996]) Transform the discrete event model of the system to be diagnosed into a finite state automaton which has only observable events; the historical faulty events are recorded in states. Example f1 t2 t1 N t2 t1 f2 f1 N t3 observations: t 2 t 3 Diagnosis={f 2 } t3 f2 system diagnoser 9 / 101
Existing works: PN unfolding (Benveniste et al. [2003]) Fully describes the concurrent behaviors in a single branching structure, represents all the possible computation steps and their mutual dependencies, as well as all reachable states. Example system observations unfolding diagnoser 10 / 101
Existing works: PN backward reasoning (Anglano and Portinale [1994]; Cardoso et al. [1995]; Jiroveanu [2006]; Srinivasan and Jafari [1994]) Starts from the final states which represents a symptom and calculates backwardly according to the backward searching rules to detect all the traces that cover it. Example t 1 system observation diagnosis 11 / 101
Assumptions Targets Locally correct and tested software system with interacting components in a stable network environment, but faulty activities, faulty data and controls (from user, database, interface, etc) that transmitted between the components Symptoms Exception(s) thrown on one or more components during the execution Method: model based diagnosis Component2 Fault Fault O2, O4 Partially ordered obs Component1 Partially ordered obs O1, O3 Component3 Partially ordered obs O5, O6 Alarm? Abstract system model??? 12 / 101
Challenges Existing works focus on state evolution diagnose by trajectories reconstruction We need an abstract model to represent the correct and fault of data and controls in a unique way to represent the correct and fault behaviors of the activities to represent the concurrency and partially ordered observations allows to handle the loops in an elegant way to avoid unfolding the trajectories to diagnose the orchestrated software systems Our choice Colored Petri net 13 / 101
Outline 1 Introduction Context: Web service diagnosis problem Model-based diagnosis for Web services Assumptions 2 Abstract model: CPN CPN definition Partially ordered observation 3 Diagnosis CPN as a fault model Diagnosis algorithm 4 Application Architecture of BPEL Monitoring and Diagnosis Decentralized diagnosis architecture Example: travel agency diagnosis problem 5 Conclusions & perspectives Contributions Perspectives 14 / 101
CPN has same structure as PN Example p 1 2 t 3 p 2 Definition (Petri net) N= P, T, Pre, Post P: a set of labeled places T : a set of labeled transitions Pre : P T N, a backward matrix of consumed token number Post : P T N, a forward matrix of produced token number Example (Incidence matrix C=Post-Pre) C t p 1-2 p 2 3 = Post t p 1 p 2 3 - Pre t p 1 2 p 2 Example (State equation) M = M 0 + C T p 1 1 3-2 p 2 4 1 3 1 15 / 101
CPN has same structure as PN Example p 1 2 t 3 p 2 Definition (Petri net) N= P, T, Pre, Post P: a set of labeled places T : a set of labeled transitions Pre : P T N, a backward matrix of consumed token number Post : P T N, a forward matrix of produced token number Example (Incidence matrix C=Post-Pre) C t p 1-2 p 2 3 = Post t p 1 p 2 3 - Pre t p 1 2 p 2 Example (State equation) M = M 0 + C T p 1 1 3-2 p 2 4 1 3 1 16 / 101
CPN has same structure as PN Example p 1 2 3 t p 2 Definition (Petri net) N= P, T, Pre, Post P: a set of labeled places T : a set of labeled transitions Pre : P T N, a backward matrix of consumed token number Post : P T N, a forward matrix of produced token number Example (Incidence matrix C=Post-Pre) C t p 1-2 p 2 3 = Post t p 1 p 2 3 - Pre t p 1 2 p 2 Example (State equation) M = M 0 + C T p 1 1 3-2 p 2 4 1 3 1 17 / 101
CPN definition: Structure & dynamic (Li et al. [2009a]) Example p 1 : Π 1 F : Γ 1 Ψ(Π 1 ) t : Γ 1 F : Γ 1 Ψ(Π 2 ) p 2 : Π 2 PN to CPN Places are typed (p 1 : Π 1 ) Transition are typed (t : Γ 1 ) Markings are multi-sets of place types (m(p 1 ) = n i e i, n i 0, e i Π 1 ) i Π 1 Weights of an edges are multi-set expressions (Pre(p 1, t) : Γ 1 Ψ(Π 1 )) 18 / 101
CPN definition: Structure & dynamic (Li et al. [2009a]) Example p 1 : Π 1 F : Γ 1 Ψ(Π 1 ) t : Γ 1 F : Γ 1 Ψ(Π 2 ) p 2 : Π 2 PN to CPN Places are typed (p 1 : Π 1 ) Transition are typed (t : Γ 1 ) Markings are multi-sets of place types (m(p 1 ) = n i e i, n i 0, e i Π 1 ) i Π 1 Weights of an edges are multi-set expressions (Pre(p 1, t) : Γ 1 Ψ(Π 1 )) Example (Binding β) β 1m1 : {x = a} or β 2m1 : {x = b} 1 a+ 2 b p 1 : Π 1 = {a, b} Pre(t, p 1 ) = {(m 1 : 1 b + 1 x),(m 2 : 1 a)} t : Γ 1 = {m 1, m 2 } Post(t, p 2 ) = {(m 1 : 2 x), (m 2 : 2 c)} Mode firing rule: M[t m β M M = M + C(., t)(m 1 ) β with β : x = a Marking: M is reachable from M under β and m can be extended to sequence firing 1 c p 2 : Π 2 = {a, b, c} 19 / 101
CPN definition: Structure & dynamic (Li et al. [2009a]) Example p 1 : Π 1 F : Γ 1 Ψ(Π 1 ) t : Γ 1 F : Γ 1 Ψ(Π 2 ) p 2 : Π 2 PN to CPN Places are typed (p 1 : Π 1 ) Transition are typed (t : Γ 1 ) Markings are multi-sets of place types (m(p 1 ) = n i e i, n i 0, e i Π 1 ) i Π 1 Weights of an edges are multi-set expressions (Pre(p 1, t) : Γ 1 Ψ(Π 1 )) Example (Binding β) β 1m1 : {x = a} or β 2m1 : {x = b} 1 b p 1 : Π 1 = {a, b} Pre(t, p 1 ) = {(m 1 : 1 b + 1 x),(m 2 : 1 a)} t : Γ 1 = {m 1, m 2 } Post(t, p 2 ) = {(m 1 : 2 x), (m 2 : 2 c)} Mode firing rule: M[t m β M M = M + C(., t)(m 1 ) β with β : x = a Marking: M is reachable from M under β and m can be extended to sequence firing 1 c p 2 : Π 2 = {a, b, c} 20 / 101
CPN definition: Structure & dynamic (Li et al. [2009a]) Example p 1 : Π 1 F : Γ 1 Ψ(Π 1 ) t : Γ 1 F : Γ 1 Ψ(Π 2 ) p 2 : Π 2 PN to CPN Places are typed (p 1 : Π 1 ) Transition are typed (t : Γ 1 ) Markings are multi-sets of place types (m(p 1 ) = n i e i, n i 0, e i Π 1 ) i Π 1 Weights of an edges are multi-set expressions (Pre(p 1, t) : Γ 1 Ψ(Π 1 )) Example (Binding β) β 1m1 : {x = a} or β 2m1 : {x = b} 1 b p 1 : Π 1 = {a, b} Pre(t, p 1 ) = {(m 1 : 1 b + 1 x),(m 2 : 1 a)} t : Γ 1 = {m 1, m 2 } Post(t, p 2 ) = {(m 1 : 2 x), (m 2 : 2 c)} Mode firing rule: M[t m β M M = M + C(., t)(m 1 ) β with β : x = a Marking: M is reachable from M under β and m can be extended to sequence firing 1 c + 2 a p 2 : Π 2 = {a, b, c} 21 / 101
CPN definition: Dynamic Definition (Characteristic Vector) Sequence of modes: δ Mod Characteristic vector of δ: δ : Mod N Transition characteristic vector δ T : T N Example δ = t 1.m 1 t 2.m 3 t 1.m 2 t 1.m 1 t 1.m 2 δ (m1 ) = 2 δ T (t 1 ) = 4 State equation Given S= N, M a CPN-S and modes sequence, δ Mod with M[δ then the reached marking M after the firing of δ is : M = M + C δ 22 / 101
CPN definition: example (1/2) Dining philosophers (of size four) No blocking version (taking both forks concurrently) Forks are identified by the serial number 1-4 One of them (num 4) is well-organized: to take the forks, and before eat, he/she checks the id of the forks Three of them (num 1, 2 and 3) are Unorganized: don t verify the forks id and might exchange forks in hands before restore them. 23 / 101
CPN definition: example (2/2) Notations p i : the forks on the table t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i p ji : the fork in the left hand of philosopher i Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 χ p11 χ p21 Normal:χp 14 p 14 χp χ 1 p14 r 4 t 4 χ p44 χp 4 p 11 p 21 χp 1 χp t 2 1 χ p1 χ p2 p 1 1 p 2 2 χ p1 χ p2 χ p4 χ p3 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 t 2 r 2 χp 3 χ p32 p 44 p 4 4 χ p4 χ p3 p 3 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 24 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 25 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χ p14 1 χp 1 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 4 p 4 χ p4 χ p3 p 3 p 32 3 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 26 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 27 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 1 p 2 3 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 4 χ p4 χ p3 p 3 2 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 28 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 29 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 1 3 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 4 2 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 30 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 31 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 3 p 2 1 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 2 χ p4 χ p3 p 3 4 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 32 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 33 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 3 1 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 2 4 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 34 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 35 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 3 p 2 1 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 4 χ p4 χ p3 p 3 2 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 36 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χp χ 1 p14 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 p 4 χ p4 χ p3 p 3 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 37 / 101
CPN definition: example (2/2) Notations Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 p i : the forks on the table χ p11 χ p21 p 11 p 21 t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i Normal:χp 14 p 14 χ p14 3 χp 1 χp 1 χp t 2 1 χ p1 χ p2 p 1 p 2 χ p1 χ p2 Normal:χp 22 Exchange:χp 32 p 22 χp 2 1 χ p22 p ji : the fork in the left hand of philosopher i r 4 χ p44 t 4 χp 4 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 4 p 4 χ p4 χ p3 p 3 p 32 2 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 38 / 101
CPN definition: example (2/2) Notations p i : the forks on the table t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i p ji : the fork in the left hand of philosopher i p 14 χ p14 r 4 χ p44 Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 χ p11 χ p21 3 p 11 p 21 χp 1 χp t 2 1 Normal:χp Normal:χp 22 14 Exchange:χp 32 χ p1 χ p2 p 1 p 2 χ p1 χ p2 χp 1 t 4 χp 4 p 22 χp 2 1 χ p22 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 4 p 4 χ p4 χ p3 p 3 p 32 2 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 39 / 101
CPN definition: example (2/2) Notations p i : the forks on the table t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i p ji : the fork in the left hand of philosopher i p 14 χ p14 r 4 χ p44 Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 χ p11 χ p21 3 p 11 p 21 χp 1 χp t 2 Normal:χp 14 1 χ p1 χ p2 p 1 p 2 2 χ p1 χ p2 χp 1 t 4 χp 4 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 t 2 r 2 χp 3 χ p32 χ p4 χ p3 p 44 4 p 4 χ p4 χ p3 p 3 1 p 32 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 p 43 p 33 χ p43 χ p33 Normal:χp 43 Exchange:χp 33 r 3 Normal:χp33 Exchange:χp 43 40 / 101
CPN definition: example (2/2) Notations p i : the forks on the table t i and r i : philosopher i takes and released the fork p ii : the fork in the right hand of philosopher i p ji : the fork in the left hand of philosopher i p 14 χ p14 r 4 χ p44 Normal:χp 11 Normal:χp r 21 Exchange:χp 1 21 Exchange:χp 11 χ p11 χ p21 3 p 11 p 21 χp 1 χp t 2 Normal:χp 14 1 χ p1 χ p2 p 1 p 2 2 χ p1 χ p2 χp 1 t 4 χp 4 Normal:χp 22 Exchange:χp 32 p 22 χp 2 χ p22 t 2 r 2 χp 3 χ p32 χ p4 χ p3 Observations p 44 4 p 4 χ p4 χ p3 p 3 1 p 32 each philosopher ate twice except philosopher 4 Normal:χp 44 χp 4 t 3 χp 3 Normal:χp 32 Exchange:χp 22 t i is fired before r i p 43 p 33 some activities were partially ordered Normal:χp 43 Exchange:χp 33 χ p43 r 3 χ p33 Normal:χp33 Exchange:χp 43 41 / 101
Partially ordered observation Definition (Partially ordered observation (T, )) T = {t k i 1 k T (t i ) }: repeated occurred transitions (S(T) S(T)): partially ordered relation 42 / 101
Partially ordered observation Definition (Partially ordered observation (T, )) T = {t k i 1 k T (t i ) }: repeated occurred transitions (S(T) S(T)): partially ordered relation Example (less specific ) i = {(t (k), r (k) ),(r (k), t (k+1) )} i i i i 1 is less specific than 1 2 43 / 101
Partially ordered observation Definition (Partially ordered observation (T, )) T = {t k i 1 k T (t i ) }: repeated occurred transitions (S(T) S(T)): partially ordered relation Example (less specific ) i = {(t (k), r (k) ),(r (k), t (k+1) )} i i i i 1 is less specific than 1 2 Definition (Minimal partially ordered relation MT M min ) t 1 : 2 r 1 : 2 t 2 : 2 S(T) = {t (1) 1, t(2) 1, r(1) 1, r(2) 1 r T = 2 : 2...,t t 3 (1) 4, r(1) 4 } : 2 i = {(t (k), r (k) ), i i r 3 : 2 (r (k), t (k+1) )} t 4 : 2 i i r 4 : 1 (t i, t j ) MT M min, iff δ, M[δ > M δ T = T δ t i t j M M 44 / 101
Adapt the CPN as a fault model An abstract fault model Define data correctness status {b, r, } Map all the transition modes into diagnostic transition modes {OK, KO} Abstract transition functionalities as data dependency functions {FW, SRC, EL} 45 / 101
Data dependencies in transition modes p 1 : Π 1 p 1 : Ψ D = status = {b, r, } F : Γ 1 Ψ(Π 1 ) χp : status t : Γ 1 Fault : Γ 1 {OK, KO} F : Γ 1 Ψ(Π 2 ) χp Π 1 Π 2,χ p Π 2,Π 1 Π 1 c, c status, C status, p 2 : Π 2 p 2 : status 46 / 101
Data dependencies in transition modes p 1 : Π 1 p 1 : Ψ D = status = {b, r, } F : Γ 1 Ψ(Π 1 ) χp : status t : Γ 1 Fault : Γ 1 {OK, KO} F : Γ 1 Ψ(Π 2 ) χp Π 1 Π 2,χ p Π 2,Π 1 Π 1 c, c status, C status, FW:status status, FW c (c) = c D = FW:Π 1 Π 2 Ψ(Π 2 ), FW(χp) = χp SRC: Ψ(Π 2 ), SRC = χp EL:(Π 1 Π 2 ) n Ψ(Π 2 ), EL(Π 1 ) = χ p D c = SRC: status, SRC c = EL :status n status, EL c (C) = c, with c = b, iff c C, c = b r, iff c C, c = r, iff c C, c = c C, c = r p 2 : Π 2 p 2 : status 47 / 101
Data dependencies in transition modes p 1 : Π 1 p 1 : Ψ D = status = {b, r, } F : Γ 1 Ψ(Π 1 ) χp : status t : Γ 1 Fault : Γ 1 {OK, KO} F : Γ 1 Ψ(Π 2 ) χp Π 1 Π 2,χ p Π 2,Π 1 Π 1 c, c status, C status, FW:status status, FW c (c) = c D = FW:Π 1 Π 2 Ψ(Π 2 ), FW(χp) = χp SRC: Ψ(Π 2 ), SRC = χp EL:(Π 1 Π 2 ) n Ψ(Π 2 ), EL(Π 1 ) = χ p D c = SRC: status, SRC c = EL :status n status, EL c (C) = c, with c = b, iff c C, c = b r, iff c C, c = r, iff c C, c = c C, c = r p 2 : Π 2 p 2 : status Diagnosis properties of data dependency (Ardissono et al. [2005]) EL m t c i t c j t c t m t c i t c j t c t OK b b b KO b b r OK r b r KO r b OK b KO b OK KO OK r r KO r FW m t c t c t OK/KO b b OK/KO r r OK/KO SRC m t c t OK b KO r 48 / 101
CPN for diagnosis: fault model Fault model: F : γ Γγ {OK, KO} F(Normal) = OK, F(Exchange) = KO Example (philosopher 1) normal:χp 11 normal:χp 21 r1 exchange:χp 21 exchange:χp 11 OK:FW(χp 11 ) KO:r r1 OK:FW(χp 21 ) KO:r χp11 χp21 χp11 χp21 p11 χp 1 χp 2 t1 p21 = p11 p21 FW(χp 1 ) FW(χp 2 ) t1 p1 1 χp1 χp2 4 p2 p1 χp1 χp2 p2 49 / 101
CPN for diagnosis: fault model Fault model: F : γ Γγ {OK, KO} F(Normal) = OK, F(Exchange) = KO Example (philosopher 1) normal:χp 11 exchange:r r1 normal:χp 21 exchange:r OK:FW(χp 11 ) KO:r r1 OK:FW(χp 21 ) KO:r χp11 χp21 χp11 χp21 p11 χp 1 χp 2 t1 p21 = p11 FW(χp 1 ) t1 FW(χp 2 ) p21 p1 χp1 χp2 p2 p1 χp1 χp2 p2 50 / 101
CPN for diagnosis: fault model Fault model: F : γ Γγ {OK, KO} F(Normal) = OK, F(Exchange) = KO Example (philosopher 1) normal:χp 11 normal:χp 21 r1 exchange:χp 21 exchange:χp 11 OK:FW(χp 11 ) KO:r r1 OK:FW(χp 21 ) KO:r χp11 χp21 χp11 χp21 p11 1 χp 1 χp 2 t1 4 p21 = p11 p21 FW(χp 1 ) t1 FW(χp 2 ) p1 χp1 χp2 p2 p1 χp1 χp2 p2 51 / 101
CPN for diagnosis: fault model Fault model: F : γ Γγ {OK, KO} F(Normal) = OK, F(Exchange) = KO Example (philosopher 1) normal:χp 11 normal:χp 21 r1 exchange:χp 21 exchange:χp 11 OK:FW(χp 11 ) KO:r r1 OK:FW(χp 21 ) KO:r χp11 χp21 χp11 χp21 p11 χp 1 χp 2 t1 p21 = p11 FW(χp 1 ) t1 FW(χp 2 ) p21 p1 χp1 χp2 p2 p1 χp1 χp2 p2 52 / 101
CPN for diagnosis: fault model Fault model: F : γ Γγ {OK, KO} F(Normal) = OK, F(Exchange) = KO Example (philosopher 1) normal:χp 11 normal:χp 21 r1 exchange:χp 21 exchange:χp 11 OK:FW(χp 11 ) KO:r r1 OK:FW(χp 21 ) KO:r χp11 χp21 χp11 χp21 p11 χp 1 χp 2 t1 p21 = p11 FW(χp 1 ) t1 FW(χp 2 ) p21 p1 4 χp1 χp2 1 p2 p1 χp1 χp2 p2 53 / 101
Diagnosis problem: D= M 0,(S(T ), ), ˆM (Li et al. [2009a]) Initial marking M 0 p 1 p 2 p 3 p 4 p 11 p 21 p 22 p 32 p 33 p 43 p 44 p 14,,,, 0, 0, 0, 0, 0, 0, 0, 0 Symptom ˆM p 1 p 2 p 3 p 4 p 11 p 21 p 22 p 32 p 33 p 43 p 44 p 14 0,,, 0, 0, 0, 0, 0, 0, 0, b, r (S(T ), ) t (1) 1 r (1) 1 t (2) 1 r (2) 1, t (1) 2 r (1) 2 t (2) 2 r (2) 2, t (1) 3 r (1) 3 t (2) 3 r (2) 3, t (1) r (1) t (2) 4 4 4 54 / 101
Diagnosis problem: D= M 0,(S(T ), ), ˆM (Li et al. [2009a]) Initial marking M 0 p 1 p 2 p 3 p 4 p 11 p 21 p 22 p 32 p 33 p 43 p 44 p 14,,,, 0, 0, 0, 0, 0, 0, 0, 0 Symptom ˆM p 1 p 2 p 3 p 4 p 11 p 21 p 22 p 32 p 33 p 43 p 44 p 14 0,,, 0, 0, 0, 0, 0, 0, 0, b, r A solution for a CPN diagnosis problem (S(T ), ) t (1) 1 r (1) 1 t (2) 1 r (2) 1, t (1) 2 r (1) 2 t (2) 2 r (2) 2, t (1) 3 r (1) 3 t (2) 3 r (2) 3, t (1) r (1) t (2) 4 4 4 δ T t 1 :2 r 1 :2 t 2 :2 r 2 :2 t 3 :2 r 3 :2 t 4 :2 r 4 :1 δ t 1 : 2 r 1.OK :n 1 r 1.KO : n 2 t 2 : 2 r 2.OK :n 3 r 2.KO : n 4 t 3 : 2 r 3.OK :n 5 r 3.KO : n 6 t 4 : 2 r 4 : 1 55 / 101
Diagnosis problem: D= M 0,(S(T ), ), ˆM (Li et al. [2009a]) Initial marking M 0 p 1 p 2 p 3 p 4 p 11 p 21 p 22 p 32 p 33 p 43 p 44 p 14,,,, 0, 0, 0, 0, 0, 0, 0, 0 Symptom ˆM p 1 p 2 p 3 p 4 p 11 p 21 p 22 p 32 p 33 p 43 p 44 p 14 0,,, 0, 0, 0, 0, 0, 0, 0, b, r A solution for a CPN diagnosis problem (S(T ), ) t (1) 1 r (1) 1 t (2) 1 r (2) 1, t (1) 2 r (1) 2 t (2) 2 r (2) 2, t (1) 3 r (1) 3 t (2) 3 r (2) 3, t (1) r (1) t (2) 4 4 4 δ T t 1 :2 r 1 :2 t 2 :2 r 2 :2 t 3 :2 r 3 :2 t 4 :2 r 4 :1 δ t 1 : 2 r 1.OK :n 1 r 1.KO : n 2 t 2 : 2 r 2.OK :n 3 r 2.KO : n 4 t 3 : 2 r 3.OK :n 5 r 3.KO : n 6 t 4 : 2 r 4 : 1 Covering relation: b, r ˆM = M 0 + C δ = ˆM X M0 + C X δ 56 / 101
p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 57 / 101 Inequations system ˆM 0 0 0 0 0 0 0 0 b r M 0 0 0 0 0 0 0 0 0 + r C t 1 t 2 t 3 t 1 r 2 r 3 4 OK KO OK KO OK KO r 4 p 1 χp 1 χp 1 FW(χp ) 11 r FW(χp ) 13 p 2 χp 2 χp 2 FW(χp ) 21 r FW(χp ) 22 r FW(χp ) 33 p 3 χp 3 χp 3 FW(χp 32 ) r FW(χp 33 ) r p 4 χp 4 χp 4 FW(χp 43 ) r FW(χp 44 ) p 11 FW(χp ) 1 χp 11 χp 11 p 21 FW(χp ) 2 χp 21 χp 21 p 22 FW(χp ) 2 χp 22 χp 22 p 32 FW(χp ) 3 χp 32 χp 32 p 33 FW(χp ) 3 χp 33 χp 33 p 43 FW(χp ) 4 χp 43 χp 43 p 44 FW(χp ) 4 χp 44 p 14 FW(χp ) 1 χp 14 t 1 : 2 r 1.OK :n 1 r 1.KO :n 2 t 2 : 2 r 2.OK :n 3 r 2.KO :n 4 t 3 : 2 r 3.OK :n 5 r 3.KO :n 6 t 4 : 2 r 4 : 1 n 1 + n 2 =2 n 3 + n 4 =2 n 5 + n 6 =2 Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 : 0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 : 0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 : 0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 : 0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp ) n 4 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp ) 1 4 χp 44
Inequations system 58 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp ) 1 4 χp 44 p 14 : r 0 + 2 FW(χp ) 1 1 χp 14 59 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b 60 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b p 4 = b 61 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b p 4 = b p 43 = b n 6 = 0 62 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b p 4 = b p 43 = b n 6 = 0 63 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b Example (χp 14 = r) p 14 = r p 4 = b p 43 = b n 6 = 0 64 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b Example (χp 14 = r) p 14 = r p 4 = b p 1 = r p 43 = b n 6 = 0 65 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b Example (χp 14 = r) p 14 = r p 4 = b p 1 = r p 43 = b n 6 = 0 p11 = r n 2 > 0 66 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b Example (χp 14 = r) p 14 = r p 4 = b p 1 = r p 43 = b n 6 = 0 p11 = r n 2 > 0 67 / 101
Diagnosis algorithm: single fault Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate results Example (Inequations system) n 1 + n 2 = 2 n 3 + n 4 = 2 n 5 + n 6 = 1 p 1 : 0 2 χp 2 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 1 FW(χp ) 14 p 2 : 2 χp 2 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 2 χp 2 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 2 χp 2 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 1 FW(χp ) 44 p 11 : 0 0 + 2 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 2 FW(χp ) n 2 1 χp 21 n 2 χp 21 p 22 :0 0 + 2 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 2 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 2 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 2 FW(χp 4 ) n 5 χp 43 n 6 χp 43 p 44 : b 0 + 2 FW(χp 4 ) 1 χp 44 p 14 : r 0 + 2 FW(χp 1 ) 1 χp 14 Example (χp 44 = b as a constraint) p 44 = b Example (χp 14 = r) p 14 = r p 4 = b p 1 = r Example (Diagnosis) D 1 = {{p 1 },{r 1.KO}} p 43 = b n 6 = 0 p11 = r n 2 > 0 68 / 101
Advantages: cyclic observations handling Sketch 1 to propagate with b tokens 2 to propagate with r tokens 3 to integrate result Example (Inequations system) n 1 + n 2 = 1000 n 3 + n 4 = 1000 n 5 + n 6 = 999 p 1 : 0 1000 χp 1000 1 χp + n 1 1 FW(χp 11 ) + n 2 r + 999 FW(χp ) 14 p 2 : 1000 χp 1000 2 χp + n 2 1 FW(χp 21 ) + n 2 r + n 3 FW(χp 22 ) + n 4 r p 3 : 1000 χp 1000 3 χp + n 3 3 FW(χp 32 ) + n 4 r + n 5 FW(χp 33 ) + n 6 r p 4 : 0 1000 χp 1000 4 χp + n 4 5 FW(χp 43 ) + n 6 r + 999 FW(χp ) 44 p 11 : 0 0 + 1000 FW(χp ) n 1 1 χp 11 n 2 χp 11 p 21 :0 0 + 1000 FW(χp ) n 2 1 χp 21 n 1 χp 21 p 22 :0 0 + 1000 FW(χp ) n 2 3 χp 22 n 4 χp 22 p 32 :0 0 + 1000 FW(χp ) n 3 3 χp 32 n 4 χp 32 p 33 :0 0 + 1000 FW(χp ) n 3 5 χp 33 n 6 χp 33 p 43 : 0 0 + 1000 FW(χp ) n 4 5 χp 43 n 6 χp 43 p 44 : b 0 + 1000 FW(χp 4 ) 999 χp 44 p 14 : r 0 + 1000 FW(χp 1 ) 999 χp 14 Example (χp 44 = b as a constraint) p 44 = b Example (χp 14 = r) p 14 = r p 4 = b p 1 = r Example (Diagnosis) D 1 = {{p 1 },{r 1.KO}} p 43 = b n 6 = 0 p11 = r n 2 > 0 69 / 101
Multi faults diagnosis (Li et al. [2009a]) Cartesian-union operator is an operator that calculates the Cartesian product and then keeps the minimal subsets. 70 / 101
Multi faults diagnosis (Li et al. [2009a]) Cartesian-union operator is an operator that calculates the Cartesian product and then keeps the minimal subsets. Example D 1 ={{p 1 },{r 1.KO}} Suppose the 4th philosopher finds faulty cutlery on both sides: a new symptom on p 44 : χ p44 = r D 2 = {{p 4 },{r 3.KO}} D=D 1 D2 ={{p 1, p 4 },{p 1, r 3.KO},{r 1.KO, p 4 },{r 1.KO, r 3.KO}} 71 / 101
Opposite example for minimal diagnosis CPN model t 1 t 2 χp 1 χp 1 FW(χp 1 ) p 2 p 1 χp 1 χp 2 t 3 p 3 OK : FW(χp 1 ) KO:r EL(χp 1,χp 2 ) 72 / 101
Opposite example for minimal diagnosis Example (S(T ), )) S(T ) = {t 1, t 2, t 2 } t 1 t 3, t 2 t 3 CPN model t 1 t 2 χp 1 χp 1 FW(χp 1 ) p 2 p 1 χp 1 χp 2 t 3 p 3 OK : FW(χp 1 ) KO:r EL(χp 1,χp 2 ) 73 / 101
Opposite example for minimal diagnosis Example (S(T ), )) S(T ) = {t 1, t 2, t 2 } t 1 t 3, t 2 t 3 CPN model Example ( δ T ) t 1 t 2 χp 1 χp 1 FW(χp 1 ) OK : FW(χp 1 ) KO:r p 2 p 1 χp 1 χp 2 t 1 t 2 t 3 1 1 1 t 3 EL(χp 1,χp 2 ) p 3 74 / 101
Opposite example for minimal diagnosis Example (S(T ), )) S(T ) = {t 1, t 2, t 2 } t 1 t 3, t 2 t 3 CPN model t 1 t 2 χp 1 χp 1 FW(χp 1 ) p 2 p 1 χp 1 χp 2 t 3 p 3 OK : FW(χp 1 ) KO:r EL(χp 1,χp 2 ) Example ( δ T ) t 1 t 2 t 3 1 1 1 Example (Two possible observation traces) 1 t 1 t 2 t 3 : t 2.KO can transmit the fault by r token 2 t 2 t 1 t 3 : the effect of t 2.KO is overwriten by t 1 75 / 101
Opposite example for minimal diagnosis Example (S(T ), )) S(T ) = {t 1, t 2, t 2 } t 1 t 3, t 2 t 3 CPN model t 1 t 2 χp 1 χp 1 FW(χp 1 ) p 2 p 1 χp 1 χp 2 t 3 p 3 OK : FW(χp 1 ) KO:r EL(χp 1,χp 2 ) Example ( δ T ) t 1 t 2 t 3 1 1 1 Example (Two possible observation traces) 1 t 1 t 2 t 3 : t 2.KO can transmit the fault by r token 2 t 2 t 1 t 3 : the effect of t 2.KO is overwriten by t 1 Diagnosis D D = {{p 2 },{t 2.KO}} is only minimal only for trace 1 76 / 101
Diagnosis minimality vs. precision 77 / 101
Architecture of BPEL Monitoring and Diagnosis (WSDIAMOND) 78 / 101
Centralized diagnosis solution 79 / 101
Decentralized diagnosis architecture (Li et al. [2009b]) 80 / 101
Decentralized coordination protocol (Zaitsev [2005]) Result of D i Trigger D i Alarm in BPELi D j provides C with result No D jfor further request Terminate Exists D jfor further request D selected j Trigger D j Diagnoses updated D provides j C with result Result of D j 81 / 101
Decentralized coordination protocol (Zaitsev [2005]) Result of D i Trigger D i Alarm in BPELi D j provides C with result No D jfor further request Terminate Exists D jfor further request D selected j Trigger D j Diagnoses updated D provides j C with result Result of D j Equivalence of global and decentralized diagnosis (theorem 2) Diag= Diag j : the solution of the global inequations system is the union C C l j l Diag l of the solutions of the local inequations systems if they are solved according to the affecting order of the bordered places. 82 / 101
Diagnosis problem BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 Rep1 8 Pick1 Inv4 12 15 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 Pick2 OM3 OM4 Switch 17 ("Cancel") ("No credit") OM1 OM2 19 18 Inv8 Inv6 16 Inv5 Inv7 DB2 BWS2 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Client sent the departure/arrive dates and cities, client info and reservation condition 83 / 101
Diagnosis problem BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 Rep1 8 Pick1 Inv4 12 15 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 Pick2 OM3 OM4 Switch 17 ("Cancel") ("No credit") OM1 OM2 19 18 Inv8 Inv6 16 Inv5 Inv7 DB2 BWS2 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Travel agency (C) requested the airline company (A) to search for the flights and reserved the most satisfying one 84 / 101
Diagnosis problem BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 Rep1 8 Pick1 Inv4 12 15 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 Pick2 OM3 OM4 Switch 17 ("Cancel") ("No credit") OM1 OM2 19 18 Inv8 Inv6 16 Inv5 Inv7 DB2 BWS2 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Travel agency (C) requested the payment with bank (B) account 85 / 101
Diagnosis problem BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 Rep1 8 Pick1 Inv4 12 15 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 Pick2 OM3 OM4 Switch 17 ("Cancel") ("No credit") OM1 OM2 19 18 Inv8 Inv6 16 Inv5 Inv7 DB2 BWS2 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Bank (B) returned "no credit" fault 86 / 101
Diagnosis problem BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 Rep1 8 Pick1 Inv4 12 15 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 Pick2 OM3 OM4 Switch 17 ("Cancel") ("No credit") OM1 OM2 19 18 Inv8 Inv6 16 Inv5 Inv7 DB2 BWS2 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Travel agency (C) canceled the reservation 87 / 101
Diagnosis problem BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 Rep1 8 Pick1 Inv4 12 15 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 Pick2 OM3 OM4 Switch 17 ("Cancel") ("No credit") OM1 OM2 19 18 Inv8 Inv6 16 Inv5 Inv7 DB2 BWS2 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Travel agency (C) return a "no credit" fault to client 88 / 101
Diagnosis coordination BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 Rep1 8 Pick1 Inv4 12 15 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 Pick2 OM3 OM4 Switch 17 ("Cancel") ("No credit") OM1 OM2 19 18 Inv8 Inv6 16 Inv5 Inv7 DB2 BWS2 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Mapping: customer:25->c:24, C:17->B:16, B:15->BWS3:14, BWS3:13->B:12, B:11->C:10, C:9->A:8, A:7->BWS1:6, BWS1:5->A:4, A:3->C:2, C:1->customer:0 89 / 101
Diagnosis coordination BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 Rep1 8 Pick1 Inv4 12 15 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 BWS2 Pick2 OM3 OM4 ("Cancel") ("No credit") OM1 OM2 19 18 24->17 Inv8 Inv6 16 Inv5 21 22 20 Inv9 23 17 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Switch Inv7 DB2 Mapping: customer:25->c:24, C:17->B:16, B:15->BWS3:14, BWS3:13->B:12, B:11->C:10, C:9->A:8, A:7->BWS1:6, BWS1:5->A:4, A:3->C:2, C:1->customer:0 90 / 101
Diagnosis coordination BWS1 5 6 Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) Rec2 3 2 Inv1 9 (P,ID,cient) B 4 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 16->15 Rep1 8 Pick1 15->BSW3 12 Inv4 15 15->13 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 BWS2 Pick2 OM3 OM4 17 12->11 ("Cancel") ("No credit") OM1 OM2 19 18 24->17 Inv8 Inv6 16 Inv5 Inv7 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Switch 15->12 DB2 Mapping: customer:25->c:24, C:17->B:16, B:15->BWS3:14, BWS3:13->B:12, B:11->C:10, C:9->A:8, A:7->BWS1:6, BWS1:5->A:4, A:3->C:2, C:1->customer:0 91 / 101
Diagnosis coordination BWS1 5 6 C (d1,d2,m1,m2,c1,c2,client,con) Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) 3 2 8->7Rec2 Inv1 9 B 7->BSW1 (P,ID,cient) 4 10->9 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 16->15 7->5 4->3Rep1 8 Pick1 15->BSW3 12 Inv4 15 15->13 13 14 BWS3 DB1 BWS2 Pick2 OM3 OM4 17 12->11 ("Cancel") ("No credit") OM1 OM2 19 18 24->17 Inv8 Inv6 16 Inv5 Inv7 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Switch 15->12 DB2 Mapping: customer:25->c:24, C:17->B:16, B:15->BWS3:14, BWS3:13->B:12, B:11->C:10, C:9->A:8, A:7->BWS1:6, BWS1:5->A:4, A:3->C:2, C:1->customer:0 92 / 101
Diagnosis coordination BWS1 5 6 C (d1,d2,m1,m2,c1,c2,client,con) Rec1 1 0 A (d1,d2,m1,m2,c1,c2,con) 3 2 8->7Rec2 Inv1 9 B 7->BSW1 (P,ID,cient) 4 10->9 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 16->15 7->5 4->3Rep1 8 Pick1 15->BSW3 12 Inv4 15 15->13 13 14 BWS3 DB1 BWS2 Pick2 OM3 OM4 17 12->11 ("Cancel") ("No credit") OM1 OM2 19 18 24->17 Inv8 Inv6 16 Inv5 Inv7 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Switch 15->12 DB2 Mapping: customer:25->c:24, C:17->B:16, B:15->BWS3:14, BWS3:13->B:12, B:11->C:10, C:9->A:8, A:7->BWS1:6, BWS1:5->A:4, A:3->C:2, C:1->customer:0 93 / 101
Diagnosis coordination BWS1 5 6 Rec1 2->1 1 0 A (d1,d2,m1,m2,c1,c2,con) 1->0 3 2 8->7Rec2 Inv1 9 B 7->BSW1 (P,ID,cient) 4 10->9 Inv2 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) Inv3 10 11 Rec3 7 16->15 7->5 4->3Rep1 8 Pick1 15->BSW3 12 Inv4 15 15->13 C (d1,d2,m1,m2,c1,c2,client,con) 13 14 BWS3 DB1 BWS2 Pick2 OM3 OM4 17 12->11 ("Cancel") ("No credit") OM1 OM2 19 18 24->17 Inv8 Inv6 16 Inv5 Inv7 21 22 20 Inv9 23 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") Switch 15->12 DB2 Mapping: customer:25->c:24, C:17->B:16, B:15->BWS3:14, BWS3:13->B:12, B:11->C:10, C:9->A:8, A:7->BWS1:6, BWS1:5->A:4, A:3->C:2, C:1->customer:0 94 / 101
Diagnosis coordination BWS1 5 DB1 6 BWS2 A 8->7Rec2 7->BSW1 4 Inv2 7->5 7 8 4->3Rep1 C (d1,d2,m1,m2,c1,c2,con) 1->0 3 2 Inv1 9 B (P,ID,cient) 10->9 Inv3 10 11 Rec3 16->15 Pick1 D={BWS1}, Pick2 OM3 OM4 Switch 15->12 {BWS3}, 17 12->11 {d1}, DB2 ("Cancel") ("No credit") {d2}, OM1 OM2 19 18 24->17 Inv8 Inv6 16 Inv5 Inv7 21 22 (t1,t2,d1,d2,m1,m2,c1,c2,p,id) 20 Inv9 23 Rec1 2->1 1 Rep2 24 25 (d1,d2,m1,m2,c,con,"no credit") (d1,d2,m1,m2,c1,c2,client,con) 0 15->BSW3 12 13 Inv4 15 14 Result 15->13 BWS3 Mapping: customer:25->c:24, C:17->B:16, B:15->BWS3:14, BWS3:13->B:12, B:11->C:10, C:9->A:8, A:7->BWS1:6, BWS1:5->A:4, A:3->C:2, C:1->customer:0 95 / 101
A possible explanation Date format interpreting fault: dd/mm/yyyy vs. mm/dd/yyyy Reservation failed because of no enough credit Input on agency service: on Jul 9, reserved a ticket on Nov 7 and Dec 7 Input on airline service: reserved a ticket on Jul 11 and Jul 12 Tickets were much more expensive on Jul 9 for Jul 11 and Jul 12! 96 / 101
Contributions CPN model (Li et al. [2009a]) Places represent the data and control Transition modes represent the correct and faulty system behavior Characteristic vector represents the partially ordered observation Token colors represent the data correctness status: correct (b), faulty (r), unknown ( ) Automatic decentralized diagnosis application Local monitoring components (C#, Java, MySQL by Omar Aaouatif, intern) BPEL2CPN transilator (Java Li et al. [2007],Li et al. [2009a]) Dependency relationships between I/O data for each basic activity: illustrate the faults transmission between data and controls in BPEL Complex variables (XPath) CPN places Basic activities and structural operators translation CPN transitions Local diagnosers and decentralized coordinator (Java) Diagnosis algorithm (Li et al. [2009a],Li et al. [2009b]) Effective off-line diagnosis based on algebraic symbolic calculation Handling cyclic observations in an elegant way Decentralized coordinator protocols 97 / 101