A Concurrency-Preserving Translation from Time Petri Nets to Networks of Timed Automata Sandie Balaguer, Thomas Chatain, Stefan Haar LSV – ENS Cachan, INRIA, CNRS – France ACTS – January 28, 2011
Introduction 1 Motivation Timed and concurrent models Partial order semantics 2 Timed traces Distributed timed language Decomposing a PN in processes 3 S-invariants Decomposition Translation from TPN to NTA 4 Adding clocks Know thy neighbour! Conclusion 5
Introduction 1 Motivation Timed and concurrent models Partial order semantics 2 Timed traces Distributed timed language Decomposing a PN in processes 3 S-invariants Decomposition Translation from TPN to NTA 4 Adding clocks Know thy neighbour! Conclusion 5
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Motivation Concurrency Two actions that might be performed in any order leading to the same state are concurrent. Concurrency can be used to improve the analysis of distributed systems. The definition of concurrency in timed systems is not clear since events are ordered both by their occurrence dates and by causality. 2 formalisms Networks of timed automata (NTA) Time Petri nets (TPN) Translation between formalisms Theoretical reasons (comparison) Practical reasons (verification tools) 4/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Motivation Translations from TPN to NTA with preservation of timed words but loss of concurrency π 1 π 2 Concurrency-preserving translation ( a, 1) ( c, 2) Runs are represented as timed traces � = timed ( b, 2) words. The translation preserves timed traces. ( a, 2) ( c, 4) Some hidden dependencies caused by time are ( d, 4) made explicit. 5/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Timed Automata [Alur, Dill, 94] Definition (Timed Automaton) b, { x } A timed automaton is a tuple A = ( L, ℓ 0 , C, Σ , E, Inv ) where: x ≤ 4 ℓ 1 L is a set of locations, ℓ 0 ∈ L is the initial location, x ≥ 3 x = 4 a c C is a finite set of clocks, { x } Σ is a finite set of actions, E ⊆ L × B ( C ) × Σ × 2 C × L is a set of edges, ℓ 0 Inv : L → B ( C ) assigns invariants to locations. A location must be left when its invariant reaches its limit. An edge cannot be taken if its guard is not satisfied. 6/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Networks of Timed Automata: A 1 � . . . �A n Action step: ( � → ( � a ℓ ′ , v ′ ) ℓ, v ) If all the automata that share a are ready to perform it. Edges labeled by a are taken simultaneously in these automata. Delay step: ∀ d ∈ R ≥ 0 , ( � → ( � d ℓ, v ) ℓ, v + d ) v + d respects the invariants of the current locations. b, { x } x ≤ 4 ℓ 1 ℓ 3 x ≥ 3 y = 1 x = 4 a c c d { x } { y } ℓ 2 y ≤ 1 ℓ 0 ℓ 0 ℓ 2 ( ℓ 0 , ℓ 2 ) 1 − → (0 , 0) 7/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Networks of Timed Automata: A 1 � . . . �A n Example run b, { x } x ≤ 4 ℓ 1 ℓ 3 x ≥ 3 y = 1 x = 4 a c c d { x } { y } ℓ 2 y ≤ 1 ℓ 0 ℓ 0 ℓ 2 ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 2 ) 1 d − − → (0 , 0) (1 , 1) 7/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Networks of Timed Automata: A 1 � . . . �A n Example run b, { x } x ≤ 4 ℓ 1 ℓ 3 ℓ 3 x ≥ 3 y = 1 x = 4 a c c d { x } { y } ℓ 2 y ≤ 1 ℓ 0 ℓ 0 ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 3 ) 1 d 2 . 5 − − − → (0 , 0) (1 , 1) (1 , 1) 7/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Networks of Timed Automata: A 1 � . . . �A n Example run b, { x } x ≤ 4 ℓ 1 ℓ 3 ℓ 3 x ≥ 3 y = 1 x = 4 a c c d { x } { y } ℓ 2 y ≤ 1 ℓ 0 ℓ 0 ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 3 ) → ( ℓ 0 , ℓ 3 ) 1 d 2 . 5 a − − − − → (0 , 0) (1 , 1) (1 , 1) (3 . 5 , 3 . 5) 7/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Networks of Timed Automata: A 1 � . . . �A n Example run b, { x } x ≤ 4 ℓ 1 ℓ 1 ℓ 3 ℓ 3 x ≥ 3 y = 1 x = 4 a c c d { x } { y } ℓ 2 y ≤ 1 ℓ 0 ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 3 ) → ( ℓ 0 , ℓ 3 ) → ( ℓ 1 , ℓ 3 ) 1 d 2 . 5 a 4 − − − − − → (0 , 0) (1 , 1) (1 , 1) (3 . 5 , 3 . 5) (0 , 3 . 5) 7/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Networks of Timed Automata: A 1 � . . . �A n Example run b, { x } x ≤ 4 ℓ 1 ℓ 1 ℓ 3 ℓ 3 x ≥ 3 y = 1 x = 4 a c c d { x } { y } ℓ 2 y ≤ 1 ℓ 0 ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 2 ) → ( ℓ 0 , ℓ 3 ) → ( ℓ 0 , ℓ 3 ) → ( ℓ 1 , ℓ 3 ) → ( ℓ 1 , ℓ 3 ) 1 d 2 . 5 a 4 c − − − − − − → · · · (0 , 0) (1 , 1) (1 , 1) (3 . 5 , 3 . 5) (0 , 3 . 5) (4 , 7 . 5) 7/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion Time Petri Nets [Merlin, 74] ( P, T, F, M 0 , efd , lfd ) efd : T → R earliest firing delay lfd : T → R ∪ {∞} latest firing delay p 0 p 2 • • [0 , ∞ [ a [0 , 0] [1 , 2] c b p 1 p 3 [2 , 2] d p 4 8/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion TPN Semantics t is enabled in M : t ∈ enabled ( M ) ⇔ • t ⊆ M → ( M ′ = M − • t + t • ) t firing t from M : M t ′ is newly enabled by the firing of t from M : intermediate semantics t ′ ∈ enabled ( M ′ ) t ′ / ↑ enabled ( t ′ , M, t ) = � � � ∈ enabled ( M − • t )) � ∧ t → ( M ′ , ν ′ ) iff Discrete transition: ∀ t ∈ enabled ( M ) , ( M, ν ) efd ( t ) ≤ ν ( t ) , � 0 if ↑ enabled ( t ′ , M, t ) ∀ t ′ ∈ T, ν ′ ( t ′ ) = ν ( t ′ ) otherwise. d Continuous transition: ∀ d ∈ R ≥ 0 , ( M, ν ) → ( M, ν + d ) iff urgency ∀ t ∈ enabled ( M ) , ν ( t ) + d ≤ lfd ( t ) 9/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion TPN Semantics Example run p 0 • p 2 • [0 , ∞ [ a a [0 , 0] [1 , 2] c b p 1 • p 3 • [2 , 2] d p 4 { p 0 , p 2 } 2 − → (0 , , 0 , ) 10/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion TPN Semantics Example run p 0 • p 2 • [0 , ∞ [ a a [0 , 0] [1 , 2] c c b p 1 • p 3 • [2 , 2] d p 4 { p 0 , p 2 } → { p 0 , p 2 } 2 c − − → (0 , , 0 , ) (2 , , 2 , ) 10/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion TPN Semantics Example run p 0 • p 2 • [0 , ∞ [ a a [0 , 0] [1 , 2] c b p 1 • p 3 • [2 , 2] d p 4 { p 0 , p 2 } → { p 0 , p 2 } → { p 0 , p 3 } 2 c 10 − − − → (0 , , 0 , ) (2 , , 2 , ) (2 , , , ) 10/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion TPN Semantics Example run p 0 • p 2 • [0 , ∞ [ a a [0 , 0] [1 , 2] c b p 1 • p 3 • [2 , 2] d p 4 { p 0 , p 2 } → { p 0 , p 2 } → { p 0 , p 3 } → { p 0 , p 3 } 2 c 10 a − − − − → (0 , , 0 , ) (2 , , 2 , ) (2 , , , ) (12 , , , ) 10/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion TPN Semantics Example run p 0 • p 2 • [0 , ∞ [ a [0 , 0] [1 , 2] c b b p 1 • p 3 • [2 , 2] d p 4 { p 0 , p 2 } → { p 0 , p 2 } → { p 0 , p 3 } → { p 0 , p 3 } → { p 1 , p 3 } 2 c 10 a b − − − − − → (0 , , 0 , ) (2 , , 2 , ) (2 , , , ) (12 , , , ) ( , 0 , , 0) b and d are newly enabled. 10/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion TPN Semantics Example run p 0 • p 2 • [0 , ∞ [ a a [0 , 0] [1 , 2] c b p 1 • p 3 • [2 , 2] d p 4 { p 0 , p 2 } → { p 0 , p 2 } → { p 0 , p 3 } → { p 0 , p 3 } → { p 1 , p 3 } → { p 0 , p 2 } 2 c 10 a b − − − − − (0 , , 0 , ) (2 , , 2 , ) (2 , , , ) (12 , , , ) ( , 0 , , 0) (0 , , 0 , ) 10/ 28
Introduction Partial order semantics Decomposing a PN in processes Translation from TPN to NTA Conclusion TPN Semantics Can be seen as a TA x a ≤ ∞ ∧ x c ≤ 2 x a ≤ ∞ x c ≥ 1 , c p 0 , p 2 p 0 , p 3 p 0 • p 2 • x b ≥ 0 b, { x a , x c } x a ≥ 0 [0 , ∞ [ a [0 , 0] [1 , 2] c b x a ≥ 0 a { x d } a { x b , x d } p 1 p 3 x c ≥ 1 , c, { x b } p 1 , p 2 p 1 , p 3 x d ≤ 2 ∧ x c ≤ 2 x d ≤ 2 ∧ x b ≤ 0 [2 , 2] d x d ≥ 2 x d ≥ 2 p 4 d d p 4 , p 2 p 4 , p 3 x c ≥ 1 , c x c ≤ 2 11/ 28
Recommend
More recommend