• Ingen resultater fundet

Timed Automata

N/A
N/A
Info
Hent
Protected

Academic year: 2022

Del "Timed Automata"

Copied!
35
0
0

Indlæser.... (se fuldtekst nu)

Hele teksten

(1)

Timed Automata

Alexandre David

Aalborg University

(2)

Overview

Syntax & semantics Decidability results Regions

TCTL

(3)

Example: Dumb Light Control

WANT: if press is issued twice quickly

then the light will get brighter; otherwise the light is turned off.

Off press? Light press? Bright

press?

press?

(4)

Dumb Light Control

Off press? Light press? Bright

press?

press?

Solution: Add real-valued clock x

x:=0

x≤3

x>3

Alur & Dill 1990

(5)

Timed Automata

Off press? Light press? Bright

press?

press?

x:=0

x≤3

x>3

Alur & Dill 1990

Synchronizing action

Guard Conjunctions

of x~n x: real-

valued clock Reset

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

States:

( location , x=v) where v2R States:

( location , x=v) where v2R

(6)

Timed Automata

Off press? Light press? Bright

press?

press?

x:=0

x≤3

x>3

Alur & Dill 1990

Synchronizing action

Guard Conjunctions

of x~n x: real-

valued clock Reset

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

States:

( location , x=v) where v2R States:

( location , x=v) where v2R

(7)

Timed Automata

Off press? Light press? Bright

press?

press?

x:=0

x≤3

x>3

Alur & Dill 1990

Synchronizing action

Guard Conjunctions

of x~n x: real-

valued clock Reset

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

States:

( location , x=v) where v2R States:

( location , x=v) where v2R

(8)

Timed Automata

Off press? Light press? Bright

press?

press?

x:=0

x≤3

x>3

Alur & Dill 1990

Synchronizing action

Guard Conjunctions

of x~n x: real-

valued clock Reset

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

States:

( location , x=v) where v2R States:

( location , x=v) where v2R

(9)

Timed Automata

Off press? Light press? Bright

press?

press?

x:=0

x≤3

x>3

Alur & Dill 1990

Synchronizing action

Guard Conjunctions

of x~n x: real-

valued clock Reset

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 )

press? ( Bright , x=2.51 )

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 2.51 ( Light , x=2.51 ) press? ( Bright , x=2.51 ) States:

( location , x=v) where v2R States:

( location , x=v) where v2R

(10)

Intelligent Light Control

Off press? Light press? Bright

press?

x:=0

x≤3

x>3

Off press? Light press? Bright

press?

press?

X:=0

X<=3

X>3

x≤100 x=100

x:=0

x≤100 x=100

x:=0

x:=0

press?

x:=0

Using Invariants

x:=0

(11)

Intelligent Light Control

Off press? Light press? Bright

press?

x:=0

x≤3

x>3 x=100

x:=0

x=100 x:=0

x:=0

press?

x:=0

Using Invariants

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 4.51 ( Light , x=4.51 )

press? ( Light , x=0 )

delay 100 ( Light , x=100)

τ

( Off , x=0)

Transitions:

( Off , x=0 )

delay 4.32 ( Off , x=4.32 )

press? ( Light , x=0 )

delay 4.51 ( Light , x=4.51 )

press? ( Light , x=0 )

delay 100 ( Light , x=100)

τ

( Off , x=0)

Note:

( Light , x=0 ) delay 103 Note:

( Light , x=0 ) delay 103

X

Invariants ensures progress Invariants

ensures progress

x≤100 x:=0 x≤100

(12)

NTA: Light Controller & User

Off press? Light press? Bright

press?

x:=0

x≤3

x>3 x=100

x:=0

x=100 x:=0

x:=0

press?

x:=0

Rest Busy

y¸10

y:=0

y≤10 press!

press!

y:=0

Transitions:

( Off, Rest, x=0, y=0 )

delay 20 ( Off, Rest, x=20, y=20 ) press?! ( Light, Busy, x=0, y=0 ) delay 2 ( Light, Busy, x=2, y=2) press?! ( Bright, Rest, x=0, y=0) Transitions:

( Off, Rest, x=0, y=0 )

delay 20 ( Off, Rest, x=20, y=20 ) press?! ( Light, Busy, x=0, y=0 ) delay 2 ( Light, Busy, x=2, y=2) press?! ( Bright, Rest, x=0, y=0) Synchronization

x≤100 x:=0 x≤100

(13)

Timed Automata review

n

m a

Alur & Dill 1990

Clocks: x, y

x<=5 & y>3

x := 0

Guard

Boolean combination of integer bounds on clocks

Reset

Action performed on clocks

Transitions

( n , x =2.4 , y =3.1415 )

( n , x =3.5 , y =4.2415 ) e(1.1)

( n , x =2.4 , y =3.1415 )

( m , x =0 , y =3.1415 ) a

State

( location , x =v , y =u ) where v,u are in R

Action used

for synchronization

Discrete Trans

Delay Trans

(14)

n

m a

Clocks: x, y x<=5 & y>3

x := 0

Transitions

( n , x =2.4 , y =3.1415 )

( n , x =3.5 , y =4.2415 ) e(1.1)

( n , x =2.4 , y =3.1415 ) e(3.2) x<=5

y<=10 Location

Invariants

g1 g2 g3 g4

Timed Automata review

Invariants

Invariants ensure progress!!

Invariants

ensure

progress!!

(15)

Syntax

A TA is a tuple (L,l 0 ,E,I) where

L is a finite set of locations l 0 ∈ L is the initial location

E ⊆ L × B(C) × Act × 2 C × L is a finite set of edges, and

I : L → B’(C) assigns invariants to locations.

C is a finite set of clocks.

B(C) is the set of clock constraints defined by g,g 1 ,g 2 :: = x ⊗ n | g 1 ∧g 2

⊗ ∈ { ≤,<,=,>,≥ }

(16)

Clock Valuations

For each d∈R ≥0 , the valuation v+d is defined by

(v + d)(x) = v(x) + d for each x ∈ C delay

For each r ⊆ C, the valuation v[r] is defined by

v[r](x) = 0 if x ∈r

v[r](x) = v(x) otherwise

reset

(17)

Semantics

The time transition system T(A) generated by A=(L,l 0 ,E,I) is defined as

) ( and

) ( s.t.

all for )

, ( )

, (

) ' ( v' and ],

[ '

, s.t.

) ' (

if ) ' , ' ( )

, (

Act

I(l)}

and

) (

) , (

| ) , {(

Proc

) Lab

| Lab,

Proc, (

) (

0 ,

, 0

0

l I d v

l I v d

d v

l v

l

l I r

v v

g v

E l

l v

l v

l Lab

v C

L v

l v

l A

T

d

r a a g

+ ℜ

∈ +

=

=

×

=

⎭ ⎬

⎩ ⎨

⎧ → ∈

=

>=

>=

>=

α α

and time is continuous

(18)

TA in UPPAAL

Extended to NTA with syn. over channels.

+ urgency (urgent & committed locations, urgent channels)

+ variables

Symbolic semantics (see later).

) ], /

' , / ' [ ( )

, (

'

'

2 2

1 1

2

! 2 1

! 1

v l

l l l

l v

l

l l

l l

a a

→ α

→ (simplified, g,a,r missing)

(19)

Decidability?

Reachable?

a b

c

OBSTACLE:

Uncountable infinite

state space

(20)

Reachable States

(21)

TAB

(22)

States → Equivalence Classes

(23)
(24)

x y

An equivalence class (i.e. a region )

in fact there is only a finite number of regions!!

1 2 3

1 2

Regions

Finite Partitioning of State Space

(25)

Complexity

n=|C|

(26)

States ↔ Regions

(27)

x y

An equivalence class (i.e. a region )

Successor regions, Succ(r) r

1 2 3

1 2

Regions

Successor Operation (wrt delay)

(28)

x y

An equivalence class (i.e. a region ) r {x}r

{y}r r

Reset regions

1 2 3

1 2

Regions

Reset Operation

(29)

An Example Region Graph

(30)
(31)

Fundamental Results

Reachability ☺ Alur, Dill Trace-inclusion Alur, Dill

Timed ; Untimed ☺

Bisimulation

Timed ☺ Cerans ; Untimed ☺

Model-checking ☺

TCTL, T mu , L nu ,...

PS PA CE -c

PSP ACE -c / EXP TIME -c

(32)

Updatable Timed Automata

Patricia Bouyer, Catherine Dufourd, Emmanuel Fleury, Antoine Petit

W Diagonals

W Diagonals

(33)

TCTL = CTL + Time

φ α

in z

clocks formula

D z

ns propositio automic

AP p

, ,

, ,

“freeze operator” introduces new formula clock z

E[ φ U φ ], A[ φ U φ ] - like in CTL No EX φ

constraints over formula clocks and automata clocks

(34)

Derived Operators

Along any path φ holds continuously until within 7 time units ψ becomes valid.

=

=

The property φ becomes valid within 5 time units.

(35)

Timeliness Properties

receive(m) occurs within 5 time units after send(m)

receive(m) occurs exactly 11 time units after send(m)

putbox occurs periodically (exactly) every 25 time units

(note: other putbox’s may occur in between)

Referencer

RELATEREDE DOKUMENTER

Larsen and Jaco van de Pol: Multi-Core Emptiness Checking of Timed Buchi Automata using Inclusion Abstraction In Proceedings of the 25th International Conference on Computer

Headway time (short headways) ≈ travel time  Waiting time factor 2 Note: Multipliers do not apply to business travel VTT in the same way.. Effect of

• Project case study: Gas Burner Sørensen Ravn Rischel Intervals properties.. Timed Automata, Real-time Logic, Metric Temporal Logic, Explicit

We now aim at using test automata to determine whether a given timed automaton weakly satisfies a formula in L. As already mentioned, this approach to model checking for timed

The notion of semantic prosody (or pragmatic meaning) is that a given word or phrase may occur most frequently in the context of other words or phrases which are

a person reacts to what he thinks the other person is perceiving, feeling and thinking, in addition to what the other person may be doing (Heider, 1958: 1).. Note that this concept

In Uppaal , we use finite–state automata extended with clock and data variables to describe processes and networks of such automata to describe real–time systems..

There is a symbolic iterative algorithm to compute the set W* of winning states for timed games.. „ [Henziger &amp;