• Non ci sono risultati.

Formal Methods Module II: Model Checking Ch. 09: Timed and Hybrid Systems

N/A
N/A
Protected

Academic year: 2021

Condividi "Formal Methods Module II: Model Checking Ch. 09: Timed and Hybrid Systems"

Copied!
314
0
0

Testo completo

(1)

Formal Methods Module II: Model Checking Ch. 09: Timed and Hybrid Systems

Roberto Sebastiani

DISI, Università di Trento, Italy – roberto.sebastiani@unitn.it URL: http://disi.unitn.it/rseba/DIDATTICA/fm2021/

Teaching assistant:Giuseppe Spallitta– giuseppe.spallitta@unitn.it

M.S. in Computer Science, Mathematics, & Artificial Intelligence Systems Academic year 2020-2021

last update: Thursday 27thMay, 2021, 13:26

Copyright notice: some material (text, figures) displayed in these slides is courtesy of R. Alur, M. Benerecetti, A. Cimatti, M. Di Natale, P. Pandya, M. Pistore, M. Roveri, C. Tinelli, and S.Tonetta, who detain its copyright. Some exampes displayed in these slides are taken from [Clarke, Grunberg & Peled, “Model Checking”, MIT Press], and their copyright is

detained by the authors. All the other material is copyrighted by Roberto Sebastiani. Every commercial use of this material is strictly forbidden by the copyright laws without the authorization of the authors. No copy of these slides can be

displayed in public without containing this copyright notice.

(2)

Outline

1

Motivations

2

Timed systems: Modeling and Semantics Timed automata

3

Symbolic Reachability for Timed Systems Making the state space finite

Region automata Zone automata

4

Hybrid Systems: Modeling and Semantics Hybrid automata

5

Symbolic Reachability for Hybrid Systems Multi-Rate and Rectangular Hybrid Automata Linear Hybrid Automata

6

Exercises

(3)

Outline

1

Motivations

2

Timed systems: Modeling and Semantics Timed automata

3

Symbolic Reachability for Timed Systems Making the state space finite

Region automata Zone automata

4

Hybrid Systems: Modeling and Semantics Hybrid automata

5

Symbolic Reachability for Hybrid Systems Multi-Rate and Rectangular Hybrid Automata Linear Hybrid Automata

6

Exercises

(4)

Acknowledgments

Thanks for providing material to:

Rajeev Alur & colleagues (Penn University) Paritosh Pandya (IIT Bombay)

Andrea Mattioli, Yusi Ramadian (Univ. Trento) Marco Di Natale (Scuola Superiore S.Anna, Italy)

Disclaimer

very introductory very-partial coverage

mostly computer-science centric

(5)

Acknowledgments

Thanks for providing material to:

Rajeev Alur & colleagues (Penn University) Paritosh Pandya (IIT Bombay)

Andrea Mattioli, Yusi Ramadian (Univ. Trento) Marco Di Natale (Scuola Superiore S.Anna, Italy)

Disclaimer

very introductory very-partial coverage

mostly computer-science centric

(6)

Hybrid Modeling

Hybrid machines = State machines + Dynamic Systems

(7)

Hybrid Modeling: Examples

Automotive Applications Vehicle Coordination Protocols

Interacting Autonomous Robots

Bio-molecular Regulatory

Networks

(8)

Hybrid Modeling: Examples

Automotive Applications Vehicle Coordination Protocols

Interacting Autonomous Robots

Bio-molecular Regulatory

Networks

(9)

Hybrid Modeling: Examples

Automotive Applications Vehicle Coordination Protocols

Interacting Autonomous Robots

Bio-molecular Regulatory

Networks

(10)

Hybrid Modeling: Examples

Automotive Applications Vehicle Coordination Protocols

Interacting Autonomous Robots

Bio-molecular Regulatory

Networks

(11)

Outline

1

Motivations

2

Timed systems: Modeling and Semantics Timed automata

3

Symbolic Reachability for Timed Systems Making the state space finite

Region automata Zone automata

4

Hybrid Systems: Modeling and Semantics Hybrid automata

5

Symbolic Reachability for Hybrid Systems Multi-Rate and Rectangular Hybrid Automata Linear Hybrid Automata

6

Exercises

(12)

Outline

1

Motivations

2

Timed systems: Modeling and Semantics Timed automata

3

Symbolic Reachability for Timed Systems Making the state space finite

Region automata Zone automata

4

Hybrid Systems: Modeling and Semantics Hybrid automata

5

Symbolic Reachability for Hybrid Systems Multi-Rate and Rectangular Hybrid Automata Linear Hybrid Automata

6

Exercises

(13)

Timed Automata

(14)

Example: Simple light control

Requirement:

if Off and press is issued once, then the light switches on;

if Off and press is issued twice quickly, then the light gets brighter;

if Light/Bright and press is issued once, then the light switches off;

=⇒ Cannot be achieved with standard automata

(15)

Example: Simple light control

Solution: add real-valued clock x x reset at first press

if next press before x reaches 3 time units, then the light will get brighter;

otherwise the light is turned off

(16)

Modeling: timing constraints

Finite graph + finite set of (real-valued) clocks

Vertexes are locations Time can elapse there Constraints (invariants) Edges are switches

Subject to constraints Reset clocks

Meaning of clock value: time elapsed since the last time it was reset.

(17)

Timed Automata

Locations l

1

, l

2

, ... (like in standard automata) discrete part of the state

may be implemented by discrete variables

Switches (discrete transitions like in standard aut.) Labels, aka events, actions,... (like in standard aut.)

used for synchronization Clocks: x, y,... ∈ Q

+

value: time elapsed since the last time it was reset Guards: (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N

set of clock comparisons against integers bounds constrain the execution of the switch

Resets (x := 0)

set of clock assignments to 0

Invariants: (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N set of clock comparisons against integers bounds ensure progress

a l1

l2

(18)

Timed Automata

Locations l

1

, l

2

, ... (like in standard automata) discrete part of the state

may be implemented by discrete variables

Switches (discrete transitions like in standard aut.) Labels, aka events, actions,... (like in standard aut.)

used for synchronization Clocks : x, y,... ∈ Q

+

value: time elapsed since the last time it was reset Guards : (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N

set of clock comparisons against integers bounds constrain the execution of the switch

Resets (x := 0)

set of clock assignments to 0

Invariants: (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N set of clock comparisons against integers bounds ensure progress

(x ≥ 4) (y ≤ 2)

a

y := 0

l

1

l

2

(19)

Timed Automata

Locations l

1

, l

2

, ... (like in standard automata) discrete part of the state

may be implemented by discrete variables

Switches (discrete transitions like in standard aut.) Labels, aka events, actions,... (like in standard aut.)

used for synchronization Clocks: x, y,... ∈ Q

+

value: time elapsed since the last time it was reset Guards: (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N

set of clock comparisons against integers bounds constrain the execution of the switch

Resets (x := 0)

set of clock assignments to 0

Invariants : (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N set of clock comparisons against integers bounds ensure progress

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4) (y ≤ 3)

(20)

Timed Automata: States and Transitions

State: hl

i

, x , y i

hl

1

, 4, 7i:

OK!

hl

2

, 2, 4i:

not OK! (violates invariant in l

2

)

Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i:

OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(21)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i:

OK! hl

2

, 2, 4i:

not OK! (violates invariant in l

2

)

Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i:

OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(22)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i:

not OK! (violates invariant in l

2

)

Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i:

OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(23)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i:

not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i:

OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(24)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

)

Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i:

OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(25)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i:

OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(26)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i:

OK! hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(27)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(28)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i:

not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(29)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

)

hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(30)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i:

not OK! (violates guard & invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(31)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(32)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i:

not OK! (violates reset) hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(33)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i: not OK! (violates reset)

hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(34)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i: not OK! (violates reset) hl

1

, 4, 2i −→ hl

a 2

, 4, 0i:

not OK! (violates invar. in l

2

) Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(35)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i: not OK! (violates reset) hl

1

, 4, 2i −→ hl

a 2

, 4, 0i: not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(36)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i: not OK! (violates reset) hl

1

, 4, 2i −→ hl

a 2

, 4, 0i: not OK! (violates invar. in l

2

) Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi

hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(37)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i: not OK! (violates reset) hl

1

, 4, 2i −→ hl

a 2

, 4, 0i: not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi hl

1

, 3, 0i −→ hl

2 1

, 5, 2i:

OK! hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(38)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i: not OK! (violates reset) hl

1

, 4, 2i −→ hl

a 2

, 4, 0i: not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi hl

1

, 3, 0i −→ hl

2 1

, 5, 2i: OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(39)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i: not OK! (violates reset) hl

1

, 4, 2i −→ hl

a 2

, 4, 0i: not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi hl

1

, 3, 0i −→ hl

2 1

, 5, 2i: OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i:

not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(40)

Timed Automata: States and Transitions

State: hl

i

, x , y i hl

1

, 4, 7i: OK!

hl

2

, 2, 4i: not OK! (violates invariant in l

2

) Switch: hl

i

, x , y i −→ hl

a j

, x

0

, y

0

i

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 0i: OK!

hl

1

, 6, 2i −→ hl

a 2

, 6, 0i: not OK! (violates invar. in l

1

) hl

1

, 3, 2i −→ hl

a 2

, 3, 0i: not OK! (violates guard &

invar. in l

2

)

hl

1

, 4.5, 2i −→ hl

a 2

, 4.5, 2i: not OK! (violates reset) hl

1

, 4, 2i −→ hl

a 2

, 4, 0i: not OK! (violates invar. in l

2

)

Wait (time elapse): hl

i

, x , y i −→ hl

δ i

, x + δ, y + δi hl

1

, 3, 0i −→ hl

2 1

, 5, 2i: OK!

hl

1

, 3, 0i −→ hl

3 1

, 6, 3i: not OK! (violates invar. in l

1

)

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(41)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(42)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(43)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(44)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(45)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(46)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(47)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(48)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(49)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(50)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(51)

Timed Automata: Formal Syntax

Timed Automaton hL, L

0

, Σ, X , Φ(X ), E i L: Set of locations

L

0

⊆ L: Set of initial locations Σ: Set of labels

X : Set of clocks Φ(X ): Set of invariants

E ⊆ L × Σ × Φ(X ) × 2

X

× L: Set of switches A switch hl, a, ϕ, λ, l

0

i s.t.

l : source location a: label

ϕ: clock constraints λ ⊆ X : clocks to be reset l

0

: target location

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(52)

Clock constraints and clock interpretations

Grammar of clock constraints:

ϕ ::= x ≤ C | x < C | x ≥ C | x > C | ϕ ∧ ϕ s.t. C positive integer values.

=⇒ allow only comparison of a clock with a constant

clock interpretation: ν

X = hx , y , zi, ν = h1.0, 1.5, 0i clock interpretation ν after δ time: ν + δ

δ = 0.2, ν + δ = h1.2, 1.7, 0.2i clock interpretation ν after reset λ: ν[λ]

λ = {y }, ν[y := 0] = h1.0, 0, 0i

A state for a timed automaton is a pair hl, νi, where l is a location and ν is a clock interpretation

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(53)

Clock constraints and clock interpretations

Grammar of clock constraints:

ϕ ::= x ≤ C | x < C | x ≥ C | x > C | ϕ ∧ ϕ s.t. C positive integer values.

=⇒ allow only comparison of a clock with a constant

clock interpretation: ν

X = hx , y , zi, ν = h1.0, 1.5, 0i clock interpretation ν after δ time: ν + δ

δ = 0.2, ν + δ = h1.2, 1.7, 0.2i clock interpretation ν after reset λ: ν[λ]

λ = {y }, ν[y := 0] = h1.0, 0, 0i

A state for a timed automaton is a pair hl, νi, where l is a location and ν is a clock interpretation

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(54)

Clock constraints and clock interpretations

Grammar of clock constraints:

ϕ ::= x ≤ C | x < C | x ≥ C | x > C | ϕ ∧ ϕ s.t. C positive integer values.

=⇒ allow only comparison of a clock with a constant

clock interpretation: ν

X = hx , y , zi, ν = h1.0, 1.5, 0i clock interpretation ν after δ time: ν + δ

δ = 0.2, ν + δ = h1.2, 1.7, 0.2i clock interpretation ν after reset λ: ν[λ]

λ = {y }, ν[y := 0] = h1.0, 0, 0i

A state for a timed automaton is a pair hl, νi, where l is a location and ν is a clock interpretation

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(55)

Clock constraints and clock interpretations

Grammar of clock constraints:

ϕ ::= x ≤ C | x < C | x ≥ C | x > C | ϕ ∧ ϕ s.t. C positive integer values.

=⇒ allow only comparison of a clock with a constant

clock interpretation: ν

X = hx , y , zi, ν = h1.0, 1.5, 0i clock interpretation ν after δ time: ν + δ

δ = 0.2, ν + δ = h1.2, 1.7, 0.2i clock interpretation ν after reset λ: ν[λ]

λ = {y }, ν[y := 0] = h1.0, 0, 0i

A state for a timed automaton is a pair hl, νi, where l is a location and ν is a clock interpretation

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(56)

Clock constraints and clock interpretations

Grammar of clock constraints:

ϕ ::= x ≤ C | x < C | x ≥ C | x > C | ϕ ∧ ϕ s.t. C positive integer values.

=⇒ allow only comparison of a clock with a constant

clock interpretation: ν

X = hx , y , zi, ν = h1.0, 1.5, 0i clock interpretation ν after δ time: ν + δ

δ = 0.2, ν + δ = h1.2, 1.7, 0.2i clock interpretation ν after reset λ: ν[λ]

λ = {y }, ν[y := 0] = h1.0, 0, 0i

A state for a timed automaton is a pair hl, νi, where l is a location and ν is a clock interpretation

(x ≥ 4) (y ≤ 2) a

y := 0 l

1

(x ≤ 5)

l

2

(x > 4)

(y ≤ 3)

(57)

Remark: why integer constants in clock constraints?

The constant in clock constraints are assumed to be integer w.l.o.g.:

if rationals, multiply them for their greatest common denominator, and change the time unit accordingly

in practice, multiply by 10

k

(resp 2

k

), k being the number of precision digits (resp. bits), and change the time unit accordingly Ex: 1.345, 0.78, 102.32 seconds

=⇒ 1, 345, 780, 102, 320 milliseconds

(58)

Example

clocks {x , y } can be set/reset independently x is reset to 0 from s

0

to s

1

on a

switches b and c happen within 1 time-unit from a because of constraints in s

1

and s

2

delay between b and the following d is > 2

no explicit bounds on time difference between event c − d

(59)

Example

clocks {x , y } can be set/reset independently x is reset to 0 from s

0

to s

1

on a

switches b and c happen within 1 time-unit from a because of constraints in s

1

and s

2

delay between b and the following d is > 2

no explicit bounds on time difference between event c − d

(60)

Example

clocks {x , y } can be set/reset independently x is reset to 0 from s

0

to s

1

on a

switches b and c happen within 1 time-unit from a because of constraints in s

1

and s

2

delay between b and the following d is > 2

no explicit bounds on time difference between event c − d

(61)

Example

clocks {x , y } can be set/reset independently x is reset to 0 from s

0

to s

1

on a

switches b and c happen within 1 time-unit from a because of constraints in s

1

and s

2

delay between b and the following d is > 2

no explicit bounds on time difference between event c − d

(62)

Example

clocks {x , y } can be set/reset independently x is reset to 0 from s

0

to s

1

on a

switches b and c happen within 1 time-unit from a because of constraints in s

1

and s

2

delay between b and the following d is > 2

no explicit bounds on time difference between event c − d

(63)

Timed Automata: Semantics

Semantics of A defined in terms of a (infinite) transition system S

A def

= hQ, Q

0

, →, Σi

Q: {hl, νi} s.t. l location and ν clock evaluation Q

0

: {hl, νi} s.t. l ∈ L

0

location and ν(X ) = 0

→:

state change due to location switch

state change due to time elapse

Σ : set of labels of Σ ∪ Q

+

(64)

State change in transition system

Initial State

hq, 0i

Initial state

(65)

State change in transition system

Time elapse

hq, 0i −→ hq, 1.2i

1.2

state change due to elapse of time

(66)

State change in transition system

Time Elapse, Switch and their Concatenation hq, 0i −→ hq, 1.2i

1.2

−→ hq

a 0

, 1.2i ”wait δ; switch;”

=⇒ hq, 0i

1.2+a

−→ hq

0

, 1.2i ”wait δ and switch;”

(67)

State change in transition system

Time Elapse, Switch and their Concatenation hq, 0i −→ hq, 1.2i

1.2

−→ hq

a 0

, 1.2i ”wait δ; switch;”

=⇒ hq, 0i

1.2+a

−→ hq

0

, 1.2i ”wait δ and switch;”

(68)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(69)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(70)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(71)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(72)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(73)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(74)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(75)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(76)

Example

push push

click

Switch may be turned on whenever at least 2 time units has elapsed since last “turn off”

Light automatically switches off after 9 time units.

Example execution

hoff , 0, 0i −→ hoff , 3.5, 3.5i

3.5

−→ hon, 0, 0i

push

−→ hon, 3.14, 3.14i

3.14

push

−→ hon, 0, 3.14i −→ hon, 3, 6.14i

3

−→ hon, 5.86, 9i

2.86

−→ hoff , 0, 9i

click

(77)

Remark: Non-Zenoness

Beware of Zeno! (paradox)

When the invariant is violated some edge must be enabled

Automata should admit the

possibility of time to diverge

(78)

Combination of Timed Automata

Complex system = product of interacting systems Let A

1def

= hL

1

, L

01

, Σ

1

, X

1

, Φ

1

(X

1

), E

1

i,

A

2def

= hL

2

, L

02

, Σ

2

, X

2

, Φ

2

(X

2

), E

2

i Product: A

1

||A

2def

=

hL

1

× L

2

, L

01

× L

02

, Σ

1

∪ Σ

2

, X

1

∪ X

2

, Φ

1

(X

1

) ∪ Φ

2

(X

2

), E

1

||E

2

i Transition iff:

Label a belongs to both alphabets =⇒ synchronized

blocking synchronization: a-labeled switches cannot be shot alone Label a only in the alphabet of A

1

=⇒ asynchronized

Label a only in the alphabet of A

2

=⇒ asynchronized

(79)

Combination of Timed Automata

Complex system = product of interacting systems Let A

1def

= hL

1

, L

01

, Σ

1

, X

1

, Φ

1

(X

1

), E

1

i,

A

2def

= hL

2

, L

02

, Σ

2

, X

2

, Φ

2

(X

2

), E

2

i Product: A

1

||A

2def

=

hL

1

× L

2

, L

01

× L

02

, Σ

1

∪ Σ

2

, X

1

∪ X

2

, Φ

1

(X

1

) ∪ Φ

2

(X

2

), E

1

||E

2

i Transition iff:

Label a belongs to both alphabets =⇒ synchronized

blocking synchronization: a-labeled switches cannot be shot alone Label a only in the alphabet of A

1

=⇒ asynchronized

Label a only in the alphabet of A

2

=⇒ asynchronized

Riferimenti

Documenti correlati

Deadend states: reachable states which do not allow to proceed along a refinement of the abstract counter-example. Bad states: un-reachable states which allow to proceed along

Some exampes displayed in these slides are taken from [Clarke, Grunberg &amp; Peled, “Model Checking”, MIT Press], and their copyright is detained by the authors?. All the

3 Symbolic Reachability for Timed Systems Making the state space finite.. Region automata

5 Symbolic Reachability for Hybrid Systems Multi-Rate and Rectangular Hybrid Automata Linear Hybrid

=⇒ Substantially, add one initial state, move labels from states to incoming edges, set fair states as accepting states.. The Main Problem of M.C.: State

=⇒ It is reasonable enough to assume the protocol suitable under the condition that each user is infinitely often outside the restroom.. Such a condition is called

Various techniques: Bounded Model Checking (BMC), K-induction, Interpolant-based, IC3/PDR,..... SAT-based Bounded Model Checking

satisfiability of the Boolean formulas is checked by a SAT solver can manage complex formulae on several 100K variables returns satisfying assignment (i.e., a counter-example)