86
General Introduction Kripke Models CTL ATL Model checking Social Laws for Multi-Agent Systems: Logic and Games Lecture 1: Specifying and verifying state-transition models Thomas Ågotnes 1 1 Department of Information Science and Media Studies University of Bergen, Norway NII Tokyo 13 December 2011

Lecture 1: Specifying and verifying state-transition models

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Social Laws for Multi-Agent Systems: Logic and Games

Lecture 1: Specifying and verifyingstate-transition models

Thomas Ågotnes1

1Department of Information Science and Media StudiesUniversity of Bergen, Norway

NII Tokyo 13 December 2011

Page 2: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Contents

1 General Introduction

2 Kripke Models

3 CTL

4 ATL

5 Model checking

Page 3: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Lecturer

Professor Thomas ÅgotnesUniversity of Bergen, Norway

14500 students, 3200 faculty and staff

Visiting NII 3 December 2011 – 4 February 2012Contact: [email protected]

Page 4: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

About the lecture series

Goals:To motivate and introduce the idea of social laws , ornormative systems, as a coordination mechanism formulti-agent systemsTo motivate the idea of using logic in this context, and inparticular temporal logics and cooperation logics in theformal specification and verifaction of social laws

A social law is a restriction on the behaviour of individualagents, which ensures some desired global properties of thebehaviour of the system

Page 5: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

About the lecture series

1 Specifying and veryfying state-transition models formulti-agent systems

2 Social laws for coordination3 Dealing with non-compliance4 Coordinating self-interested agents5 Social laws design as an optiomisation problem, and as an

optimisation problem6 Reasoning about social laws7 Strategic reasoning under imperfect information

Page 6: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Contents

1 General Introduction

2 Kripke Models

3 CTL

4 ATL

5 Model checking

Page 7: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Multi-agent systems

Consists of several autonomous agents that interactAn agent is an entity that perceives the enviroment, andactsAn agent can be an (artificially) intelligent agent programBut can also be a simple component of some system, likea thermostate

Page 8: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Formal models of multi-agent systems

State-transition modelsQuite common abstraction

Ex.: UML

p

...

...

p

Page 9: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: microwave oven

a

b startederror c

closedd closed

warm

e

startedclosederror

f

startedclosed

g

startedclosedwarm

Page 10: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Computations

Every path in the tree obtained from a given initial staterepresents a possible computation

Page 11: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Computations: example

a

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

Page 12: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Adding agents

If the system is a multi-agent system, the states are globalstatesWe label the transitions with the name of the agent thatcauses the transition by executing some actionThis assumes asynchronous action

p

...

...

a

a

a

b

b

bap

Page 13: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Formally

An agent-labelled Kripke structure (over Φ) is a 6-tuple:

K = 〈S,S0,R,Ag, α,V 〉, where

S is a finite, non-empty set of states,S0 ⊆ S (S0 6= ∅) is the set of initial states;R ⊆ S × S is a total (each state has a successor) binarytransition relation on S;Ag = {1, . . . ,n} is the set of agents;α : R → Ag labels each transition in R with an agentV : S → 2Φ labels states with a set of propositional atoms

Note: simplifying assumption: single agent execute singleaction in each state (interleaved concurrency)

Page 14: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Contents

1 General Introduction

2 Kripke Models

3 CTL

4 ATL

5 Model checking

Page 15: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Introduction

Consider this statement:The microwave can only start without error if it isclosed

Is it true in our microwave model?This statement is true in some models (including ours), butfalse in othersWe want to be able to check whether such properties holdor not automaticallyThus we need a precise way of writing down statementsFor that we can use modal logic, and in particularComputation Tree Logic (CTL)

Page 16: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

CTL: language

The language of CTL (CTL formulas) is defined as follows:Propositional atoms such as p or started are formulasFormulas can be combined using propositional connectivessuch as ∧ (and), ∨ (or), ¬ (not),→ (implication), etc.We can construct new formulas by putting temporalconnectives in front of an existing formula. If ϕ and ψ areformulas, then the following as also formulas:

E iϕ on some path, ϕ is true nextE(ϕU ψ) on some path, ϕ until ψE♦ϕ on some path, eventually ϕE ϕ on some path, always ϕA iϕ on all paths, ϕ is true nextA(ϕU ψ) on all paths, ϕ until ψA♦ϕ on all paths, eventually ϕA ϕ on all paths, always ϕ

Page 17: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

CTL: language

The language of CTL (CTL formulas) is defined as follows:Propositional atoms such as p or started are formulasFormulas can be combined using propositional connectivessuch as ∧ (and), ∨ (or), ¬ (not),→ (implication), etc.We can construct new formulas by putting temporalconnectives in front of an existing formula. If ϕ and ψ areformulas, then the following as also formulas:

E iϕ on some path, ϕ is true nextE(ϕU ψ) on some path, ϕ until ψE♦ϕ on some path, eventually ϕE ϕ on some path, always ϕA iϕ on all paths, ϕ is true nextA(ϕU ψ) on all paths, ϕ until ψA♦ϕ on all paths, eventually ϕA ϕ on all paths, always ϕ

Page 18: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

E ierror (it is possible that there is an error in the nextstate)¬A ierror (it is not necessary that there is an error in thenext state)E♦warm (it is possible that the oven will eventually bewarm)A ¬(warm ∧ error) (it is necessary that the microwavecan never be both warm and have an error)A♦closed (it is necessary that the microwave willeventually be closed)A(¬warmU closed) (it is necessary that the microwave iscold until it is closed)A (¬closed → ¬E i(start ∧ ¬error)) (the microwavecan only start without error if it is closed)

Page 19: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

E ierror (it is possible that there is an error in the nextstate)¬A ierror (it is not necessary that there is an error in thenext state)E♦warm (it is possible that the oven will eventually bewarm)A ¬(warm ∧ error) (it is necessary that the microwavecan never be both warm and have an error)A♦closed (it is necessary that the microwave willeventually be closed)A(¬warmU closed) (it is necessary that the microwave iscold until it is closed)A (¬closed → ¬E i(start ∧ ¬error)) (the microwavecan only start without error if it is closed)

Page 20: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

E ierror (it is possible that there is an error in the nextstate)¬A ierror (it is not necessary that there is an error in thenext state)E♦warm (it is possible that the oven will eventually bewarm)A ¬(warm ∧ error) (it is necessary that the microwavecan never be both warm and have an error)A♦closed (it is necessary that the microwave willeventually be closed)A(¬warmU closed) (it is necessary that the microwave iscold until it is closed)A (¬closed → ¬E i(start ∧ ¬error)) (the microwavecan only start without error if it is closed)

Page 21: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

E ierror (it is possible that there is an error in the nextstate)¬A ierror (it is not necessary that there is an error in thenext state)E♦warm (it is possible that the oven will eventually bewarm)A ¬(warm ∧ error) (it is necessary that the microwavecan never be both warm and have an error)A♦closed (it is necessary that the microwave willeventually be closed)A(¬warmU closed) (it is necessary that the microwave iscold until it is closed)A (¬closed → ¬E i(start ∧ ¬error)) (the microwavecan only start without error if it is closed)

Page 22: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

E ierror (it is possible that there is an error in the nextstate)¬A ierror (it is not necessary that there is an error in thenext state)E♦warm (it is possible that the oven will eventually bewarm)A ¬(warm ∧ error) (it is necessary that the microwavecan never be both warm and have an error)A♦closed (it is necessary that the microwave willeventually be closed)A(¬warmU closed) (it is necessary that the microwave iscold until it is closed)A (¬closed → ¬E i(start ∧ ¬error)) (the microwavecan only start without error if it is closed)

Page 23: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

E ierror (it is possible that there is an error in the nextstate)¬A ierror (it is not necessary that there is an error in thenext state)E♦warm (it is possible that the oven will eventually bewarm)A ¬(warm ∧ error) (it is necessary that the microwavecan never be both warm and have an error)A♦closed (it is necessary that the microwave willeventually be closed)A(¬warmU closed) (it is necessary that the microwave iscold until it is closed)A (¬closed → ¬E i(start ∧ ¬error)) (the microwavecan only start without error if it is closed)

Page 24: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

E ierror (it is possible that there is an error in the nextstate)¬A ierror (it is not necessary that there is an error in thenext state)E♦warm (it is possible that the oven will eventually bewarm)A ¬(warm ∧ error) (it is necessary that the microwavecan never be both warm and have an error)A♦closed (it is necessary that the microwave willeventually be closed)A(¬warmU closed) (it is necessary that the microwave iscold until it is closed)A (¬closed → ¬E i(start ∧ ¬error)) (the microwavecan only start without error if it is closed)

Page 25: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

A (A♦enabled) (the process is infinitely often enabled)A (A♦deadlock) (the process will eventually be in apermanent deadlock)A (E♦restart) (it is always possible to get to therestart-state)A ¬(c1 ∧ c2) (safety)A (t1 → ♦c1) (liveness)

Page 26: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

A (A♦enabled) (the process is infinitely often enabled)A (A♦deadlock) (the process will eventually be in apermanent deadlock)A (E♦restart) (it is always possible to get to therestart-state)A ¬(c1 ∧ c2) (safety)A (t1 → ♦c1) (liveness)

Page 27: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

A (A♦enabled) (the process is infinitely often enabled)A (A♦deadlock) (the process will eventually be in apermanent deadlock)A (E♦restart) (it is always possible to get to therestart-state)A ¬(c1 ∧ c2) (safety)A (t1 → ♦c1) (liveness)

Page 28: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

A (A♦enabled) (the process is infinitely often enabled)A (A♦deadlock) (the process will eventually be in apermanent deadlock)A (E♦restart) (it is always possible to get to therestart-state)A ¬(c1 ∧ c2) (safety)A (t1 → ♦c1) (liveness)

Page 29: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Examples

A (A♦enabled) (the process is infinitely often enabled)A (A♦deadlock) (the process will eventually be in apermanent deadlock)A (E♦restart) (it is always possible to get to therestart-state)A ¬(c1 ∧ c2) (safety)A (t1 → ♦c1) (liveness)

Page 30: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Formal interpretation

Given a Kripke model K , a state s in K and a CTL formula ϕ,

K , s |= ϕ

means that ϕ is true (or satisfied) in state s of K .

Page 31: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

E mE i= for some path, in the next state

Page 32: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: E ma

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

sK:

K , s |= E ierror

Page 33: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

A mA i= for all paths, in the next state

Page 34: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: A ma

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

sK:

¬warm¬warm

K , s |= A i¬warm

Page 35: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

E♦

E♦ = for some path, in some future state

Page 36: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: E♦

a

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

sK:

K , s |= E♦warm

Page 37: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

A♦

A♦ = for all paths, in some future state

Page 38: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: A♦

a

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

sK:

K , s |= A♦closed

Page 39: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

E

E = for some path, in all future states

Page 40: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: E

a

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

sK:

¬warm

¬warm

K , s |= E ¬warm

Page 41: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

A

A = for all paths, in all future states

Page 42: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: A

a

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

sK:

K , s |= A ¬(warm ∧ error)

Page 43: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

AU

AU = for all paths, ψ becomes true in some future states and ϕis true in all states before that

Page 44: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: U

a

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

sK:

¬warm

¬warm

K , s |= A(¬warm U closed)

Page 45: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: nesting

a

b

b c

c

a fe

g

d

a c d

closed

started, closed

started, closed, warm

closed, warm

closed closed, warm

started, error

started, closed,error

started, error closed

sK:

EO (closed ∧ error)

K , s |= E iE i(closed ∧ error)

Page 46: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Notation

We useK |= ϕ

to denote the fact that K , s |= ϕ for all initial states s ∈ S0.

Page 47: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Some equivalences

ϕ ∨ ψ ≡ ¬(¬ϕ ∧ ¬ψ)

A iϕ ≡ ¬E i¬ϕE♦ ≡ E(> U ϕ)

A ϕ ≡ ¬E♦¬ϕA(ϕU ψ) ≡ ¬( E(¬ψ U ¬(ϕ ∨ ψ)) ∨ E ¬ψ )

That means that we only need the operators{>,¬,∧,E ,EU ,E i}!

Page 48: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Some equivalences

ϕ ∨ ψ ≡ ¬(¬ϕ ∧ ¬ψ)

A iϕ ≡ ¬E i¬ϕE♦ ≡ E(> U ϕ)

A ϕ ≡ ¬E♦¬ϕA(ϕU ψ) ≡ ¬( E(¬ψ U ¬(ϕ ∨ ψ)) ∨ E ¬ψ )

That means that we only need the operators{>,¬,∧,E ,EU ,E i}!

Page 49: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Some equivalences

ϕ ∨ ψ ≡ ¬(¬ϕ ∧ ¬ψ)

A iϕ ≡ ¬E i¬ϕE♦ ≡ E(> U ϕ)

A ϕ ≡ ¬E♦¬ϕA(ϕU ψ) ≡ ¬( E(¬ψ U ¬(ϕ ∨ ψ)) ∨ E ¬ψ )

That means that we only need the operators{>,¬,∧,E ,EU ,E i}!

Page 50: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Some equivalences

ϕ ∨ ψ ≡ ¬(¬ϕ ∧ ¬ψ)

A iϕ ≡ ¬E i¬ϕE♦ ≡ E(> U ϕ)

A ϕ ≡ ¬E♦¬ϕA(ϕU ψ) ≡ ¬( E(¬ψ U ¬(ϕ ∨ ψ)) ∨ E ¬ψ )

That means that we only need the operators{>,¬,∧,E ,EU ,E i}!

Page 51: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Some equivalences

ϕ ∨ ψ ≡ ¬(¬ϕ ∧ ¬ψ)

A iϕ ≡ ¬E i¬ϕE♦ ≡ E(> U ϕ)

A ϕ ≡ ¬E♦¬ϕA(ϕU ψ) ≡ ¬( E(¬ψ U ¬(ϕ ∨ ψ)) ∨ E ¬ψ )

That means that we only need the operators{>,¬,∧,E ,EU ,E i}!

Page 52: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Some equivalences

ϕ ∨ ψ ≡ ¬(¬ϕ ∧ ¬ψ)

A iϕ ≡ ¬E i¬ϕE♦ ≡ E(> U ϕ)

A ϕ ≡ ¬E♦¬ϕA(ϕU ψ) ≡ ¬( E(¬ψ U ¬(ϕ ∨ ψ)) ∨ E ¬ψ )

That means that we only need the operators{>,¬,∧,E ,EU ,E i}!

Page 53: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Contents

1 General Introduction

2 Kripke Models

3 CTL

4 ATL

5 Model checking

Page 54: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

ATL

Alternating-time Temporal Logic (ATL) is an agentizedextension of CTL introduced by Alur and colleagues (1997)The language of ATL is obtained by replacing A and E with〈〈C〉〉 where C ⊆ Ag and Ag is the finite set of all agents inthe systemIntuitively,

〈〈C〉〉♦ϕmeans that

C can cooperate to ensure that ϕ becomes true sometimein the future no matter what the other agents do (andsimilarly for h, , U )C has a strategy to enforce that ϕ becomes true sometimein the futureIs used to reason about game-like distributed systems

Page 55: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example

〈〈merkel , sarkozy〉〉♦¬crisis

Merkel and Sarkozy can cooperate to ensure that at some pointin the future the crisis is over

Page 56: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example

〈〈Ann〉〉 〈〈Bob〉〉♦win

Page 57: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

ATL and CTL

CTL is contained in ATL:A ≡ 〈〈∅〉〉E ≡ 〈〈Ag〉〉

Page 58: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Definition (ATL models)

A concurrent game structure is a tuple M = 〈Ag,S, π,Act ,d ,o〉,where:

Ag: a finite set of all agentsS: a set of statesπ: a valuation of propositionsAct : a finite set of (atomic) actionsd : Ag × S → ℘(Act) defines actions available to an agentin a stateo: a deterministic transition function that assigns outcomestates q′ = o(q, α1, . . . , αk ) to states and tuples of actions

A strategy for agent i is a function f : S → Act such that

f (s) ∈ d(i , s)

Page 59: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Definition (ATL models)

A concurrent game structure is a tuple M = 〈Ag,S, π,Act ,d ,o〉,where:

Ag: a finite set of all agentsS: a set of statesπ: a valuation of propositionsAct : a finite set of (atomic) actionsd : Ag × S → ℘(Act) defines actions available to an agentin a stateo: a deterministic transition function that assigns outcomestates q′ = o(q, α1, . . . , αk ) to states and tuples of actions

A strategy for agent i is a function f : S → Act such that

f (s) ∈ d(i , s)

Page 60: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Definition (ATL models)

A concurrent game structure is a tuple M = 〈Ag,S, π,Act ,d ,o〉,where:

Ag: a finite set of all agentsS: a set of statesπ: a valuation of propositionsAct : a finite set of (atomic) actionsd : Ag × S → ℘(Act) defines actions available to an agentin a stateo: a deterministic transition function that assigns outcomestates q′ = o(q, α1, . . . , αk ) to states and tuples of actions

A strategy for agent i is a function f : S → Act such that

f (s) ∈ d(i , s)

Page 61: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Definition (ATL models)

A concurrent game structure is a tuple M = 〈Ag,S, π,Act ,d ,o〉,where:

Ag: a finite set of all agentsS: a set of statesπ: a valuation of propositionsAct : a finite set of (atomic) actionsd : Ag × S → ℘(Act) defines actions available to an agentin a stateo: a deterministic transition function that assigns outcomestates q′ = o(q, α1, . . . , αk ) to states and tuples of actions

A strategy for agent i is a function f : S → Act such that

f (s) ∈ d(i , s)

Page 62: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Definition (ATL models)

A concurrent game structure is a tuple M = 〈Ag,S, π,Act ,d ,o〉,where:

Ag: a finite set of all agentsS: a set of statesπ: a valuation of propositionsAct : a finite set of (atomic) actionsd : Ag × S → ℘(Act) defines actions available to an agentin a stateo: a deterministic transition function that assigns outcomestates q′ = o(q, α1, . . . , αk ) to states and tuples of actions

A strategy for agent i is a function f : S → Act such that

f (s) ∈ d(i , s)

Page 63: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Definition (ATL models)

A concurrent game structure is a tuple M = 〈Ag,S, π,Act ,d ,o〉,where:

Ag: a finite set of all agentsS: a set of statesπ: a valuation of propositionsAct : a finite set of (atomic) actionsd : Ag × S → ℘(Act) defines actions available to an agentin a stateo: a deterministic transition function that assigns outcomestates q′ = o(q, α1, . . . , αk ) to states and tuples of actions

A strategy for agent i is a function f : S → Act such that

f (s) ∈ d(i , s)

Page 64: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Definition (ATL models)

A concurrent game structure is a tuple M = 〈Ag,S, π,Act ,d ,o〉,where:

Ag: a finite set of all agentsS: a set of statesπ: a valuation of propositionsAct : a finite set of (atomic) actionsd : Ag × S → ℘(Act) defines actions available to an agentin a stateo: a deterministic transition function that assigns outcomestates q′ = o(q, α1, . . . , αk ) to states and tuples of actions

A strategy for agent i is a function f : S → Act such that

f (s) ∈ d(i , s)

Page 65: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: Robots and Carriage

1 2

1

2

1

2

pos0

pos1pos2

q0

q2 q1

pos0

pos1

wait,wait

wait,wait wait,wait

push,push

push,push push,push

push

,wai

t

push,wait

push,wait

wait,push

pos2

wait,pushw

ait,p

ush

Page 66: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: Robots and Carriage

q0

q2 q1

pos0

pos1

wait,wait

wait,wait wait,wait

push,push

push,push push,push

push

,wai

t

push,wait

wait,push

push,wait

wait,push

wai

t,pus

h

pos2

pos0 → 〈〈1〉〉 ¬pos1

Page 67: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: Robots and Carriage

q0

q2 q1

pos0

pos1

wait,wait

wait,wait wait,wait

push,push

push,push push,push

push

,wai

t

push,waitpush,w

aitwait,push

pos2

wait,pushw

ait,p

ush

pos0 → 〈〈1〉〉 ¬pos1

Page 68: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: Robots and Carriage

q0

q2 q1

pos0

pos1

wait,wait

wait,wait wait,wait

push,push

push,push push,push

push

,wai

t

push,wait

wait,push

push,wait

wait,push

wai

t,pus

h

pos2

wait

waitpush

pos0 → 〈〈1〉〉 ¬pos1

Page 69: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: Robots and Carriage

q0

q2 q1

pos0

pos1

wait,waitwait

wait,wait wait,waitwait

push,push

push,push push,push

push

,wai

t

push

push,wait

wait,push

wait

push,wait

wait,push

wai

t,pus

h

wai

t

pos2

pos0 → 〈〈1〉〉 ¬pos1

Page 70: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: Robots and Carriage

q0

q2 q1

pos0

pos1

wait,waitwait

wait,wait wait,waitwait

push,push

push,push push,push

push

,wai

t

push

push,wait

wait,push

wait

push,wait

wait,push

wai

t,pus

h

wai

t

pos2

pos0 → 〈〈1〉〉 ¬pos1

Page 71: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: Robots and Carriage

q0

q2 q1

pos0

pos1

wait,waitwait,wait

wait,wait wait,waitwait,wait

push,push

push,pushpush,push push,push

push

,wai

t

push

,wai

t

push,wait

wait,push

wait,push

push,wait

wait,push

wai

t,pus

h

wai

t,pus

h

pos2

pos0 → 〈〈1〉〉 ¬pos1

Page 72: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Example: Robots and Carriage

q0

q2 q1q1

pos0

pos1pos1

wait,waitwait,wait

wait,wait wait,waitwait,wait

push,push

push,pushpush,push push,push

push

,wai

t

push

,wai

t

push,wait

wait,push

wait,push

push,wait

wait,push

wai

t,pus

h

wai

t,pus

h

pos2

pos0 → 〈〈1〉〉 ¬pos1

Page 73: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Contents

1 General Introduction

2 Kripke Models

3 CTL

4 ATL

5 Model checking

Page 74: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Verification

Verification means to make sure that the design of a(hardware or software) system is correctAriane 5: the world’s most expensive software bug(exploded 37 seconds after takeoff)

Page 75: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Formal specification and verification

Traditional verification methods such as simulation ortesting are not exhaustive, they don’t explore all possiblebehaviours of the systemFormal verification methods do, and they can thereforegive a guarantee that the design does not have any errorsWe specify the properties we want to check that thesystem has as a formula in some formal logic

Example: A (t1 → A♦c1) (liveness)Two main techniques:

Proof-based: describe also the system using formal logic,and try to find a formal proof that the property followsModel-based: describe the system using a mathematicalstructure, and use an algorithm to check whether theproperty holds

Page 76: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Reasoning: satisfiability

The satisfiability problem is as follows:Given a formula ϕ is there some interpretation that makesϕ true?How hard is the satisfiability problem?

For Coalition Logic: PSPACE-complete (Pauly, 2001).For CTL: EXPTIME-complete – a lower bound for ATL.

Page 77: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Reasoning with ATL: Satisfiability

Theorem (van Drimmelen, 2003)For any fixed set of agents Ag, satisfiability for ATL formulaeover Ag is EXPTIME-complete.

But if the set of agents is not fixed, van Drimmelen’s algorithmis 2EXPTIME.

Theorem (Walther, Lutz, Wolter, Wooldridge, 2006)

The satisfiability problem for arbitrary ATL formulae isEXPTIME-complete (and hence no harder than CTL).

Page 78: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Reasoning with ATL: Satisfiability

Theorem (van Drimmelen, 2003)For any fixed set of agents Ag, satisfiability for ATL formulaeover Ag is EXPTIME-complete.

But if the set of agents is not fixed, van Drimmelen’s algorithmis 2EXPTIME.

Theorem (Walther, Lutz, Wolter, Wooldridge, 2006)

The satisfiability problem for arbitrary ATL formulae isEXPTIME-complete (and hence no harder than CTL).

Page 79: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Reasoning with ATL: Satisfiability

Theorem (van Drimmelen, 2003)For any fixed set of agents Ag, satisfiability for ATL formulaeover Ag is EXPTIME-complete.

But if the set of agents is not fixed, van Drimmelen’s algorithmis 2EXPTIME.

Theorem (Walther, Lutz, Wolter, Wooldridge, 2006)

The satisfiability problem for arbitrary ATL formulae isEXPTIME-complete (and hence no harder than CTL).

Page 80: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Model checking

Successfull model-based verification techniqueInput: K , ϕOutput: yes if K |= ϕ

Effective algorithms exist

Page 81: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Model checking

Modelchecker

A□ (A◇ enabled)

"no"

Input: model and formula Output: "no" and a counterexample(sequence of states where theproperty does not hold)

"yes"

Page 82: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Model checking: complexity

Model checking CTL and ATL can be done in time polynomial inthe size of the formula and the number of states in the model

... if the model is explicitly represented

Page 83: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Model checking: complexity

Model checking CTL and ATL can be done in time polynomial inthe size of the formula and the number of states in the model

... if the model is explicitly represented

Page 84: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Explicit representation

Explicit representation is often not feasibleNumber of states increase exponentially with the numberof independent variables

v1=0v2=0

v1=1v2=0

v1=0v2=1

v1=1v2=1

2 independent variables number of variables

number of states

Page 85: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Model representation languages

Practical model checkers use high-level modelspecification languages.Reactive modules: a rule-based language for modelspecification. . .

module toggle controls xinit[]> -> x ′ := >[]> -> x ′ := ⊥update[]x-> x ′ := ⊥[](¬x)->x ′ := >

Page 86: Lecture 1: Specifying and verifying state-transition models

General Introduction Kripke Models CTL ATL Model checking

Practical model checking

The complexity of model checking depends on the specificationlanguage and the representation of the model.

Theorem (van der Hoek, Lomuscio, Wooldridge, AAMAS06)For Reactive Modules models, model checking is exactly ashard as theorem proving in the corresponding language:

ATL EXPTIME-completeCoalition Logic PSPACE-completeprop logic co-NP-complete