unit 7 linear temporal logic
play

Unit-7: Linear Temporal Logic B. Srivathsan Chennai Mathematical - PowerPoint PPT Presentation

Unit-7: Linear Temporal Logic B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015 1 / 13 Module 1: Introduction to LTL 2 / 13 Transition Systems + G, F, X, GF + NuSMV State-space Bchi Automata LTL CTL


  1. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Word σ : A 0 A 1 A 2 ... ∈ AP- INF Every word satisfies true σ satisfies p i if p i ∈ A 0 σ satisfies φ 1 ∧ φ 2 if σ satisfies φ 1 and σ satisfies φ 2 σ satisfies ¬ φ if σ does not satisfy φ σ satisfies X φ A 1 A 2 A 3 ... satisfies φ if 7 / 13

  2. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Word σ : A 0 A 1 A 2 ... ∈ AP- INF Every word satisfies true σ satisfies p i if p i ∈ A 0 σ satisfies φ 1 ∧ φ 2 if σ satisfies φ 1 and σ satisfies φ 2 σ satisfies ¬ φ if σ does not satisfy φ σ satisfies X φ A 1 A 2 A 3 ... satisfies φ if σ satisfies φ 1 U φ 2 if there exists j s.t. A j A j + 1 ... satisfies φ 2 and for all 0 ≤ i < j A i A i + 1 ... satisfies φ 1 7 / 13

  3. Words ( φ ) = { σ ∈ AP- INF | σ satisfies φ } 8 / 13

  4. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Every word satisfies true σ satisfies p i if p i ∈ A 0 σ satisfies φ 1 ∧ φ 2 σ satisfies φ 1 σ satisfies φ 2 if and σ satisfies ¬ φ if σ does not satisfy φ σ satisfies X φ if A 1 A 2 A 3 ... satisfies φ σ satisfies φ 1 U φ 2 if there exists j s.t. A j A j + 1 ... satisfies φ 2 and for all 1 ≤ i < j A i A i + 1 ... satisfies φ 1 9 / 13

  5. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Every word satisfies true Words( true ) = AP- INF σ satisfies p i if p i ∈ A 0 σ satisfies φ 1 ∧ φ 2 σ satisfies φ 1 σ satisfies φ 2 if and σ satisfies ¬ φ if σ does not satisfy φ σ satisfies X φ if A 1 A 2 A 3 ... satisfies φ σ satisfies φ 1 U φ 2 if there exists j s.t. A j A j + 1 ... satisfies φ 2 and for all 1 ≤ i < j A i A i + 1 ... satisfies φ 1 9 / 13

  6. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Every word satisfies true Words( true ) = AP- INF σ satisfies p i if p i ∈ A 0 Words( p i ) = { A 0 A 1 A 2 ... | p i ∈ A 0 } σ satisfies φ 1 ∧ φ 2 σ satisfies φ 1 σ satisfies φ 2 if and σ satisfies ¬ φ if σ does not satisfy φ σ satisfies X φ if A 1 A 2 A 3 ... satisfies φ σ satisfies φ 1 U φ 2 if there exists j s.t. A j A j + 1 ... satisfies φ 2 and for all 1 ≤ i < j A i A i + 1 ... satisfies φ 1 9 / 13

  7. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Every word satisfies true Words( true ) = AP- INF σ satisfies p i if p i ∈ A 0 Words( p i ) = { A 0 A 1 A 2 ... | p i ∈ A 0 } σ satisfies φ 1 ∧ φ 2 σ satisfies φ 1 σ satisfies φ 2 if and Words( φ 1 ∧ φ 2 ) = Words( φ 1 ) ∩ Words( φ 2 ) σ satisfies ¬ φ if σ does not satisfy φ σ satisfies X φ if A 1 A 2 A 3 ... satisfies φ σ satisfies φ 1 U φ 2 if there exists j s.t. A j A j + 1 ... satisfies φ 2 and for all 1 ≤ i < j A i A i + 1 ... satisfies φ 1 9 / 13

  8. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Every word satisfies true Words( true ) = AP- INF σ satisfies p i if p i ∈ A 0 Words( p i ) = { A 0 A 1 A 2 ... | p i ∈ A 0 } σ satisfies φ 1 ∧ φ 2 σ satisfies φ 1 σ satisfies φ 2 if and Words( φ 1 ∧ φ 2 ) = Words( φ 1 ) ∩ Words( φ 2 ) σ satisfies ¬ φ if σ does not satisfy φ Words( ¬ φ ) = (Words( φ )) c σ satisfies X φ if A 1 A 2 A 3 ... satisfies φ σ satisfies φ 1 U φ 2 if there exists j s.t. A j A j + 1 ... satisfies φ 2 and for all 1 ≤ i < j A i A i + 1 ... satisfies φ 1 9 / 13

  9. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Every word satisfies true Words( true ) = AP- INF σ satisfies p i if p i ∈ A 0 Words( p i ) = { A 0 A 1 A 2 ... | p i ∈ A 0 } σ satisfies φ 1 ∧ φ 2 σ satisfies φ 1 σ satisfies φ 2 if and Words( φ 1 ∧ φ 2 ) = Words( φ 1 ) ∩ Words( φ 2 ) σ satisfies ¬ φ if σ does not satisfy φ Words( ¬ φ ) = (Words( φ )) c σ satisfies X φ if A 1 A 2 A 3 ... satisfies φ Words( X φ ) = { A 0 A 1 A 2 ... | A 1 A 2 ··· ∈ Words ( φ ) } σ satisfies φ 1 U φ 2 if there exists j s.t. A j A j + 1 ... satisfies φ 2 and for all 1 ≤ i < j A i A i + 1 ... satisfies φ 1 9 / 13

  10. φ := true | p i | φ 1 ∧ φ 2 | ¬ φ 1 | X φ | φ 1 U φ 2 Every word satisfies true Words( true ) = AP- INF σ satisfies p i if p i ∈ A 0 Words( p i ) = { A 0 A 1 A 2 ... | p i ∈ A 0 } σ satisfies φ 1 ∧ φ 2 σ satisfies φ 1 σ satisfies φ 2 if and Words( φ 1 ∧ φ 2 ) = Words( φ 1 ) ∩ Words( φ 2 ) σ satisfies ¬ φ if σ does not satisfy φ Words( ¬ φ ) = (Words( φ )) c σ satisfies X φ if A 1 A 2 A 3 ... satisfies φ Words( X φ ) = { A 0 A 1 A 2 ... | A 1 A 2 ··· ∈ Words ( φ ) } σ satisfies φ 1 U φ 2 if there exists j s.t. A j A j + 1 ... satisfies φ 2 and for all 1 ≤ i < j A i A i + 1 ... satisfies φ 1 Words( φ 1 U φ 2 ) = { A 0 A 1 A 2 ... | ∃ j . A j A j + 1 ··· ∈ Words ( φ 2 ) and ∀ 0 ≤ i < j . A i A i + 1 ··· ∈ Words ( φ 1 ) } 9 / 13

  11. F φ : true U φ 10 / 13

  12. F φ : true U φ σ satisfies true U φ if there exists j s.t. A j A j + 1 ... satisfies φ and for all 0 ≤ i < j A i A i + 1 ... satisfies true 10 / 13

  13. F φ : true U φ σ satisfies true U φ if there exists j s.t. A j A j + 1 ... satisfies φ 10 / 13

  14. F φ : true U φ σ satisfies true U φ if there exists j s.t. A j A j + 1 ... satisfies φ G φ : ¬ F ¬ φ 10 / 13

  15. F φ : true U φ σ satisfies true U φ if there exists j s.t. A j A j + 1 ... satisfies φ G φ : ¬ F ¬ φ σ satisfies F ¬ φ there exists j s.t. A j A j + 1 ... satisfies ¬ φ if 10 / 13

  16. F φ : true U φ σ satisfies true U φ if there exists j s.t. A j A j + 1 ... satisfies φ G φ : ¬ F ¬ φ σ satisfies F ¬ φ there exists j s.t. A j A j + 1 ... satisfies ¬ φ if σ satisfies ¬ F ¬ φ if σ does not satisfy F ¬ φ 10 / 13

  17. F φ : true U φ σ satisfies true U φ if there exists j s.t. A j A j + 1 ... satisfies φ G φ : ¬ F ¬ φ σ satisfies F ¬ φ there exists j s.t. A j A j + 1 ... satisfies ¬ φ if σ satisfies ¬ F ¬ φ if σ does not satisfy F ¬ φ σ satisfies ¬ F ¬ φ if for all j A j A j + 1 ... satisfies φ 10 / 13

  18. AP = { p 1 , p 2 } Transition System Property { p 1 } { p 1 , p 2 } request=1 request=1 ready busy LTL formula φ request=0 request=0 ready busy { p 2 } {} 11 / 13

  19. AP = { p 1 , p 2 } Transition System Property { p 1 } { p 1 , p 2 } request=1 request=1 ready busy LTL formula φ request=0 request=0 ready busy { p 2 } {} Transition system TS satisfies formula φ if Traces( TS ) ⊆ Words( φ ) 11 / 13

  20. (Words( φ )) c Words( φ ) 12 / 13

  21. (Words( φ )) c Traces(TS) Words( φ ) 12 / 13

  22. (Words( φ )) c Traces(TS) Words( φ ) TS does not satisfy φ TS does not satisfy ¬ φ 12 / 13

  23. (Words( φ )) c Traces(TS) Words( φ ) TS does not satisfy φ TS does not satisfy ¬ φ { p 1 } { p 2 } { p 2 } 12 / 13

  24. (Words( φ )) c Traces(TS) Words( φ ) TS does not satisfy φ TS does not satisfy ¬ φ { p 1 } { p 2 } { p 2 } Above TS does not satisfy F p 1 Above TS does not satisfy ¬ F p 1 12 / 13

  25. Semantics of LTL 13 / 13

  26. Unit-7: Linear Temporal Logic B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015 1 / 7

  27. Module 3: A Puzzle 2 / 7

  28. M AN G OAT R IVER W OLF C ABBAGE 3 / 7

  29. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man 3 / 7

  30. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man … Man can take only one passenger in the boat with him at a time 3 / 7

  31. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man … Man can take only one passenger in the boat with him at a time … Goat and cabbage cannot be left in the same bank if man is not there 3 / 7

  32. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man … Man can take only one passenger in the boat with him at a time … Goat and cabbage cannot be left in the same bank if man is not there … Wolf and goat cannot be left in the same bank if man is not there 3 / 7

  33. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man … Man can take only one passenger in the boat with him at a time … Goat and cabbage cannot be left in the same bank if man is not there … Wolf and goat cannot be left in the same bank if man is not there How can the man shift everyone to the right bank? 3 / 7

  34. Coming next: Solution using LTL model-checking 4 / 7

  35. man = 0 man = 1 goat = 0 goat = 1 R IVER wolf = 0 wolf = 1 cabbage = 0 cabbage = 1 5 / 7

  36. man = 0 man = 1 goat = 0 goat = 1 R IVER wolf = 0 wolf = 1 cabbage = 0 cabbage = 1 carry = {g,w,c,0} 5 / 7

  37. man = 0 man = 1 goat = 0 goat = 1 R IVER wolf = 0 wolf = 1 cabbage = 0 cabbage = 1 carry = {g,w,c,0} man can carry a passenger which has same value as him 5 / 7

  38. man = 0 man = 1 goat = 0 goat = 1 R IVER wolf = 0 wolf = 1 cabbage = 0 cabbage = 1 carry = {g,w,c,0} man can carry a passenger which has same value as him NuSMV demo 5 / 7

  39. Need a path in this transition system which satisfies: φ : ((goat = cabbage | wolf = goat) -> man = goat) U (man & cabbage & goat & wolf) 6 / 7

  40. Need a path in this transition system which satisfies: φ : ((goat = cabbage | wolf = goat) -> man = goat) U (man & cabbage & goat & wolf) NuSMV checks property on all paths 6 / 7

  41. Need a path in this transition system which satisfies: φ : ((goat = cabbage | wolf = goat) -> man = goat) U (man & cabbage & goat & wolf) NuSMV checks property on all paths Check ! φ and look at the counter-example ! 6 / 7

  42. Summary LTL model-checking Use in planning problem 7 / 7

  43. Reference Section 3.3.2 M. Huth and M. Ryan . Logic in Computer Science (Second Edition, Cambridge University Press) 7 / 7

  44. Unit-7: Linear Temporal Logic B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015 1 / 7

  45. Module 3: A Puzzle 2 / 7

  46. M AN G OAT R IVER W OLF C ABBAGE 3 / 7

  47. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man 3 / 7

  48. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man … Man can take only one passenger in the boat with him at a time 3 / 7

  49. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man … Man can take only one passenger in the boat with him at a time … Goat and cabbage cannot be left in the same bank if man is not there 3 / 7

  50. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man … Man can take only one passenger in the boat with him at a time … Goat and cabbage cannot be left in the same bank if man is not there … Wolf and goat cannot be left in the same bank if man is not there 3 / 7

  51. M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man … Man can take only one passenger in the boat with him at a time … Goat and cabbage cannot be left in the same bank if man is not there … Wolf and goat cannot be left in the same bank if man is not there How can the man shift everyone to the right bank? 3 / 7

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend