model of computation

36
Model of Computation a b b c c a b a b c c c b c State Transition Graph or Kripke Model (Unwind State Graph to obtain Infinite Tree) Infinite Computation Tree 2

Upload: others

Post on 12-Sep-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Model of Computation

Model of Computation

a b

b c c

a b

a b

c

c c

b c

State Transition Graph orKripke Model

(Unwind State Graph to obtain Infinite Tree)

Infinite Computation Tree

2

Page 2: Model of Computation

Model of Computation (Cont.)

Formally, a Kripke structure is a triple , where

is the set of states,

is the transition relation, and

gives the set of atomic propositions true in each state.

We assume that is total (i.e., for all states there exists a state such that ).

A path in M is an infinite sequence of states, such that for , .

We write to denote the suffix of starting at .

Unless otherwise stated, all of our results apply only to finite Kripke structures.

3

Page 3: Model of Computation

Computation Tree Logics

Temporal logics may differ according to how they handle branching in the underlying computationtree.

In a linear temporal logic, operators are provided for describing events along a single computationpath.

In a branching-time logic the temporal operators quantify over the paths that are possible from agiven state.

4

Page 4: Model of Computation

The Logic CTL

The computation tree logic CTL combines both branching-time and linear-time operators.

In this logic a path quantifier can prefix an assertion composed of arbitrary combinations of theusual linear-time operators.

1. Path quantifier:

A—“for every path”E—“there exists a path”

2. Linear-time operators:

X — holds next time.F — holds sometime in the futureG — holds globally in the futureU — holds until holds

5

Page 5: Model of Computation

Path Formulas and State Formulas

The syntax of state formulas is given by the following rules:

If , then is a state formula.

If and are state formulas, then and are state formulas.

If is a path formula, then E is a state formula.

Two additional rules are needed to specify the syntax of path formulas:

If is a state formula, then is also a path formula.

If and are path formulas, then , , X , and U are path formulas.

6

Page 6: Model of Computation

State Formulas (Cont.)

If is a state formula, the notation means that holds at state in the Kripke structure.

Assume and are state formulas and is a path formula. The relation is definedinductively as follows:

1. .2. .3. or .4. E there exists a path starting with

such that .

7

Page 7: Model of Computation

Path Formulas (Cont.)

If is a path formula, means that holds along path in Kripke structure .

Assume and are path formulas and is a state formula. The relation is definedinductively as follows:

1. is the first state of and .2. .3. or .4. X .5. U there exists a such that

and for , .

8

Page 8: Model of Computation

Standard Abbreviations

The customary abbreviations will be used for the connectives of propositional logic.

In addition, we will use the following abbreviations in writing temporal operators:

A E

U

G F

9

Unknown
Unknown
Unknown
Unknown
Unknown
F f = (true U f)
Page 9: Model of Computation

CTL and LTL

CTL is a restricted subset of CTL that permits only branching-time operators—each of thelinear-time operatorsG, F, X, and U must be immediately preceded by a path quantifier.Example: AG EF

LTL consists of formulas that have the form A where is a path formula in which the only statesubformulas permitted are atomic propositions.Example: A FG

10

Page 10: Model of Computation

Expressive Power

It can be shown that the three logics discussed in this section have different expressive powers.

For example, there is no CTL formula that is equivalent to the LTL formula A FG .

Likewise, there is no LTL formula that is equivalent to the CTL formula AG EF .

The disjunction A FG AG EF is a CTL formula that is not expressible in either CTL orLTL.

11

Page 11: Model of Computation

Basic CTL Operators

There are eight basic CTL operators:

AX and EX,

AG and EG,

AF and EF,

AU and EU

Each of these can be expressed in terms of EX, EG, and EU:

AX EX

AG EF

AF EG

EF E U

A U E U EG

12

Page 12: Model of Computation

Basic CTL Operators

The four most widely used CTL operators are illustrated below. Each computation tree has the stateas its root.

g

......

......

g

g

g

g

g g g

......

......

g

g

AG AF

g

......

......

g

......

......

g

g

EF EG

13

Page 13: Model of Computation

Typical CTL Formulas

EF : it is possible to get to a state where Started holds but Ready does nothold.

AG AF : if a Request occurs, then it will be eventually Acknowledged.

AG AF : DeviceEnabled holds infinitely often on every computation path.

AG EF : from any state it is possible to get to the Restart state.

14

Page 14: Model of Computation

Fixpoint Algorithms

EF EXEF

p

p

Page 15: Model of Computation

Fixpoint Algorithms (cont.)

Key properties of EF :

1. EF EXEF2. EX implies EF

We write EF Lfp EX .

How to compute EF :

FalseEXEXEX

...

Page 16: Model of Computation

EF ?

s

p

0

Page 17: Model of Computation

EF ?

s

p

0

EX

Page 18: Model of Computation

EF ?

s

p

0

EX

Page 19: Model of Computation

EF ?

s

p

0

EX

Page 20: Model of Computation

Ordered Binary Decision Trees and Diagrams

Ordered Binary Decision Tree for the two-bit comparator, given by the formula

is shown in the figure below:

b

a2

1b

a2

bb

a2

1b

a2

b b

a2

1b

a2

bb

a2

1b

a2

b2 2 2 2 2 2 2 2

a 2a 2a2

a2

b 1b 1

a1

1 0 0 0 0 0 0 0 0 0 0 1

0

0

0

0 1

1

10

1

1

1

101

0

0

0

000

1

1

11

10

1 1 0 0

1 0 0 1

Page 21: Model of Computation

From Binary Decision Trees to Diagrams

An Ordered Binary Decision Diagram (OBDD) is an ordered decision tree where

All isomorphic subtrees are combined, andAll nodes with isomorphic children are eliminated.

Given a parameter ordering, OBDD is unique up to isomorphism.

R. E. Bryant. Graph-based algorithms for boolean function manipulation. IEEETransactions on Computers, C-35(8):677–691, 1986.

Page 22: Model of Computation

0 0 0 1 1

1

Page 23: Model of Computation

Binary Decision Diagram - BDD

Page 24: Model of Computation
Page 25: Model of Computation
Page 26: Model of Computation
Page 27: Model of Computation
Page 28: Model of Computation
Page 29: Model of Computation
Page 30: Model of Computation
Page 31: Model of Computation
Page 32: Model of Computation
Page 33: Model of Computation

Symbolic Model Checking Algorithm

How to represent state-transition graphs with Ordered Binary Decision Diagrams:

Assume that system behavior is determined by boolean state variables .

The Transition relation will be given as a boolean formula in terms of the statevariables:

where represents the current state and represents the next state.

Now convert to a OBDD!!

Page 34: Model of Computation

Symbolic Model Checking (cont.)

Representing transition relations symbolically:

a a, b

Boolean formula for transition relation:

Now, represent as an OBDD!

Page 35: Model of Computation

Symbolic Model Checking (cont.)

Consider EX .

Now, introduce state variables and transition relation:

Compute OBDD for relational product on right side of formula.

Page 36: Model of Computation

Symbolic Model Checking (cont.)

How to evaluate fixpoint formulas using OBDDs:

EF Lfp EX

Introduce state variables:

EF Lfp

Now, compute the sequence

until convergence.

Convergence can be detected since the sets of states are represented as OBDDs.