Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

Department of Computer Science

Lecture 9: Temporal Logic (cont.)

Formal Methods of S/W Development

LECTURER
SAMAN TARIQ
Agenda
 Review of Lecture 8
 Temporal Logic
 LTL and CTL
 Examples

2
Review of Lecture 8
 Temporal Logic

 Reasoning about propositions qualified in terms of time


Kripke Structure
 Defined as a triple where,
 is a set of finite states
 is a transition relation that must be total
 is a labeling function that maps states to

3
Review of Lecture 8
 CTL*

 Describe properties of computation trees using path


quantifiers (A, E) and temporal operators (X, F, G, U, R)
 Divided into two sublogics:
 Linear Temporal Logic – has the form A , where is
a path formula in which the only state sub-formulas
permitted are atomic propositions e.g., A ( FG )
 Computational Tree Logic (CTL) – each of the temporal
operators must be immediately preceded by a path
operator, e.g., AG ( EF ) 4
More on LTL and CTL
  In LTL, operators are provided for describing events
along a single computation path

 In CTL, temporal operators quantify over paths that are


possible from a given state

 All three logics have different expressive powers


 No CTL formula equivalent to A ( FG )
 No LTL formula that is equivalent to AG ( EF )
 No CTL or LTL formula that can express the
disjunction of the two. A ( FG ) AG ( EF )
5
Examples
 In the examples, the root state satisfies the given formula
if the black states satisfy p and the red states satisfy q

6
Examples (cont.)
  AG   AF

7
Examples (cont.)
  AX   A[U ]

8
Examples (cont.)
  EG   EF

9
Examples (cont.)
  EX   E[U ]

10
Typical CTL* Formulas
  It is possible to get to a state where the system has started
but is not ready
 EF ( )

 If a request occurs, then it will be eventually acknowledged


 AG ( AF )

 From any state it is possible to get to a restart state


 AG ( EF )

11

You might also like