φ := 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
φ := 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
Words ( φ ) = { σ ∈ AP- INF | σ satisfies φ } 8 / 13
φ := 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
φ := 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
φ := 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
φ := 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
φ := 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
φ := 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
φ := 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
F φ : true U φ 10 / 13
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
F φ : true U φ σ satisfies true U φ if there exists j s.t. A j A j + 1 ... satisfies φ 10 / 13
F φ : true U φ σ satisfies true U φ if there exists j s.t. A j A j + 1 ... satisfies φ G φ : ¬ F ¬ φ 10 / 13
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
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
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
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
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
(Words( φ )) c Words( φ ) 12 / 13
(Words( φ )) c Traces(TS) Words( φ ) 12 / 13
(Words( φ )) c Traces(TS) Words( φ ) TS does not satisfy φ TS does not satisfy ¬ φ 12 / 13
(Words( φ )) c Traces(TS) Words( φ ) TS does not satisfy φ TS does not satisfy ¬ φ { p 1 } { p 2 } { p 2 } 12 / 13
(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
Semantics of LTL 13 / 13
Unit-7: Linear Temporal Logic B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015 1 / 7
Module 3: A Puzzle 2 / 7
M AN G OAT R IVER W OLF C ABBAGE 3 / 7
M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man 3 / 7
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
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
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
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
Coming next: Solution using LTL model-checking 4 / 7
man = 0 man = 1 goat = 0 goat = 1 R IVER wolf = 0 wolf = 1 cabbage = 0 cabbage = 1 5 / 7
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
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
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
Need a path in this transition system which satisfies: φ : ((goat = cabbage | wolf = goat) -> man = goat) U (man & cabbage & goat & wolf) 6 / 7
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
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
Summary LTL model-checking Use in planning problem 7 / 7
Reference Section 3.3.2 M. Huth and M. Ryan . Logic in Computer Science (Second Edition, Cambridge University Press) 7 / 7
Unit-7: Linear Temporal Logic B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015 1 / 7
Module 3: A Puzzle 2 / 7
M AN G OAT R IVER W OLF C ABBAGE 3 / 7
M AN G OAT R IVER W OLF C ABBAGE … There is a boat that can be driven by the man 3 / 7
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
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
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
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
Recommend
More recommend