SLIDE 1
Logics for Petri nets with propagating failures Leandro Gomes, - - PowerPoint PPT Presentation
Logics for Petri nets with propagating failures Leandro Gomes, - - PowerPoint PPT Presentation
Logics for Petri nets with propagating failures Leandro Gomes, Alexandre Madeira and Mario Benevides 8 th IPM International Conference on Fundamentals of Software Engineering, 2 nd May 2019 Outline Background and motivations Petri nets with A
SLIDE 2
SLIDE 3
Outline
Background and motivations Petri nets with A-failures Dynamic logics for Petri nets with A-failures: GP(A) Conclusions
SLIDE 4
Propositional dynamic logic (in a rush)
Signatures Are pairs (Prop, Π) where Prop and Π are disjoint sets of propositions, and atomic programs
SLIDE 5
Propositional dynamic logic (in a rush)
Signatures Are pairs (Prop, Π) where Prop and Π are disjoint sets of propositions, and atomic programs Sentences ϕ ::= p | πϕ | [π]ϕ | ¬ϕ | ϕ ∨ ϕ | ϕ ∧ ϕ π ::= π0 | π + π | π; π | π∗ | ?ϕ and p ∈ Prop
SLIDE 6
Propositional dynamic logic (in a rush)
Signatures Are pairs (Prop, Π) where Prop and Π are disjoint sets of propositions, and atomic programs Sentences ϕ ::= p | πϕ | [π]ϕ | ¬ϕ | ϕ ∨ ϕ | ϕ ∧ ϕ π ::= π0 | π + π | π; π | π∗ | ?ϕ and p ∈ Prop Models Models are Kripke structures, i.e. tuples
- W , V , R
- W is a set
V : Prop → P(W ) is a function R = (Rπ ⊆ W × W )π∈Π is an Π-family of binary relations
SLIDE 7
Propositional dynamic logic (in a rush)
Satisfaction M, w | = p iff w ∈ V (p) M, w | = ϕ ∧ ϕ′ iff M, w | = ϕ and M, w | = ϕ′ M, w | = ϕ ∨ ϕ′ iff M, w | = ϕ or M, w | = ϕ′ M, w | = ¬ϕ iff it is false that M, w | = ϕ
SLIDE 8
Propositional dynamic logic (in a rush)
Satisfaction M, w | = p iff w ∈ V (p) M, w | = ϕ ∧ ϕ′ iff M, w | = ϕ and M, w | = ϕ′ M, w | = ϕ ∨ ϕ′ iff M, w | = ϕ or M, w | = ϕ′ M, w | = ¬ϕ iff it is false that M, w | = ϕ M, w | = πϕ iff there is a w′ ∈ W such that (w, w′) ∈ Ra and M, w′ | = ϕ; M, w | = [π]ϕ iff for any w′ ∈ W such that (w, w′) ∈ Ra we have M, w′ | = ϕ;
SLIDE 9
Petri Nets
- It is a tuple of the form (P, T , w, m0) where:
- P represents a finite set of places;
- T represents a finite set of transitions;
- w: (P × T ) ∪ (T × P) → N0 attributes to each arc a
non-negative integer, representing its multiplicity.
- m0: P → N0 defines an Initial Marking
SLIDE 10
Example
ℓ m x y c t2 t3 t1
Figure: Example of a Petri net
SLIDE 11
Proposition dynamic logic for Petri nets: Petri-PDL⋆
(Bruno Lopes, 2014) and (Mario Benevides, 2016)
SLIDE 12
Proposition dynamic logic for Petri nets: Petri-PDL⋆
(Bruno Lopes, 2014) and (Mario Benevides, 2016) Basic programs Π0(P): π ::= at1b | abt2c | at3bc where ti is of type Ti, i = 1, 2, 3 and a, b, c ∈ P
SLIDE 13
Proposition dynamic logic for Petri nets: Petri-PDL⋆
(Bruno Lopes, 2014) and (Mario Benevides, 2016) Basic programs Π0(P): π ::= at1b | abt2c | at3bc where ti is of type Ti, i = 1, 2, 3 and a, b, c ∈ P Petri net Programs Π(P): η ::= π | π ⊙ η | η⋆ for π ∈ Π0(P)
SLIDE 14
Proposition dynamic logic for Petri nets: Petri-PDL⋆
(Bruno Lopes, 2014) and (Mario Benevides, 2016) Basic programs Π0(P): π ::= at1b | abt2c | at3bc where ti is of type Ti, i = 1, 2, 3 and a, b, c ∈ P Petri net Programs Π(P): η ::= π | π ⊙ η | η⋆ for π ∈ Π0(P) Formulas FmPetri−PDL⋆(Prop): ρ ::= p | ⊤ | ¬ρ | ρ ∧ ρ | s, ηρ where p ∈ Prop.
SLIDE 15
Petri-PDL⋆ dynamics – firing function
f : S × Π0 → S f (s, abt2c) = s2 | c ∈ s2, if a, b ∈ s ǫ, if a / ∈ s or b / ∈ s
- ℓ
m x y c t2 t3 t1
SLIDE 16
Petri-PDL⋆ dynamics – firing function
f : S × Π0 → S f (s, abt2c) = s2 | c ∈ s2, if a, b ∈ s ǫ, if a / ∈ s or b / ∈ s
- ℓ
m x y c t2 t3 t1
− →
ℓ m x y c t2 t3 t1
Figure: Dynamics for transitions of type abt2c
SLIDE 17
Models: (W, Rπ, M), V
- W is a non-empty set of states, M : W → S, Rπ is a binary
relation over W .
- V is a valuation function V: Prop → 2W .
SLIDE 18
Models: (W, Rπ, M), V
- W is a non-empty set of states, M : W → S, Rπ is a binary
relation over W .
- V is a valuation function V: Prop → 2W .
Satisfaction: V: Prop → 2W
- M, w |
= p iff w ∈ V(p);
- M, w |
= ⊤ always;
- M, w |
= ¬ρ iff M, w | = ρ;
- M, w |
= ρ ∧ ρ′ iff M, w | = ρ and M, w | = ρ′;
- M, w |
= s, ηρ if there exists w′ ∈ W , wRηw′, s M(w) and M, w′ | = ρ.
SLIDE 19
Example
ℓ m x y c t2 t3 t1
SLIDE 20
Example
ℓ m x y c t2 t3 t1
− →
ℓ m x y c t2 t3 t1
SLIDE 21
Example
ℓ m x y c t2 t3 t1
− →
ℓ m x y c t2 t3 t1
− →
ℓ m x y c t2 t3 t1
Figure: Execution of the program ℓmt2x; xt3yc in a chocolate vending machine
M, ℓm | = ℓmt2x; xt3yc⊤ = ⊤
SLIDE 22
Failures in machines
After putting a coin in a vending machine, the desired chocolate gets stuck behind of the glass
SLIDE 23
Failures in machines
After putting a coin in a vending machine, the desired chocolate gets stuck behind of the glass How to model these phenomena?
SLIDE 24
Outline
Background and motivations Petri nets with A-failures Dynamic logics for Petri nets with A-failures: GP(A) Conclusions
SLIDE 25
Construction parameter
Action Lattice Klenne Algebra Residuated Lattice Generic model for computations Generic truth space
SLIDE 26
Construction parameter
Action Lattice Klenne Algebra Residuated Lattice Generic model for computations Generic truth space
Action lattice (Pratt 90, Kozen 91)
A = (A, +, ; , 0, 1, ∗, →, ·) (A, +, ; , 0, 1, ∗) is a Kleene algebra; → is a residue wrt ; (A, +, .) is a lattice wrt relation a ≤ b ≡ a + b = b
SLIDE 27
Examples: 2 - linear two-values lattice.
2 = ({⊤, ⊥}, ∨, ∧, ⊥, ⊤, ∗, →, ∧) ∨ ⊥ ⊤ ⊥ ⊥ ⊤ ⊤ ⊤ ⊤ ∧ ⊥ ⊤ ⊥ ⊥ ⊥ ⊤ ⊥ ⊤ → ⊥ ⊤ ⊥ ⊤ ⊤ ⊤ ⊥ ⊤ ∗ ⊥ ⊤ ⊤ ⊤
SLIDE 28
Examples: Wk finite Wajsberg hoops
For a fixed natural k > 0 and a generator a, Wk = (Wk, + , ; , 0, 1, ∗, →, ·) where
- Wk = {a0, a1, · · · , ak}, 1 = a0 and 0 = ak,
- For any m, n ≤ k:
am + an = amin{m,n}, am; an = amin{m+n,k}, (am)∗ = a0, am → an = amax{n−m,0}, am · an = amax{m,n}
SLIDE 29
Examples: L - the Lukasiewicz arithmetic lattice
- L = ([0, 1], max, ⊙, 0, 1, ∗, → , min)
where x ⊙ y = max{0, y + x − 1}, x → y = min{1, 1 − x + y} and ∗ maps each point of [0, 1] to 1.
SLIDE 30
Petri net with A-failures
P =
- P, S, Π0, I, M0
- P is a set of places,
S ⊆ P is the set of (admissible) markings, Π0 ⊆ Π(P) is the set of atomic programs, I : Π0 → A is the atomic programs reliability degree and M0 ∈ S is the initial marking.
SLIDE 31
Dynamics of Petri nets with A-failures - firing function
f I(π)
π
: S × S → A f α
abt2c(s, s′) =
α, if a, b ∈ s and c ∈ s′ α → 0, if a, b ∈ s and a, b ∈ s′ 0 if a, b / ∈ s
ℓ m x y c t2 t3 t1
SLIDE 32
Dynamics of Petri nets with A-failures - firing function
f I(π)
π
: S × S → A f α
abt2c(s, s′) =
α, if a, b ∈ s and c ∈ s′ α → 0, if a, b ∈ s and a, b ∈ s′ 0 if a, b / ∈ s
ℓ m x y c t2 t3 t1 α
− →
ℓ m x y c t2 t3 t1
Figure: Dynamics of transition of type abt2c
SLIDE 33
Interpretation of Petri net programs
The algebra of A-firing functions F = (F, ∪, ◦, ∅, χ, ∗) where: F is the universe of all the α-firing functions, for all α ∈ A
SLIDE 34
Interpretation of Petri net programs
The algebra of A-firing functions F = (F, ∪, ◦, ∅, χ, ∗) where: F is the universe of all the α-firing functions, for all α ∈ A
Theorem
F is a Kleene Algebra
Proof.
See (Gomes, 2017).
SLIDE 35
Interpretation of Petri net programs
The algebra of A-firing functions F = (F, ∪, ◦, ∅, χ, ∗) where: F is the universe of all the α-firing functions, for all α ∈ A
Theorem
F is a Kleene Algebra
Proof.
See (Gomes, 2017). A-interpretations of programs
- for any atomic program π ∈ Π0, π(s, s′) = f F(π)
π
(s, s′)
- π1; π2(s, s′) = (π1 ◦ π2)(s, s′)
- η∗(s, s′) = η∗(s, s′), for η∗(s, s′) =
i≥0ηi(s, s′)
where η0(s, s′) = χ(s, s′) and for any i ≥ 0, ηi+1(s, s′) =
- ηi ◦ η
- (s, s′)
SLIDE 36
Outline
Background and motivations Petri nets with A-failures Dynamic logics for Petri nets with A-failures: GP(A) Conclusions
SLIDE 37
PDL for Petri Nets with A-failures – GP(A)
The method is based on the one introduced in [Madeira, 2016].
SLIDE 38
PDL for Petri Nets with A-failures – GP(A)
The method is based on the one introduced in [Madeira, 2016]. Formulas: The set of formulas FmGP(A)(Prop, P): ρ ::= p | ⊤ | ⊥ | ρ ∧ ρ | ρ ∨ ρ | ρ → ρ | ηρ | [η]ρ where p ∈ Prop, η ::= π | π; η | η⋆ for π ::= at1b | abt2c | at3bc, and a, b, c ∈ P.
SLIDE 39
PDL for Petri Nets with A-failures – GP(A)
The method is based on the one introduced in [Madeira, 2016]. Formulas: The set of formulas FmGP(A)(Prop, P): ρ ::= p | ⊤ | ⊥ | ρ ∧ ρ | ρ ∨ ρ | ρ → ρ | ηρ | [η]ρ where p ∈ Prop, η ::= π | π; η | η⋆ for π ::= at1b | abt2c | at3bc, and a, b, c ∈ P. Models: M = P, V P is a Petri net with A-failures and V is a valuation function V : Prop × S → A.
SLIDE 40
PDL for Petri Nets with A-failures – GP(A)
(Graded) Satisfaction: | = : (M × S) × FmGP(A)(Prop) → A
- (M, s |
= p) = V(p, s);
- (M, s |
= ⊤) = ⊤;
- (M, s |
= ⊥) = ⊥;
- (M, s |
= ρ ∧ ρ′) = (M, s | = ρ) · (M, s | = ρ′);
- (M, s |
= ρ ∨ ρ′) = (M, s | = ρ) + (M, s | = ρ′);
- (M, s |
= ρ → ρ′) = (M, s | = ρ) → (M, s | = ρ′);
- (M, s |
= ηρ) =
s′∈S
- η(s, s′); (M, s′ |
= ρ)
- ;
- (M, s |
= [η]ρ) =
s′∈S
- η(s, s′) → (M, s′ |
= ρ)
SLIDE 41
Example
ℓ m x y c t2 t3 t1 a
− →
ℓ m x y c t2 t3 t1 b
− →
ℓ m x y c t2 t3 t1
Figure: A Petri net for a (possibly) defective chocolate vending machine
SLIDE 42
Example
ℓ m x y c t2 t3 t1 a
− →
ℓ m x y c t2 t3 t1 b
− →
ℓ m x y c t2 t3 t1
Figure: A Petri net for a (possibly) defective chocolate vending machine
GP(2)
SLIDE 43
Example
ℓ m x y c t2 t3 t1 a
− →
ℓ m x y c t2 t3 t1 b
− →
ℓ m x y c t2 t3 t1
Figure: A Petri net for a (possibly) defective chocolate vending machine
GP(2) a = ⊤, b = ⊤
M, ℓm | = ℓmt2x; xt3yc⊤ = =
- s∈S
- ℓmt2x(ℓm, x); xt3yc(x, s) + ℓmt2x(ℓm, ℓm); xt3yc(ℓm, s)
- ; (M, s |
= ⊤) = ⊤
SLIDE 44
GP(W10)
SLIDE 45
GP(W10) a = 8, b = 9
M, ℓm | = ℓmt2x; xt3yc⊤ = =
- 8; 9 + (8 → 0); 0
- ; 10 +
- (8 → 0); 0
- ; 10 +
- 8; (9 → 0) + (8 → 0); 0
- ; 10
= 7.
SLIDE 46
GP(W10) a = 8, b = 9
M, ℓm | = ℓmt2x; xt3yc⊤ = =
- 8; 9 + (8 → 0); 0
- ; 10 +
- (8 → 0); 0
- ; 10 +
- 8; (9 → 0) + (8 → 0); 0
- ; 10
= 7.
GP( L)
SLIDE 47
GP(W10) a = 8, b = 9
M, ℓm | = ℓmt2x; xt3yc⊤ = =
- 8; 9 + (8 → 0); 0
- ; 10 +
- (8 → 0); 0
- ; 10 +
- 8; (9 → 0) + (8 → 0); 0
- ; 10
= 7.
GP( L) a = 0.78, b = 0.93
M, ℓm | = ℓmt2x; xt3yc⊤ = =max{max{0.78 ⊙ 0.93, 0} ⊙ 1, 0, max{0.78 ⊙ (0.93 → 0), 0} ⊙ 1} =0.71
SLIDE 48
Outline
Background and motivations Petri nets with A-failures Dynamic logics for Petri nets with A-failures: GP(A) Conclusions
SLIDE 49
Conclusions
We achieved Generalisation of Petri PDL⋆: Petri net with A-failures; A class of Kleene algebras; GP(A)
SLIDE 50
Conclusions
We achieved Generalisation of Petri PDL⋆: Petri net with A-failures; A class of Kleene algebras; GP(A) . . . and we may enrich with Developing a proof calculi and model checking; Vary the parameter A to handle costs and time.
SLIDE 51