sfm 11 connect summer school bertinoro june 2011 eu fp7

SFM-11:CONNECT Summer School, Bertinoro, June 2011 EU-FP7: CONNECT - PowerPoint PPT Presentation

SFM-11:CONNECT Summer School, Bertinoro, June 2011 EU-FP7: CONNECT LSCITS/PSS VERIWARE Overview Lecture 1 (9am-11am) Introduction to Modelling and Quantitative Verification Marta Kwiatkowska Invited lecture: Christel


  1. Probability space - Example β€’ Paths where sending fails the first time 1 βˆ’ Ο‰ = s 0 s 1 s 2 {fail} βˆ’ C( Ο‰ ) = all paths starting s 0 s 1 s 2 … s 2 0.01 {try} βˆ’ P s0 ( Ο‰ ) = P(s 0 ,s 1 ) Β· P(s 1 ,s 2 ) s 0 s 1 1 0.98 = 1 Β· 0.01 = 0.01 1 s 3 βˆ’ Pr s0 (C( Ο‰ )) = P s0 ( Ο‰ ) = 0.01 {succ} 0.01 β€’ Paths which are eventually successful and with no failures βˆ’ C(s 0 s 1 s 3 ) βˆͺ C(s 0 s 1 s 1 s 3 ) βˆͺ C(s 0 s 1 s 1 s 1 s 3 ) βˆͺ … βˆ’ Pr s0 ( C(s 0 s 1 s 3 ) βˆͺ C(s 0 s 1 s 1 s 3 ) βˆͺ C(s 0 s 1 s 1 s 1 s 3 ) βˆͺ … ) = P s0 (s 0 s 1 s 3 ) + P s0 (s 0 s 1 s 1 s 3 ) + P s0 (s 0 s 1 s 1 s 1 s 3 ) + … = 1Β·0.98 + 1Β·0.01Β·0.98 + 1Β·0.01Β·0.01Β·0.98 + … = 0.9898989898… = 98/99 23

  2. Overview (Part 2) β€’ Discrete-time Markov chains (DTMCs) β€’ PCTL: A temporal logic for DTMCs β€’ PCTL model checking β€’ Other properties: LTL, costs and rewards β€’ Case study: Bluetooth device discovery 24

  3. PCTL β€’ Temporal logic for describing properties of DTMCs βˆ’ PCTL = Probabilistic Computation Tree Logic [HJ94] βˆ’ essentially the same as the logic pCTL of [ASB+95] β€’ Extension of (non-probabilistic) temporal logic CTL βˆ’ key addition is probabilistic operator P βˆ’ quantitative extension of CTL’s A and E operators β€’ Example βˆ’ send β†’ P β‰₯ 0.95 [ true U ≀ 10 deliver ] βˆ’ β€œif a message is sent, then the probability of it being delivered within 10 steps is at least 0.95” 25

  4. PCTL syntax ψ is true with β€’ PCTL syntax: probability ~p βˆ’ Ο† ::= true | a | Ο† ∧ Ο† | Β¬ Ο† | P ~p [ ψ ] (state formulas) βˆ’ ψ ::= X Ο† | Ο† U ≀ k Ο† | Ο† U Ο† (path formulas) β€œbounded β€œnext” β€œuntil” until” βˆ’ where a is an atomic proposition, used to identify states of interest, p ∈ [0,1] is a probability, ~ ∈ {<,>, ≀ , β‰₯ }, k ∈ β„• β€’ A PCTL formula is always a state formula βˆ’ path formulas only occur inside the P operator 26

  5. PCTL semantics for DTMCs β€’ PCTL formulas interpreted over states of a DTMC βˆ’ s ⊨ Ο† denotes Ο† is β€œtrue in state s” or β€œsatisfied in state s” β€’ Semantics of (non-probabilistic) state formulas: βˆ’ for a state s of the DTMC (S,s init ,P,L): βˆ’ s ⊨ a ⇔ a ∈ L(s) βˆ’ s ⊨ Ο† 1 ∧ Ο† 2 ⇔ s ⊨ Ο† 1 and s ⊨ Ο† 2 βˆ’ s ⊨ Β¬ Ο† ⇔ s ⊨ Ο† is false 1 {fail} β€’ Examples s 2 0.01 {try} βˆ’ s 3 ⊨ succ s 0 s 1 1 0.98 βˆ’ s 1 ⊨ try ∧ Β¬fail 1 s 3 {succ} 0.01 27

  6. PCTL semantics for DTMCs β€’ Semantics of path formulas: βˆ’ for a path Ο‰ = s 0 s 1 s 2 … in the DTMC: βˆ’ Ο‰ ⊨ X Ο† ⇔ s 1 ⊨ Ο† βˆ’ Ο‰ ⊨ Ο† 1 U ≀ k Ο† 2 ⇔ βˆƒ i ≀ k such that s i ⊨ Ο† 2 and βˆ€ j<i, s j ⊨ Ο† 1 βˆ’ Ο‰ ⊨ Ο† 1 U Ο† 2 ⇔ βˆƒ k β‰₯ 0 such that Ο‰ ⊨ Ο† 1 U ≀ k Ο† 2 β€’ Some examples of satisfying paths: βˆ’ X succ {try} {succ} {succ} {succ} 1 {fail} s 1 s 3 s 3 s 3 s 2 0.01 {try} βˆ’ Β¬fail U succ s 0 s 1 1 0.98 1 s 3 {try} {try} {succ} {succ} s 0 s 1 s 1 s 3 s 3 {succ} 0.01 28

  7. PCTL semantics for DTMCs β€’ Semantics of the probabilistic operator P βˆ’ informal definition: s ⊨ P ~p [ ψ ] means that β€œthe probability, from state s, that ψ is true for an outgoing path satisfies ~p” βˆ’ example: s ⊨ P <0.25 [ X fail ] ⇔ β€œthe probability of atomic proposition fail being true in the next state of outgoing paths from s is less than 0.25” βˆ’ formally: s ⊨ P ~p [ ψ ] ⇔ Prob(s, ψ ) ~ p βˆ’ where: Prob(s, ψ ) = Pr s { Ο‰ ∈ Path(s) | Ο‰ ⊨ ψ } βˆ’ (sets of paths satisfying ψ are always measurable [Var85]) Β¬ ψ s ψ Prob(s, ψ ) ~ p ? 29

  8. More PCTL… β€’ Usual temporal logic equivalences: βˆ’ false ≑ Β¬true (false) βˆ’ Ο† 1 ∨ Ο† 2 ≑ Β¬(Β¬ Ο† 1 ∧ Β¬ Ο† 2 ) (disjunction) βˆ’ Ο† 1 β†’ Ο† 2 ≑ Β¬ Ο† 1 ∨ Ο† 2 (implication) βˆ’ F Ο† ≑ β—Š Ο† ≑ true U Ο† (eventually, β€œfuture”) βˆ’ G Ο† ≑ β–‘ Ο† ≑ Β¬(F Β¬ Ο† ) (always, β€œglobally”) βˆ’ bounded variants: F ≀ k Ο† , G ≀ k Ο† β€’ Negation and probabilities βˆ’ e.g. Β¬P >p [ Ο† 1 U Ο† 2 ] ≑ P ≀ p [ Ο† 1 U Ο† 2 ] βˆ’ e.g. P >p [ G Ο† ] ≑ P <1-p [ F Β¬ Ο† ] 30

  9. Qualitative vs. quantitative properties β€’ P operator of PCTL can be seen as a quantitative analogue of the CTL operators A (for all) and E (there exists) β€’ A PCTL property P ~p [ ψ ] is… βˆ’ qualitative when p is either 0 or 1 {heads} βˆ’ quantitative when p is in the range (0,1) 1 s 1 0.5 β€’ P >0 [ F Ο† ] is identical to EF Ο† 1 s 0 βˆ’ there exists a finite path to a Ο† -state s 2 0.5 {tails} β€’ P β‰₯ 1 [ F Ο† ] is (similar to but) weaker than AF Ο† βˆ’ e.g. AF β€œtails” (CTL) β‰  P β‰₯ 1 [ F β€œtails” ] (PCTL) 31

  10. Quantitative properties β€’ Consider a PCTL formula P ~p [ ψ ] βˆ’ if the probability is unknown, how to choose the bound p? β€’ When the outermost operator of a PTCL formula is P βˆ’ we allow the form P =? [ ψ ] βˆ’ β€œwhat is the probability that path formula ψ is true?” β€’ Model checking is no harder: compute the values anyway β€’ Useful to spot patterns, trends β€’ Example βˆ’ P =? [ F err/total>0.1 ] βˆ’ β€œwhat is the probability 
 that 10% of the NAND 
 gate outputs are erroneous?” 32

  11. Some real PCTL examples reliability β€’ NAND multiplexing system βˆ’ P =? [ F err/total>0.1 ] βˆ’ β€œwhat is the probability that 10% of the NAND gate outputs are erroneous?” performance β€’ Bluetooth wireless communication protocol βˆ’ P =? [ F ≀ t reply_count=k ] βˆ’ β€œwhat is the probability that the sender has received k acknowledgements within t clock-ticks?” fairness β€’ Security: EGL contract signing protocol βˆ’ P =? [ F (pairs_a=0 & pairs_b>0) ] βˆ’ β€œwhat is the probability that the party B gains an unfair advantage during the execution of the protocol?” 33

  12. Overview (Part 2) β€’ Discrete-time Markov chains (DTMCs) β€’ PCTL: A temporal logic for DTMCs β€’ PCTL model checking β€’ Other properties: LTL, costs and rewards β€’ Case study: Bluetooth device discovery 34

  13. PCTL model checking for DTMCs β€’ Algorithm for PCTL model checking [CY88,HJ94,CY95] βˆ’ inputs: DTMC D=(S,s init ,P,L), PCTL formula Ο† βˆ’ output: Sat( Ο† ) = { s ∈ S | s ⊨ Ο† } = set of states satisfying Ο† β€’ What does it mean for a DTMC D to satisfy a formula Ο† ? βˆ’ sometimes, want to check that s ⊨ Ο† βˆ€ s ∈ S, i.e. Sat( Ο† ) = S βˆ’ sometimes, just want to know if s init ⊨ Ο† , i.e. if s init ∈ Sat( Ο† ) β€’ Sometimes, focus on quantitative results βˆ’ e.g. compute result of P=? [ F error ] βˆ’ e.g. compute result of P=? [ F ≀ k error ] for 0 ≀ k ≀ 100 35

  14. PCTL model checking for DTMCs β€’ Basic algorithm proceeds by induction on parse tree of Ο† βˆ’ example: Ο† = (Β¬fail ∧ try) β†’ P >0.95 [ Β¬fail U succ ] β€’ For the non-probabilistic operators: βˆ’ Sat(true) = S β†’ βˆ’ Sat(a) = { s ∈ S | a ∈ L(s) } βˆ’ Sat(Β¬ Ο† ) = S \ Sat( Ο† ) ∧ P >0.95 [ Β· U Β· ] βˆ’ Sat( Ο† 1 ∧ Ο† 2 ) = Sat( Ο† 1 ) ∩ Sat( Ο† 2 ) β€’ For the P ~p [ ψ ] operator Β¬ try Β¬ succ βˆ’ need to compute the 
 probabilities Prob(s, ψ ) 
 fail fail for all states s ∈ S βˆ’ focus here on β€œuntil” 
 case: ψ = Ο† 1 U Ο† 2 36

  15. PCTL until for DTMCs β€’ Computation of probabilities Prob(s, Ο† 1 U Ο† 2 ) for all s ∈ S β€’ First, identify all states where the probability is 1 or 0 βˆ’ S yes = Sat(P β‰₯ 1 [ Ο† 1 U Ο† 2 ]) βˆ’ S no = Sat(P ≀ 0 [ Ο† 1 U Ο† 2 ]) β€’ Then solve linear equation system for remaining states β€’ We refer to the first phase as β€œprecomputation” βˆ’ two algorithms: Prob0 (for S no ) and Prob1 (for S yes ) βˆ’ algorithms work on underlying graph (probabilities irrelevant) β€’ Important for several reasons βˆ’ reduces the set of states for which probabilities must be computed numerically (which is more expensive) βˆ’ gives exact results for the states in S yes and S no (no round-off) βˆ’ for P ~p [Β·] where p is 0 or 1, no further computation required 37

  16. PCTL until - Linear equations β€’ Probabilities Prob(s, Ο† 1 U Ο† 2 ) can now be obtained as the unique solution of the following set of linear equations: βˆ’ can be reduced to a system in |S ? | unknowns instead of |S| where S ? = S \ (S yes βˆͺ S no ) β€’ This can be solved with (a variety of) standard techniques βˆ’ direct methods, e.g. Gaussian elimination βˆ’ iterative methods, e.g. Jacobi, Gauss-Seidel, … 
 (preferred in practice due to scalability) 38

  17. PCTL until - Example β€’ Example: P >0.8 [Β¬a U b ] 1 0.3 a 0.6 1 3 5 0.3 0.7 0.4 0.1 0.1 b 0 2 4 0.9 0.5 1 0.1 39

  18. PCTL until - Example β€’ Example: P >0.8 [Β¬a U b ] S no = Sat(P ≀ 0 [Β¬a U b ]) 1 0.3 a 0.6 1 3 5 S yes = 0.3 0.7 0.4 0.1 0.1 Sat(P β‰₯ 1 [Β¬a U b ]) b 0 2 4 0.9 0.5 1 0.1 40

  19. PCTL until - Example β€’ Example: P >0.8 [Β¬a U b ] S no = Sat(P ≀ 0 [Β¬a U b ]) β€’ Let x s = Prob(s, Β¬a U b) 1 0.3 a 0.6 β€’ Solve: 1 3 5 S yes = 0.3 0.7 0.4 0.1 0.1 Sat(P β‰₯ 1 [Β¬a U b ]) x 4 = x 5 = 1 b 0 2 4 x 1 = x 3 = 0 0.9 0.5 1 0.1 x 0 = 0.1x 1 +0.9x 2 = 0.8 x 2 = 0.1x 2 +0.1x 3 +0.3x 5 +0.5x 4 = 8/9 Prob(Β¬a U b) = x = [0.8, 0, 8/9, 0, 1, 1] Sat(P >0.8 [ Β¬a U b ]) = { s 2 ,s 4 ,s 5 } 41

  20. PCTL model checking - Summary β€’ Computation of set Sat( Ξ¦ ) for DTMC D and PCTL formula Ξ¦ βˆ’ recursive descent of parse tree βˆ’ combination of graph algorithms, numerical computation β€’ Probabilistic operator P: βˆ’ X Ξ¦ : one matrix-vector multiplication, O(|S| 2 ) βˆ’ Ξ¦ 1 U ≀ k Ξ¦ 2 : k matrix-vector multiplications, O(k|S| 2 ) βˆ’ Ξ¦ 1 U Ξ¦ 2 : linear equation system, at most |S| variables, O(|S| 3 ) β€’ Complexity: βˆ’ linear in | Ξ¦ | and polynomial in |S| 42

  21. Overview (Part 2) β€’ Discrete-time Markov chains (DTMCs) β€’ PCTL: A temporal logic for DTMCs β€’ PCTL model checking β€’ Other properties: LTL, costs and rewards β€’ Case study: Bluetooth device discovery 43

  22. Limitations of PCTL β€’ PCTL, although useful in practice, has limited expressivity βˆ’ essentially: probability of reaching states in X, passing only through states in Y (and within k time-steps) β€’ More expressive logics can be used, for example: βˆ’ LTL [Pnu77] – (non-probabilistic) linear-time temporal logic βˆ’ PCTL* [ASB+95,BdA95] - which subsumes both PCTL and LTL βˆ’ both allow path operators to be combined βˆ’ (in PCTL, P ~p […] always contains a single temporal operator) β€’ Another direction: extend DTMCs with costs and rewards… 44

  23. LTL - Linear temporal logic β€’ LTL syntax (path formulae only) βˆ’ ψ ::= true | a | ψ ∧ ψ | Β¬ ψ | X ψ | ψ U ψ βˆ’ where a ∈ AP is an atomic proposition βˆ’ usual equivalences hold: F Ο† ≑ true U Ο† , G Ο† ≑ Β¬(F Β¬ Ο† ) βˆ’ evaluated over paths of a model β€’ Examples βˆ’ (F tmp_fail 1 ) ∧ (F tmp_fail 2 ) βˆ’ β€œboth servers suffer temporary failures at some point” βˆ’ GF ready βˆ’ β€œthe server always eventually returns to a ready-state” βˆ’ FG error βˆ’ β€œan irrecoverable error occurs” βˆ’ G (req β†’ X ack) βˆ’ β€œrequests are always immediately acknowledged” 45

  24. LTL for DTMCs β€’ Same idea as PCTL: probabilities of sets of path formulae βˆ’ for a state s of a DTMC and an LTL formula ψ : βˆ’ Prob(s, ψ ) = Pr s { Ο‰ ∈ Path(s) | Ο‰ ⊨ ψ } βˆ’ all such path sets are measurable [Var85] β€’ A (probabilistic) LTL specification often comprises 
 an LTL (path) formula and a probability bound βˆ’ e.g. P β‰₯ 1 [ GF ready ] – β€œwith probability 1, the server always eventually returns to a ready-state” βˆ’ e.g. P <0.01 [ FG error ] – β€œwith probability at most 0.01, an irrecoverable error occurs” β€’ PCTL* subsumes both LTL and PCTL βˆ’ e.g. P >0.5 [ GF crit 1 ] ∧ P >0.5 [ GF crit 2 ] 46

  25. Fundamental property of DTMCs β€’ Strongly connected component (SCC) βˆ’ maximally strongly connected set of states β€’ Bottom strongly connected component (BSCC) βˆ’ SCC T from which no state outside T is reachable from T 0.5 β€’ Fundamental property of DTMCs: 0.25 s 1 βˆ’ β€œwith probability 1, 
 s 0 s 2 0.5 a BSCC will be reached 
 0.5 and all of its states 
 0.25 1 1 visited infinitely often” s 4 s 5 s 3 1 1 β€’ Formally: βˆ’ Pr s { Ο‰ ∈ Path(s) | βˆƒ i β‰₯ 0, βˆƒ BSCC T such that 
 βˆ€ j β‰₯ i Ο‰ (i) ∈ T and 
 βˆ€ s’ ∈ T Ο‰ (k) = s' for infinitely many k } = 1 47

  26. LTL model checking for DTMCs β€’ Steps for model checking LTL property ψ on DTMC D βˆ’ i.e. computing Prob D (s, ψ ) β€’ 1. Build a deterministic Rabin automaton (DRA) A for ψ βˆ’ i.e. a DRA A over alphabet 2 AP accepting ψ -satisfying traces β€’ 2. Build the β€œproduct” DTMC D βŠ— A βˆ’ records state of A for path through D so far β€’ 3. Identify states T acc in β€œaccepting” BSCCs of D βŠ— A βˆ’ i.e. those that meet the acceptance condition of A β€’ 4. Compute probability of reaching T acc in D βŠ— A βˆ’ which gives Prob D (s, ψ ), as required 48

  27. Example: LTL for DTMCs DTMC D DRA A ψ for ψ = GΒ¬b ∧ GF a {b} {a} a ∧ Β¬b 0.1 0.5 s 0 s 1 s 2 q 0 q 1 a ∧ Β¬b 0.6 0.2 0.3 0.1 Β¬a ∧ Β¬b 1 b 0.3 b Β¬a ∧ Β¬b 0.9 1 q 2 Acc ={ ({},{q 1 }) } s 3 s 4 s 5 true 1 {a} {a} Product DTMC D βŠ— A ψ Prob D (s, ψ ) 0.1 0.5 s 0 q 0 s 1 q 2 s 2 q 2 = Prob D βŠ— A ψ (F T 1 ) 0.6 0.2 T 1 T 2 0.3 0.1 = 3/4. 0.3 1 0.9 1 1 s 4 q 0 s 4 q 2 s 3 q 1 s 3 q 2 s 5 q 2 T 3 {k 1 } 1 1 49

  28. Costs and rewards β€’ We augment DTMCs with rewards (or, conversely, costs) βˆ’ real-valued quantities assigned to states and/or transitions βˆ’ these can have a wide range of possible interpretations β€’ Some examples: βˆ’ elapsed time, power consumption, size of message queue, number of messages successfully delivered, net profit, … β€’ Costs? or rewards? βˆ’ mathematically, no distinction between rewards and costs βˆ’ when interpreted, we assume that it is desirable to minimise costs and to maximise rewards βˆ’ we will consistently use the terminology β€œrewards” regardless 50

  29. Reward-based properties β€’ Properties of DTMCs augmented with rewards βˆ’ allow a wide range of quantitative measures of the system βˆ’ basic notion: expected value of rewards βˆ’ formal property specifications will be in an extension of PCTL β€’ More precisely, we use two distinct classes of property… β€’ Instantaneous properties βˆ’ the expected value of the reward at some time point β€’ Cumulative properties βˆ’ the expected cumulated reward over some period 51

  30. DTMC reward structures β€’ For a DTMC (S,s init ,P,L), a reward structure is a pair ( ρ , ΞΉ ) βˆ’ ρ : S β†’ ℝ β‰₯ 0 is the state reward function (vector) βˆ’ ΞΉ : S Γ— S β†’ ℝ β‰₯ 0 is the transition reward function (matrix) β€’ Example (for use with instantaneous properties) βˆ’ β€œsize of message queue”: ρ maps each state to the number of jobs in the queue in that state, ΞΉ is not used β€’ Examples (for use with cumulative properties) βˆ’ β€œtime-steps”: ρ returns 1 for all states and ΞΉ is zero (equivalently, ρ is zero and ΞΉ returns 1 for all transitions) βˆ’ β€œnumber of messages lost”: ρ is zero and ΞΉ maps transitions corresponding to a message loss to 1 βˆ’ β€œpower consumption”: ρ is defined as the per-time-step energy consumption in each state and ΞΉ as the energy cost of each transition 52

  31. PCTL and rewards β€’ Extend PCTL to incorporate reward-based properties βˆ’ add an R operator, which is similar to the existing P operator expected reward is ~r βˆ’ Ο† ::= … | P ~p [ ψ ] | R ~r [ I =k ] | R ~r [ C ≀ k ] | R ~r [ F Ο† ] β€œinstantaneous” β€œcumulative” β€œreachability” βˆ’ where r ∈ ℝ β‰₯ 0 , ~ ∈ {<,>, ≀ , β‰₯ }, k ∈ β„• β€’ R ~r [ Β· ] means β€œthe expected value of Β· satisfies ~r” 53

  32. Types of reward formulas β€’ Instantaneous: R ~r [ I =k ] βˆ’ β€œthe expected value of the state reward at time-step k is ~r” βˆ’ e.g. β€œthe expected queue size after exactly 90 seconds” β€’ Cumulative: R ~r [ C ≀ k ] βˆ’ β€œthe expected reward cumulated up to time-step k is ~r” βˆ’ e.g. β€œthe expected power consumption over one hour” β€’ Reachability: R ~r [ F Ο† ] βˆ’ β€œthe expected reward cumulated before reaching a state satisfying Ο† is ~r” βˆ’ e.g. β€œthe expected time for the algorithm to terminate” 54

  33. Reward formula semantics β€’ Formal semantics of the three reward operators βˆ’ based on random variables over (infinite) paths β€’ Recall: βˆ’ s ⊨ P ~p [ ψ ] ⇔ Pr s { Ο‰ ∈ Path(s) | Ο‰ ⊨ ψ } ~ p β€’ For a state s in the DTMC: βˆ’ s ⊨ R ~r [ I =k ] ⇔ Exp(s, X I=k ) ~ r βˆ’ s ⊨ R ~r [ C ≀ k ] ⇔ Exp(s, X C ≀ k ) ~ r βˆ’ s ⊨ R ~r [ F Ξ¦ ] ⇔ Exp(s, X F Ξ¦ ) ~ r where: Exp(s, X) denotes the expectation of the random variable X : Path(s) β†’ ℝ β‰₯ 0 with respect to the probability measure Pr s 55

  34. Reward formula semantics β€’ Definition of random variables: βˆ’ for an infinite path Ο‰ = s 0 s 1 s 2 … βˆ’ where k Ο† =min{ j | s j ⊨ Ο† } 56

  35. Model checking reward properties β€’ Instantaneous: R ~r [ I =k ] β€’ Cumulative: R ~r [ C ≀ t ] βˆ’ variant of the method for computing bounded until probabilities βˆ’ solution of recursive equations β€’ Reachability: R ~r [ F Ο† ] βˆ’ similar to computing until probabilities βˆ’ precomputation phase (identify infinite reward states) βˆ’ then reduces to solving a system of linear equation β€’ For more details, see e.g. [KNP07a] 57

  36. Overview (Part 2) β€’ Discrete-time Markov chains (DTMCs) β€’ PCTL: A temporal logic for DTMCs β€’ PCTL model checking β€’ Other properties: LTL, costs and rewards β€’ Case study: Bluetooth device discovery 58

  37. The PRISM tool β€’ PRISM: Probabilistic symbolic model checker βˆ’ developed at Birmingham/Oxford University, since 1999 βˆ’ free, open source (GPL), runs on all major OSs β€’ Support for: βˆ’ discrete-/continuous-time Markov chains (D/CTMCs) βˆ’ Markov decision processes (MDPs) βˆ’ probabilistic timed automata (PTAs) βˆ’ PCTL, CSL, LTL, PCTL*, costs/rewards, … β€’ Multiple efficient model checking engines βˆ’ mostly symbolic (BDDs) (up to 10 10 states, 10 7 -10 8 on avg.) β€’ Successfully applied to a wide range of case studies βˆ’ communication protocols, security protocols, dynamic power management, cell signalling pathways, … β€’ See: http://www.prismmodelchecker.org/ 59

  38. Bluetooth device discovery β€’ Bluetooth: short-range low-power wireless protocol βˆ’ widely available in phones, PDAs, laptops, ... βˆ’ open standard, specification freely available β€’ Uses frequency hopping scheme βˆ’ to avoid interference (uses unregulated 2.4GHz band) βˆ’ pseudo-random selection over 32 of 79 frequencies β€’ Formation of personal area networks (PANs) βˆ’ piconets (1 master, up to 7 slaves) βˆ’ self-configuring: devices discover themselves β€’ Device discovery βˆ’ mandatory first step before any communication possible βˆ’ relatively high power consumption so performance is crucial βˆ’ master looks for devices, slaves listens for master 60

  39. Master (sender) behaviour β€’ 28 bit free-running clock CLK, ticks every 312.5Β΅s β€’ Frequency hopping sequence determined by clock: βˆ’ freq = [CLK 16-12 +k+ (CLK 4-2,0 - 
 CLK 16-12 ) mod 16] mod 32 βˆ’ 2 trains of 16 frequencies 
 (determined by offset k), 
 128 times each, swap between 
 every 2.56s β€’ Broadcasts β€œinquiry packets” on 
 two consecutive frequencies, 
 then listens on the same two 61

  40. Slave (receiver) behaviour β€’ Listens (scans) on frequencies for inquiry packets βˆ’ must listen on right frequency at right time βˆ’ cycles through frequency sequence at much slower speed (every 1.28s) 
 β€’ On hearing packet, pause, send reply and then wait for a random delay before listening for subsequent packets βˆ’ avoid repeated collisions with other slaves 62

  41. Bluetooth – PRISM model β€’ Modelled/analysed using PRISM model checker [DKNP06] βˆ’ model scenario with one sender and one receiver βˆ’ synchronous (clock speed defined by Bluetooth spec) βˆ’ model at lowest-level (one clock-tick = one transition) βˆ’ randomised behaviour so model as a DTMC βˆ’ use real values for delays, etc. from Bluetooth spec β€’ Modelling challenges βˆ’ complex interaction between sender/receiver βˆ’ combination of short/long time-scales – cannot scale down βˆ’ sender/receiver not initially synchronised, so huge number of possible initial configurations (17,179,869,184) 63

  42. Bluetooth - Results β€’ Huge DTMC – initially, model checking infeasible βˆ’ partition into 32 scenarios, i.e. 32 separate DTMCs βˆ’ on average, approx. 3.4 x 10 9 states (536,870,912 initial) βˆ’ can be built/analysed with PRISM's MTBDD engine β€’ We compute: βˆ’ R=? [ F replies=K {β€œinit”}{max} ] βˆ’ β€œworst-case expected time to hear K replies over all possible initial configurations” β€’ Also look at: βˆ’ how many initial states for each possible expected time βˆ’ cumulative distribution function (CDF) for time, assuming equal probability for each initial state 64

  43. Bluetooth - Time to hear 1 reply β€’ Worst-case expected time = 2.5716 sec βˆ’ in 921,600 possible initial states βˆ’ best-case = 635 Β΅s 65

  44. Bluetooth - Time to hear 2 replies β€’ Worst-case expected time = 5.177 sec βˆ’ in 444 possible initial states βˆ’ compare actual CDF with derived version which assumes times to reply to first/second messages are independent 66

  45. Bluetooth - Results β€’ Other results: (see [DKNP06]) βˆ’ compare versions 1.2 and 1.1 of Bluetooth, confirm 1.1 slower βˆ’ power consumption analysis (using costs + rewards) β€’ Conclusions: βˆ’ successful analysis of complex real-life model βˆ’ detailed model, actual parameters used βˆ’ exhaustive analysis: best/worst-case values β€’ can pinpoint scenarios which give rise to them β€’ not possible with simulation approaches βˆ’ model still relatively simple β€’ consider multiple receivers? β€’ combine with simulation? 67

  46. Summary (Parts 1 & 2) β€’ Probabilistic model checking βˆ’ automated quantitative verification of stochastic systems βˆ’ to model randomisation, failures, … β€’ Discrete-time Markov chains (DTMCs) βˆ’ state transition systems + discrete probabilistic choice βˆ’ probability space over paths through a DTMC β€’ Property specifications βˆ’ probabilistic extensions of temporal logic, e.g. PCTL, LTL βˆ’ also: expected value of costs/rewards β€’ Model checking algorithms βˆ’ combination of graph-based algorithms, numerical computation, automata constructions β€’ Next: Markov decision processes (MDPs) 68

  47. Part 3 Markov decision processes

  48. Overview β€’ Lectures 1 and 2: βˆ’ 1 – Introduction βˆ’ 2 – Discrete-time Markov chains βˆ’ 3 – Markov decision processes βˆ’ 4 – Compositional probabilistic verification β€’ Course materials available here: βˆ’ http://www.prismmodelchecker.org/courses/sfm11connect/ βˆ’ lecture slides, reference list, tutorial chapter, lab session 70

  49. Probabilistic models Fully probabilisti tic Nondete terministi tic Discrete-time Markov decision Discrete Di te Markov chains processes (MDPs) time ti (DTMCs) (probabilistic automata) Probabilistic timed automata (PTAs) Continuous-time Conti tinuous Markov chains time ti (CTMCs) CTMDPs/IMCs 71

  50. Overview (Part 3) β€’ Markov decision processes (MDPs) β€’ Adversaries & probability spaces β€’ Properties of MDPs: The temporal logic PCTL β€’ PCTL model checking for MDPs β€’ Case study: Firewire root contention 72

  51. Recap: Discrete-time Markov chains β€’ Discrete-time Markov chains (DTMCs) βˆ’ state-transition systems augmented with probabilities β€’ Formally: DTMC D = (S, s init , P, L) where: βˆ’ S is a set of states and s init ∈ S is the initial state βˆ’ P : S Γ— S β†’ [0,1] is the transition probability matrix βˆ’ L : S β†’ 2 AP labels states with atomic propositions βˆ’ define a probability space Pr s over paths Path s 1 {fail} β€’ Properties of DTMCs s 2 0.01 {try} βˆ’ can be captured by the logic PCTL s 0 s 1 0.98 1 1 βˆ’ e.g. send β†’ P β‰₯ 0.95 [ F deliver ] s 3 βˆ’ key question: what is the probability 
 {succ} 0.01 of reaching states T βŠ† S from state s? βˆ’ reduces to graph analysis + linear equation system 73

  52. Nondeterminism β€’ Some aspects of a system may not be probabilistic and should not be modelled probabilistically; for example: β€’ Concurrency - scheduling of parallel components βˆ’ e.g. randomised distributed algorithms - multiple probabilistic processes operating asynchronously β€’ Underspecification - unknown model parameters βˆ’ e.g. a probabilistic communication protocol designed for message propagation delays of between d min and d max β€’ Unknown environments βˆ’ e.g. probabilistic security protocols - unknown adversary 74

  53. Markov decision processes β€’ Markov decision processes (MDPs) βˆ’ extension of DTMCs which allow nondeterministic choice β€’ Like DTMCs: βˆ’ discrete set of states representing possible configurations of the system being modelled βˆ’ transitions between states occur in discrete time-steps β€’ Probabilities and nondeterminism {heads} s 2 βˆ’ in each state, a nondeterministic 
 {init} a 0.5 a 1 choice between several discrete 
 1 s 0 s 1 c 1 probability distributions over 
 a s 3 0.7 successor states b 0.5 0.3 {tails} 75

  54. Markov decision processes β€’ Formally, an MDP M is a tuple (S,s init , Ξ± , Ξ΄ ,L) where: {heads} βˆ’ S is a set of states (β€œstate space”) s 2 {init} a 0.5 βˆ’ s init ∈ S is the initial state a 1 1 s 0 s 1 c βˆ’ Ξ± is an alphabet of action labels 1 a s 3 0.7 b βˆ’ Ξ΄ βŠ† S Γ— Ξ± Γ— Dist(S) is the transition 
 0.5 0.3 probability relation, where Dist(S) is the set 
 {tails} of all discrete probability distributions over S βˆ’ L : S β†’ 2 AP is a labelling with atomic propositions β€’ Notes: βˆ’ we also abuse notation and use Ξ΄ as a function βˆ’ i.e. Ξ΄ : S β†’ 2 Ξ±Γ— Dist(S) where Ξ΄ (s) = { (a,Β΅) | (s,a,Β΅) ∈ Ξ΄ } βˆ’ we assume Ξ΄ (s) is always non-empty, i.e. no deadlocks βˆ’ MDPs, here, are identical to probabilistic automata [Segala] 76

  55. Simple MDP example β€’ A simple communication protocol βˆ’ after one step, process starts trying to send a message βˆ’ then, a nondeterministic choice between: (a) waiting a step because the channel is unready; (b) sending the message βˆ’ if the latter, with probability 0.99 send successfully and stop βˆ’ and with probability 0.01, message sending fails, restart restart {fail} 1 s 2 {try} 0.01 start send s 0 s 1 1 stop 0.99 s 3 1 wait 1 {succ} 77

  56. Example - Parallel composition 1 Asynchronous parallel 
 0.5 t 0 t 1 t 2 1 composition of two 
 0.5 3-state DTMCs 1 0.5 Action labels 
 s 0 s 0 t 0 s 0 t 1 1 s 0 t 2 0.5 omitted here 0.5 0.5 0.5 0.5 1 1 1 1 1 0.5 s 1 s 1 t 0 s 1 t 1 s 1 t 2 0.5 1 0.5 0.5 0.5 0.5 1 0.5 s 2 s 2 t 0 s 2 t 1 s 2 t 2 0.5 1 1 1 1 1 78

  57. Paths and probabilities β€’ A (finite or infinite) path through an MDP M βˆ’ is a sequence of states and action/distribution pairs βˆ’ e.g. s 0 (a 0 ,Β΅ 0 )s 1 (a 1 ,Β΅ 1 )s 2 … βˆ’ such that (a i ,Β΅ i ) ∈ Ξ΄ (s i ) and Β΅ i (s i+1 ) > 0 for all i β‰₯ 0 βˆ’ represents an execution (i.e. one possible behaviour) of the system which the MDP is modelling βˆ’ note that a path resolves both types of choices: nondeterministic and probabilistic βˆ’ Path M,s (or just Path s ) is the set of all infinite paths starting from state s in MDP M; the set of finite paths is PathFin s β€’ To consider the probability of some behaviour of the MDP βˆ’ first need to resolve the nondeterministic choices βˆ’ …which results in a DTMC βˆ’ …for which we can define a probability measure over paths 79

  58. Overview (Part 3) β€’ Markov decision processes (MDPs) β€’ Adversaries & probability spaces β€’ Properties of MDPs: The temporal logic PCTL β€’ PCTL model checking for MDPs β€’ Case study: Firewire root contention 80

  59. Adversaries β€’ An adversary resolves nondeterministic choice in an MDP βˆ’ also known as β€œschedulers”, β€œstrategies” or β€œpolicies” β€’ Formally: βˆ’ an adversary Οƒ of an MDP is a function mapping every finite path Ο‰ = s 0 (a 0 ,Β΅ 0 )s 1 ...s n to an element of Ξ΄ (s n ) β€’ Adversary Οƒ restricts the MDP to certain paths βˆ’ Path s Οƒ βŠ† Path s Οƒ and PathFin s Οƒ βŠ† PathFin s Οƒ β€’ Adversary Οƒ induces a probability measure Pr s Οƒ over paths βˆ’ constructed through an infinite state DTMC (PathFin s Οƒ , s, P s Οƒ ) βˆ’ states of the DTMC are the finite paths of Οƒ starting in state s βˆ’ initial state is s (the path starting in s of length 0) βˆ’ P s Οƒ ( Ο‰ , Ο‰ ’)=Β΅(s) if Ο‰ ’= Ο‰ (a,Β΅)s and Οƒ ( Ο‰ )=(a,Β΅) βˆ’ P s Οƒ ( Ο‰ , Ο‰ ’)=0 otherwise 81

  60. Adversaries - Examples β€’ Consider the simple MDP below βˆ’ note that s 1 is the only state for which | Ξ΄ (s)| > 1 βˆ’ i.e. s 1 is the only state for which an adversary makes a choice βˆ’ let Β΅ b and Β΅ c denote the probability distributions associated with actions b and c in state s 1 {heads} β€’ Adversary Οƒ 1 s 2 {init} a 0.5 a 1 βˆ’ picks action c the first time 1 s 0 s 1 c 1 βˆ’ Οƒ 1 (s 0 s 1 )=(c,Β΅ c ) a s 3 0.7 b 0.5 0.3 {tails} β€’ Adversary Οƒ 2 βˆ’ picks action b the first time, then c βˆ’ Οƒ 2 (s 0 s 1 )=(b,Β΅ b ), Οƒ 2 (s 0 s 1 s 1 )=(c,Β΅ c ), Οƒ 2 (s 0 s 1 s 0 s 1 )=(c,Β΅ c ) 82

  61. Adversaries - Examples β€’ Fragment of DTMC for adversary Οƒ 1 βˆ’ Οƒ 1 picks action c the first time {heads} s 2 {init} 0.5 a a 1 1 s 0 s 1 c 1 a s 3 0.7 b 0.5 0.3 {tails} 1 0.5 s 0 s 1 s 2 s 0 s 1 s 2 s 2 1 s 0 s 0 s 1 s 0 s 1 s 3 s 0 s 1 s 3 s 3 0.5 1 83

  62. Adversaries - Examples {heads} β€’ Fragment of DTMC for adversary Οƒ 2 s 2 βˆ’ Οƒ 2 picks action b, then c {init} 0.5 a a 1 1 s 0 s 1 c 1 a s 3 0.7 b 0.5 0.3 {tails} 0.5 s 0 s 1 s 0 s 1 s 2 1 s 0 s 1 s 0 s 0 s 1 s 0 s 1 0.7 s 0 s 1 s 0 s 1 s 3 0.5 1 s 0 s 1 s 0 1 0.5 s 0 s 1 s 1 s 2 s 0 s 1 s 1 s 2 s 2 0.3 s 0 s 1 s 1 s 0 s 1 s 1 s 3 s 0 s 1 s 1 s 3 s 3 0.5 1 84

  63. Memoryless adversaries β€’ Memoryless adversaries always pick same choice in a state βˆ’ also known as: positional, simple, Markov βˆ’ formally, for adversary Οƒ : βˆ’ Οƒ (s 0 (a 0 ,Β΅ 0 )s 1 ...s n ) depends only on s n βˆ’ resulting DTMC can be mapped to a |S|-state DTMC β€’ From previous example: βˆ’ adversary Οƒ 1 (picks c in s 1 ) is memoryless, Οƒ 2 is not {heads} {heads} s 2 s 2 Οƒ 1 {init} {init} 0.5 a 0.5 a a 1 a 1 1 1 s 0 s 1 c s 0 s 1 c 1 1 a a s 3 s 3 0.7 b 0.5 0.5 0.3 {tails} {tails} 85

  64. Overview (Part 3) β€’ Markov decision processes (MDPs) β€’ Adversaries & probability spaces β€’ Properties of MDPs: The temporal logic PCTL β€’ PCTL model checking for MDPs β€’ Case study: Firewire root contention 86

  65. PCTL β€’ Temporal logic for properties of MDPs (and DTMCs) βˆ’ extension of (non-probabilistic) temporal logic CTL βˆ’ key addition is probabilistic operator P βˆ’ quantitative extension of CTL’s A and E operators β€’ PCTL syntax: βˆ’ Ο† ::= true | a | Ο† ∧ Ο† | Β¬ Ο† | P ~p [ ψ ] (state formulas) βˆ’ ψ ::= X Ο† | Ο† U ≀ k Ο† | Ο† U Ο† (path formulas) βˆ’ where a is an atomic proposition, used to identify states of interest, p ∈ [0,1] is a probability, ~ ∈ {<,>, ≀ , β‰₯ }, k ∈ β„• β€’ Example: send β†’ P β‰₯ 0.95 [ true U ≀ 10 deliver ] 87

  66. PCTL semantics for MDPs β€’ PCTL formulas interpreted over states of an MDP βˆ’ s ⊨ Ο† denotes Ο† is β€œtrue in state s” or β€œsatisfied in state s” β€’ Semantics of (non-probabilistic) state formulas: βˆ’ for a state s of the MDP (S,s init , Ξ± , Ξ΄ ,L): βˆ’ s ⊨ a ⇔ a ∈ L(s) βˆ’ s ⊨ Ο† 1 ∧ Ο† 2 ⇔ s ⊨ Ο† 1 and s ⊨ Ο† 2 βˆ’ s ⊨ Β¬ Ο† ⇔ s ⊨ Ο† is false β€’ Semantics of path formulas: βˆ’ for a path Ο‰ = s 0 (a 0 ,Β΅ 0 )s 1 (a 1 ,Β΅ 1 )s 2 … in the MDP: βˆ’ Ο‰ ⊨ X Ο† ⇔ s 1 ⊨ Ο† βˆ’ Ο‰ ⊨ Ο† 1 U ≀ k Ο† 2 ⇔ βˆƒ i ≀ k such that s i ⊨ Ο† 2 and βˆ€ j<i, s j ⊨ Ο† 1 βˆ’ Ο‰ ⊨ Ο† 1 U Ο† 2 ⇔ βˆƒ k β‰₯ 0 such that Ο‰ ⊨ Ο† 1 U ≀ k Ο† 2 88

  67. PCTL semantics for MDPs β€’ Semantics of the probabilistic operator P βˆ’ can only define probabilities for a specific adversary Οƒ βˆ’ s ⊨ P ~p [ ψ ] means β€œthe probability, from state s, that ψ is true for an outgoing path satisfies ~p for all adversaries Οƒ ” βˆ’ formally s ⊨ P ~p [ ψ ] ⇔ Pr s Οƒ ( ψ ) ~ p for all adversaries Οƒ βˆ’ where we use Pr s Οƒ ( ψ ) to denote Pr s Οƒ { Ο‰ ∈ Path s Οƒ | Ο‰ ⊨ ψ } Β¬ ψ s Pr s Οƒ ( ψ ) ~ p ψ β€’ Some equivalences: βˆ’ F Ο† ≑ β—Š Ο† ≑ true U Ο† (eventually, β€œfuture”) βˆ’ G Ο† ≑ β–‘ Ο† ≑ Β¬(F Β¬ Ο† ) (always, β€œglobally”) 89

  68. Minimum and maximum probabilities β€’ Letting: βˆ’ Pr s max ( ψ ) = sup Οƒ Pr s Οƒ ( ψ ) βˆ’ Pr s min ( ψ ) = inf Οƒ Pr s Οƒ ( ψ ) β€’ We have: βˆ’ if ~ ∈ { β‰₯ ,>}, then s ⊨ P ~p [ ψ ] ⇔ Pr s min ( ψ ) ~ p βˆ’ if ~ ∈ {<, ≀ }, then s ⊨ P ~p [ ψ ] ⇔ Pr s max ( ψ ) ~ p β€’ Model checking P ~p [ ψ ] reduces to the computation over all adversaries of either: βˆ’ the minimum probability of ψ holding βˆ’ the maximum probability of ψ holding β€’ Crucial result for model checking PCTL on MDPs βˆ’ memoryless adversaries suffice, i.e. there are always memoryless adversaries Οƒ min and Οƒ max for which: βˆ’ Pr s Οƒ min ( ψ ) = Pr s min ( ψ ) and Pr s Οƒ max ( ψ ) = Pr s min ( ψ ) 90

  69. Quantitative properties β€’ For PCTL properties with P as the outermost operator βˆ’ quantitative form (two types): P min=? [ ψ ] and P max=? [ ψ ] βˆ’ i.e. β€œwhat is the minimum/maximum probability (over all adversaries) that path formula ψ is true?” βˆ’ corresponds to an analysis of best-case or worst-case behaviour of the system βˆ’ model checking is no harder since compute the values of 
 Pr s min ( ψ ) or Pr s max ( ψ ) anyway βˆ’ useful to spot patterns/trends β€’ Example: CSMA/CD protocol βˆ’ β€œmin/max probability that a message is sent within the deadline” 91

  70. Other classes of adversary β€’ A more general semantics for PCTL over MDPs βˆ’ parameterise by a class of adversaries Adv β€’ Only change is: βˆ’ s ⊨ Adv P ~p [ ψ ] ⇔ Pr s Οƒ ( ψ ) ~ p for all adversaries Οƒ ∈ Adv β€’ Original semantics obtained by taking Adv to be the set of all adversaries for the MDP β€’ Alternatively, take Adv to be the set of all fair adversaries βˆ’ path fairness: if a state is occurs on a path infinitely often, then each non-deterministic choice occurs infinite often βˆ’ see e.g. [BK98] 92

  71. Some real PCTL examples β€’ Byzantine agreement protocol βˆ’ P min=? [ F (agreement ∧ rounds ≀ 2) ] βˆ’ β€œwhat is the minimum probability that agreement is reached within two rounds?” β€’ CSMA/CD communication protocol βˆ’ P max=? [ F collisions=k ] βˆ’ β€œwhat is the maximum probability of k collisions?” β€’ Self-stabilisation protocols βˆ’ P min=? [ F ≀ t stable ] βˆ’ β€œwhat is the minimum probability of reaching a stable state within k steps?” 93

  72. Overview (Part 3) β€’ Markov decision processes (MDPs) β€’ Adversaries & probability spaces β€’ Properties of MDPs: The temporal logic PCTL β€’ PCTL model checking for MDPs β€’ Case study: Firewire root contention 94

  73. PCTL model checking for MDPs β€’ Algorithm for PCTL model checking [BdA95] βˆ’ inputs: MDP M=(S,s init , Ξ± , Ξ΄ ,L), PCTL formula Ο† βˆ’ output: Sat( Ο† ) = { s ∈ S | s ⊨ Ο† } = set of states satisfying Ο† β€’ Basic algorithm same as PCTL model checking for DTMCs βˆ’ proceeds by induction on parse tree of Ο† βˆ’ non-probabilistic operators (true, a, Β¬, ∧ ) straightforward β€’ Only need to consider P ~p [ ψ ] formulas βˆ’ reduces to computation of Pr s min ( ψ ) or Pr s max ( ψ ) for all s ∈ S βˆ’ dependent on whether ~ ∈ { β‰₯ ,>} or ~ ∈ {<, ≀ } βˆ’ these slides cover the case Pr s min ( Ο† 1 U Ο† 2 ), i.e. ~ ∈ { β‰₯ ,>} βˆ’ case for maximum probabilities is very similar βˆ’ next (X Ο† ) and bounded until ( Ο† 1 U ≀ k Ο† 2 ) are straightforward extensions of the DTMC case 95

  74. PCTL until for MDPs β€’ Computation of probabilities Pr s min ( Ο† 1 U Ο† 2 ) for all s ∈ S β€’ First identify all states where the probability is 1 or 0 βˆ’ β€œprecomputation” algorithms, yielding sets S yes , S no β€’ Then compute (min) probabilities for remaining states (S ? ) βˆ’ either: solve linear programming problem βˆ’ or: approximate with an iterative solution method βˆ’ or: use policy iteration 0.5 {a} 0.4 Example: s 2 s 1 P β‰₯ p [ F a ] 1 0.1 ≑ 1 1 1 0.5 P β‰₯ p [ true U a ] s 0 s 3 0.25 96 0.25

  75. PCTL until - Precomputation β€’ Identify all states where Pr s min ( Ο† 1 U Ο† 2 ) is 1 or 0 βˆ’ S yes = Sat(P β‰₯ 1 [ Ο† 1 U Ο† 2 ]), S no = Sat(Β¬ P >0 [ Ο† 1 U Ο† 2 ]) β€’ Two graph-based precomputation algorithms: βˆ’ algorithm Prob1A computes S yes β€’ for all adversaries the probability of satisfying Ο† 1 U Ο† 2 is 1 βˆ’ algorithm Prob0E computes S no β€’ there exists an adversary for which the probability is 0 0.5 S yes = Sat(P β‰₯ 1 [ F a ]) {a} 0.4 s 1 s 2 Example: 1 0.1 P β‰₯ p [ F a ] 1 1 1 0.5 s 0 s 3 0.25 S no = Sat( Β¬P >0 [ F a ]) 0.25 97

  76. Method 1 - Linear programming β€’ Probabilities Pr s min ( Ο† 1 U Ο† 2 ) for remaining states in the set S ? = S \ (S yes βˆͺ S no ) can be obtained as the unique solution of the following linear programming (LP) problem: maximize x s subject to the constraints : βˆ‘ s ∈ S ? x s ≀ Β΅ (s') β‹… x s' + Β΅ (s') βˆ‘ βˆ‘ s' ∈ S ? s' ∈ S yes for all s ∈ S ? and for all (a, Β΅ ) ∈ Ξ΄ (s) β€’ Simple case of a more general problem known as the stochastic shortest path problem [BT91] β€’ This can be solved with standard techniques βˆ’ e.g. Simplex, ellipsoid method, branch-and-cut 98

  77. Example - PCTL until (LP) 0.5 Let x i = Pr si min (F a) S yes {a} S yes : x 2 =1, S no : x 3 =0 0.4 s 1 s 2 For S ? = {x 0 , x 1 } : 1 0.1 Maximise x 0 +x 1 subject to constraints: 1 1 ● x 0 ≀ x 1 1 0.5 s 3 s 0 ● x 0 ≀ 0.25Β·x 0 + 0.5 0.25 ● x 1 ≀ 0.1Β·x 0 + 0.5Β·x 1 + 0.4 S no 0.25 99

  78. Example - PCTL until (LP) 0.5 Let x i = Pr si min (F a) S yes {a} S yes : x 2 =1, S no : x 3 =0 0.4 s 1 s 2 For S ? = {x 0 , x 1 } : 1 0.1 Maximise x 0 +x 1 subject to constraints: 1 1 ● x 0 ≀ x 1 1 0.5 s 3 s 0 ● x 0 ≀ 2/3 0.25 ● x 1 ≀ 0.2Β·x 0 + 0.8 S no 0.25 x 1 x 1 x 1 1 1 1 x 0 ≀ x 1 0.8 x 0 ≀ 2/3 x 1 ≀ 0.2Β·x 0 + 0.8 x 0 x 0 x 0 0 0 0 2/3 0 1 0 1 0 1 100

Recommend


More recommend