Title: Untimed systems ?????(??????)
1??????????????
2 ??
- ???????
- Untimed systems ?????(??????)
- Untimed systems ?????(????LTL)
- ?????????(?????)
- ?????????(????)
- ?????????(????)
- ??????UPPAAL??
- ?????????????
3?? ??????????
- ?????
- ????????????????????????????????????
- 1. ????????????????(???????????????)
- 2. ?????????????(??????)
- 3. ?????????????
4Untimed systems ????(1)
- ????(Transition Systems)
- (Q,Q0, T ),
- ??Q?????,Q0?Q??????,
- T ? Q?Q?????.
- ????
- (??)????q0,q1,q2,.., ??
- (1)q0? Q0
- (2) ????i?0?, (qi, q(i1))?T .
5??1 ????
- (Q,Q0,T )
- Qon, off
- Q0 on
- T(on,on),(on,off), (off,on),(off,off)
- ????
- On,on,off,..,
- On, off,.
- ???on??,???on?off?????.
6Untimed systems ????(2)
- ??????(Labeled Transition Systems, LTS )
- (Q, Q0, ?, T ) ??
- Q ?????, Q0?Q??????,
- S ?????? ????(???), ???????????????,
- T? Q?S ?Q?????.
(??)????
??q0? Q0, ????????i ? (qi, ai , q(i1))?T
7??2 ??????
- (Q,Q0,?,T )
- Qon, off, Q0 on,
- ?a, b (??a ??????, b ??????)
- T(on,a,on),(on,b,off), (off,a,on),(off,b,off)
- ????
8Untimed systems ????(3)
- ?-automata (????????????)
- Büchi automata(Q,Q0,?,T,F), ??
- Q???????,
- Q0 ?Q??????,
- S ????????,
- T? Q ? S ? Q?????
- F ? Q?????.
- ???? F ???????????????.
-
9??3 Büchi automata
- (Q,Q0,?,T,F)
- Qon, off, Q0 on, ?a, b,
- T(on,a,on),(on,b,off), (off,a,on),(off,b,off)
- Foff
- ???? (??off??????)
- ??
- ???
10Untimed systems ????
- ????(Temporal Logic )
- ?????????????
- ??????(LTL, Linear Temporal Logic )
- ?????? CTL(Computation Tree Logic), (??)
- ?-?? (??)
11LTL ??
- ?P??????,LTL?????????
- ? p (?) (??/\ ?) ??(??\/
?)??????????????????(????)??(????) (O ?) - ??,p?P?
- ???????? always, forever
- ?????? eventually, sometimes
- O ?????nexttime
12LTL ??
- ????
- ltgtp p ?????????.
-
- p ??????, p????.
- Op p???????
p
p
p
p
p
p
p
p
p
p
p
13?LTL????????
- ??? p
- ??? ltgtp
- ??? (p ? ltgtq)
- (?)??? ltgtp ? ltgtq
- (?)??? ltgt p ? ltgtq
- ltgtp --- p??????
- ltgtp --- ??????, p?????
14?LTL???????? ?
?????????,?????? 1).????????,???????
(door_open /\ moving) 2). ??i?????????.
(elevator_atj /\ request_fori /\ i?j ? ltgt
(elevator_ati /\door_open))
15??????
?M???(??)??, ? ???LTL?? ?M ????????????,
????M?????, ?? M ? .
16?????????
- ?????????
- ?????(Timed Automata)
- Timed transition systems,
- Timed CSP, ?
- ????
- ???? TCTL(Timed Computation Tree Logic,
MTL(Metric Temporal Logic), DC(Duration
Calculus)? - ????
- ????????????
17?????(Timed Automata)
- Timed Automata ?-automata clocks
- Clocks ????, ????????????,?????????
- ????
- 1. ???? ?????????
- 2. ???? ?????????
-
18??1???
??????
19??2????
- ??????off??,??????,???light??,???????????brigh
t??. - ??????? 3????????.
20????? ????
- Locations
- Initial locations
- Clocks x, y, z,
-
21????? ????
22????? ????
- Clock constraints
- Location invariants
- States
23????? ????
g ?????, a ?????, ? ?????????????.
24????
n
xlt5
xlt5 ? ygt3
a
x 0
1. Discrete transitions
m
a
( n , x2.4 , y3.5 ) ( m , x0 ,
y3.5 )
ylt10
2. Delay transitions
1.1
( n , x2.4 , y3. 5 ) ( n , x3.5
, y4.6 )
?????
25?????(TA) ??
- ??. A timed automaton A is a tuple ltL,L0,?,
X,I,Egt, where - 1). L is a finite set of locations,
- 2). L0 ? L is a set of initial locations,
- 3). ? is a finite set of synchronization
labels, - 4). X is a finite set of clocks,
- 5). I L?C(X) is a mapping from locations to
clock constraints, and - 6). E?L?C(X) ?? ?P (X) ? L is the set of
transitions.
26?????
- Loff,on, L0off, ?press, Xx
- Ioff ? true, on?xlt2
- E(off,true,press,x,on),(on,x2, ?,?,off)
27????? (????)??
- ??. ? ???TA,
A???????????LTS
T??????????
-- Delay transitions
-- Discrete transitions
28??-??
29??????????
?
(i1,2)????????,? ?
?????????????
30???????????
31?????????
- ????
- ????????p??,?q??2?????????
- ????????p??,?q?2???????????
- ..
32?????????
- ?????????????????
- ?????????
- ?
- ??(??)????T,??(???)??????
- ??freeze??
- ????????
33MTL??
MTL(Metric Temporal Logic) ????????
??p???????,I?????(? 1,2, (1,2, (1,2), (1,
?), 2, ?)??
34MITL??
35????????
- ?? ??????M????? ? ,???? ?????
-
- ????(Model Checking)
- ????????(??????)?
36????
37????????
??????
38Region equivalence
- ????????????????(regions)
y
x
39Region equivalence
Run (n,(0,0))? (n,(0.1,0.1)) ? (n,(1,1))
?(n,(1.2, 1.2)) ?(m,(1.2, 0)) ?(m,(1.5,0.3))
?(m,(2,0.8))?(m,(2.1,0.9))
- ????(Symbolic executions)
- (x0?y0)?(0ltxylt1 )
- ?(xy1)?(1ltxylt2)
- ?(1ltxlt2 ? y0 )
- ?(1ltxlt2?0ltylt1?1ltx-ylt2)
- ?(x2?0ltylt1?1ltx-ylt2)
- ?(xgt2 ? 0ltylt1?1ltx-ylt2)
40Region automata
41Region automata
- ???????TA???????????
- ?? Regions????,???????
- ???????????????
- Zones??xc,x-yc(??c???,?gt,lt, ,
?,?)????????,?regions??,??zone?????regions???
42Zones
DBMs (Difference Bound Matrices)
D(x,y)(?,c), means x-y?c D(x,y)(lt,c), means
x-yltc
0 x y 0 (?,0)
(lt,-1) (?,0) x (lt,?) (?,0) (lt,1) y
(lt,2) (?,0) (?,0)
43??Zones?DBMs?????
1ltx, 1lty -2ltx-ylt3
1ltxlt4 1ltylt3
y
?? gt
n
x
x
xgt3
3ltx, 1lty -2ltx-ylt3
?? gt
a
x
y0
??y gt
3ltx, y0
m
44??DBM????????
- ????
- ???????? ??
-
- ??
- ?????
45??????????
- UPPAAL(UppsalaAalborg)
- http//www.uppaal.com/
- Kronos
- http//www-verimag.imag.fr/TEMPORISE/kronos/
- HyTech (The HYbrid TECHnology Tool)
- http//www-cad.eecs.berkeley.edu/tah/HyTech
- Red (Region Encoding Diagram)
- http//cc.ee.ntu.edu.tw/farn/red/
- PRISM (Probabilistic Symbolic Model Checker)
- http//www.cs.bham.ac.uk/dxp/prism
46UPPAAL??
- ????? urgent actions urgent locations
committed locations data-variables (with
bounded domains) arrays of data-variables
guards and assignments over data-variables and
arrays templates with local clocks,
data-variables, and constants
47UPPAAL??
- Networks of Timed Automata
48UPPAAL????
clock x1, , xn int i1, , im chan a1, ,
ao const c1 n1, , cp np ? clock x, y int i,
J0 int0,1 k5 const delay 5, true 1, false 0
?????
49UPPAAL?????
????
location invariants
n
xlt5
?? ????
xlt5 , ygt3
a
clock guards
x 0
data guards
m
ylt10
g1
g3
g2
????
50Urgent Channels
51Urgent Locations
?urgent location?????????,????????.
(s00, R00, V)?(s01, R00 ,V) ? (s01, R01,V )
?(s02, R01, V) ??
(s00, R00, V)?(s01, R00 ,V) ? (s02, R00,V )
?(s02, R00, V0.1) ??
(s00, R00, V)?(s01, R00 ,V) ? (s01,
R00,V0.1 ) ?(s01, R01, V0.1 ) ???
52Committed Locations
?committed location ?????,???????????????co
mmitted location???????? ??????????
(s1,r11,r21)?(s2,r12,r21) ? (s3,r12,r22) ??
(s1,r11,r21)? (s2,r12,r21) ? (s2,r13,r21) ?
(s3,r13,r22) ???
????????
53UPPAAL??????
- A p (AG p)
- Eltgt p (EF p)
- E p (EG p)
- Altgt p (AF p)
- p--gtq AG(p imply AFq)
- p a.l gd gc p and p
- p or p not p p imply p
- ( p )
54??????
- ???????????????????????
- ??????????
- ??(???)????????
- ?????????????????
- ??????????
near
far
far
crossing
approach
exit
controller
lower
raise
gate
55??
56?????
57??
58?????????????????
- chan approach,exit,raise,lower
- clock waiting_time
- const a 5,b 3,c 2
- //const a 5,b 4,c 2
- //const a 5,b 3,c 3
59????
- A (train.crossing imply gate.down)
- A(not gate.up imply waiting_timelt10)
60?????????
- M????????, ? ???MTL??, ????????????M? ,?
- M ? ??? M M? ??
- ?M?M??????????, M M?
?????????????.
61 62