Basics of Linear Temporal Properties
Robert B. France
1
Basics of Linear Temporal Properties Robert B. France 1 State vs - - PowerPoint PPT Presentation
Basics of Linear Temporal Properties Robert B. France 1 State vs action view Action view abstracts out states; focus only on action labels State view: focus only on states and the propositions that are true in states 2
1
2
3
– G(TS) is obtained by omitting all atomic propositions in states, and all action labels. – Initial states are not distinguished in a state graph – Multiple transitions between two states are represented by one edge in a state graph
4
5
Post(Pay) = { Select} ; Post(Select) = { Soda, Error} Post* (Pay) = { Select, Error, Soda, Pay} ; Post* (Error) = { } Post* ({ Soda, Error} ) = { Select, Error, Soda, Pay}
– Can be finite or infinite – A maximal path fragment is a path that cannot be prolonged, i.e., it is either infinite or ends in a state, sfinal, in which Post(sfinal) is empty (terminal state) – A path is initial if its first state is an initial state
6
7
An initial finite fragment: Pay, Select, Soda, Pay, Select An infinite fragment that is not initial: Select, Soda, Pay, Select, Soda, … A finite path: Pay, Select, Soda, Pay, Select, Error An infinite path: Pay, Select, Soda, Pay, Select, Soda, Pay, …
system
transitions.
– For example, s0-act1->s1, s1-act2->s3, is written as an alternating sequence of states and actions that ends in a state, s0,act1,s1,act2,s3
transitions
fragment that ends in a final state, or an infinite execution fragment.
– An execution fragment is called initial if it starts in an initial state.
execution fragment
8
9
An execution: Pay, comp, Select, dispense_soda, Soda, get_soda, Pay, …
10
11
An execution: Pay, comp, Select, dispense_soda, Soda, get_soda, Pay, insert_coin, Select, dispense_soda, Soda, door_err, Error The corresponding trace: { } ,{ paid} ,{ paid,dispensed} ,{ } ,{ paid} ,{ paid,dispensed} ,{ paid,error}
12
13
– Set of model traces is a subset of the set of property traces
14
15
– AP = { red1, green1, red2, green2}
– A0 A1 A2 . . . over 2AP, such that green1∈ Ai holds for infinitely many i. – Example trace in LT1: {green1},{red1,green1,green2},{red1,green1},{red2,green},{red2, green2,green1,red1}, …
– A0 A1 A2 . . . such that either not(green1 ∈Ai ) or not(green2 ∈Ai), for all i ≥ 0. – Example trace in LT2: {red1,green1,red2},{red1},{red2,red1},{green2},{green2,red2},{gr een1}, …
16
– Pfinwait = set of infinite words A0 A1 A2 . . . such that∀j.waiti ∈ Aj ⇒ ∃k ≥ j.criti ∈ Ak for each i ∈ {1, 2 }
– Pnostarve = set of infinite words A0 A1 A2 . . . such that: (∀k ≥
∈ {1, 2 } – In abbreviated form we write: ∃∞ j. waiti ∈ Aj ⇒∃∞ j. criti ∈ Aj for each i ∈ {1, 2 }, where ∃∞ stands for “there are infinitely many”.
17
18
19
– e.g., Always at most one process is in its critical section (the bad thing – two or more processes in critical section)
– An invariant property is true in all states that are reachable from an initial state – e.g., only one process can be in its critical state in any state, i.e., Φ = not crit1 ∨ not crit2 is true in every state
20
21
22
23
24
25
26
– Tracesfin (TS) ⊆ Tracesfin (TS’) – For any safety property Psafe : TS’ |= Psafe implies TS |= Psafe
27
subset of Tracesfin(TS’)
28
TS (finite transition system) TS’ (infinite transition system)
29
30
31
32
33
34
while it is in its wait state
35
36
while it is in its wait state
– Refine model to resolve non-deterministic behaviors
– Unconditional fairness (impartiality): e.g., a process can execute infinitely often – Strong fairness (compassion): e.g., a process that is enabled infinitely often gets its turn to execute infinitely
– Weak fairness (justice): e.g., a process that is continuously enabled after a certain time, gets its turn to execute infinitely often
37
– Act(s) is the set of actions that are executable in state s
– ∀∞ j : For nearly all j, i.e., for all, except for finitely many j
38
39
A = { enter2} : Is the above uncoditionally A-fair, strongly A-fair, weakly A-fair for the infinite fragment shown in dashed lines? What about the trace shown in dotted lines?
40
41