# linear temporal logic ltl

Post on 07-Apr-2017

336 views

Category:

## Education

Embed Size (px)

TRANSCRIPT

• Understanding LTLBy : Anit Thapaliya Software Engineering Department of Computer Science Kyonggi University, South Korea

• It is temporal logic with connectives that allow us to refer to the future. It models the time as a sequence of states, extending infinitely to the future.

Definition

• ::= true | p | | 1^2 | X | 1U2

Where, p belongs to APX= next: is true at next stepU= until: 2 is true at some point, 1 is true until that timeSyntax

• := true |

Explanation LTL

{p1,p2}{p1,p2}{p2}{p1,p2}{p2}

• := true | p |

Explanation LTL

p = p1, p2, p3, p4, {p1,p2}{p2}{p1,p2}{p2}Where p = AP (Every atomic proposition is LTL Formula){p1,p2}

• := true | p | |

Explanation LTL

P1{p1}{p2}{p2}{p2}Where p = AP{p2} = if is an LTL formula then not of phi () is also an LTL formula Look at the first state it does not satisfy p1. hence, P1 is true

• := true | p | | 1^2 |

Explanation LTL

P1 ^ P2{p1,p2}{p2}{p1,p2}{p2}Where p = AP{p1,p2}1 & 1 are LTL Formual, then p1 & p2 are LTL formula Look at the first state it satisfy p1 and p2. hence, P1 & P2 is true ^ stands for And

• := true | p | | 1^2 | X |

Explanation LTL

Xp1 is true Xp2 is not true

Xp2 is true {p1}{p2}{p2}{p2}Where p = AP{p2}If is an LTL formula then, X is also an LTL formulaEarlier, we are verifying the states by looking the first part now with Xp1 operator we have to look to next part. If the following part satisfy p1 then it is true. Note: Focused on second part following the first in sequence. X stands for Next

• := true | p | | 1^2 | X | 1U2

Explanation LTL

p1 U p2{p1}{p1}{p2}{p1}Where p = AP{p1}If 1, 2 are LTL formula then, p1, p2 also LTL formula We going further states in this part. That is p2 is true at some point in the future, until that point where p2 is p1 must be true.

Or p2 should definitely true at some point until when p1 must be true. U stands for Until

• := true | p | | 1^2 | X | 1U2

Some Example

(p1 U p2){p1}{}{p2}{p1}LTL Formula{p1} (p1 U p2)In this formula, p2 is true at some point which is true but until where p2 is true p1 is not completely true.Meaning Here p2 is trueHere p1 is not true

• := true | p | | 1^2 | X | 1U2

Some LTL Formula

(p1 U p2){p1}{}{p2}{p1}LTL Formula{p1} (p1 U p2)In this formula, p2 is true at some point which is true but until where p2 is true p1 is not completely true.Meaning Here p2 is trueHere p1 is not true

• := true | p | | 1^2 | X | 1U2

Some LTL Formula

(p1 U p2){p1}{p1}{p2}{p1,p3}LTL Formula{p1, p3}p1 U (p2 ^ X p3)In this formula, (p2 ^ X p3) is true at some point in the future until where p1 is also true. At the black state Xp3 is true because there is p3 in next state where as p2 is also true there. Lastly in all the yellow state p1 is present so p1 is true until (p2 ^ X p3).

Meaning (p2 ^ X p3) is true Here p1 is true in all yellow state

• Word : A0 A1 A2 APEach Ai is a set of atomic proposition Every words satisfies true Every sigma satisfy LTL formula Words (true) = AP

satisfies Pi if Pi A0If the first letter A0 contain pi.Word s(Pi) = {A0 A1 A2 A3. | Pi A0} ie Pi must be in A0

Semantics of LTL Formula := true | p | | 1^2 | X | 1U2

• Word : A0 A1 A2 APEach Ai is a set of atomic proposition

satisfy if does not satisfy Words() = (Words ()) satisfies 1^2 if satisfy 1 and satisfy 2Words (1^2) = Words (1) Intersection Words (2)It means words must be common in 1, 2

Semantics of LTL Formula := true | p | | 1^2 | X | 1U2

• Word : A0 A1 A2 A3 APEach Ai is a set of atomic proposition

satisfies X if A1 A2 A3 .. What is words expect A0 must satisfy

satisfy 1 U 2 if there exists j Aj Aj+1.. Satisfy 2 and for all Aj-1 (0

• Word : A0 A1 A2 A3 APEach Ai is a set of atomic proposition

satisfies X if A1 A2 A3 .. What is words expect A0 must satisfy Words (X )={A0 A1 A2| A1 A2 .. Words () }

satisfy 1 U 2 if there exists j Aj Aj+1.. Satisfy 2 and for all Ai and Aj-1 (0

• satisfy true U if there exists j Aj Aj+1.. Satisfy This is because ture is always true for all Ai and Aj-1 (0
• X & U are called temporal operators. Temporal operators means they are related to time.

G global true now and forever (Rectangle in temporal logic )F Eventually true now and some time in future (like diamond in temporal logic)

• Primary Temporal Logic Operators Eventually := true U ( will become true at some point in the future)Always := is always true; (never (eventually ()))p q p implies eventually q (response)P p U r p implies q until r (precedence) p always eventually p (process)p eventually always p (stability) p q eventually p implies eventually q (correlation)

More Operators & Formulas

• Thank You

Recommended