41
Game, Bisimulation and Model Checking Presented by Daniel Choi Provable Software Lab. KAIST

Game, Bisimulation and Model Checking

  • Upload
    lester

  • View
    23

  • Download
    0

Embed Size (px)

DESCRIPTION

Game, Bisimulation and Model Checking. Presented by Daniel Choi Provable Software Lab. KAIST. Game, Bisimulation and Model Checking. Content. Introduction Game Theory Classification of Games Notations Applications to Model Verification Bisimulation Model Checking Conclusion. - PowerPoint PPT Presentation

Citation preview

Page 1: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking

Presented by Daniel ChoiProvable Software Lab.

KAIST

Page 2: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Introduction

• Game Theory– Classification of Games– Notations

• Applications to Model Verification– Bisimulation– Model Checking

• Conclusion2/41

Game, Bisimulation and Model Checking

Content

Page 3: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

Game theory is the study of the choice of strategies by interacting rational agents.

Roger A. McCain, Game Theory: A Nontechnical Introduction to the Analysis of Strat-egy (South-western, 2004)

3/41

Introduction

Game Theory?

Page 4: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Nim Game

4/41

Introduction – Game Theory

Simple Example

Take one or more coins at the same rowThe player who takes the last coin wins

Example from : Roger A. McCain, Game Theory: A Nontechnical In-troduction to the Analysis of Strategy (South-western, 2004)

Page 5: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Players– Shin– Yun-ho

• Assumption– Shin starts first

• Strategies for Shin– Take one coin from the top row– Take one coin from the second row– Take both coins from the second row

5/41

Introduction – Game Theory – Simple Example

Rules for Nim Game

Page 6: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 6/41

Introduction – Game Theory – Simple Example

Tree Diagram for Nim

Al wins

Bob wins

Bob wins

Al wins

Al wins

Shin Wins

Yun-ho Wins

Shin Wins

Shin Wins

Yun-ho WinsShin’s turn

Shin’s turn

Yun-ho’s turn

Page 7: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• It can formally analyze the game– E.g. Tree diagram

• Metaphor– Many interactions can be treated and ana-

lyzed as a game

• Game theoretic analysis is to discover which strategy is a person’s best response to the strategies chosen by the others.

7/41

Introduction – Game Theory

Characteristics of Game Theory

Page 8: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Worst-Case Analysis– Game between a solver and an adversary

• Network routing– Game between client and environment– Game between router and clients

• Load-sharing in distributed systems– Game between server and client

(or other server)8/41

Introduction – Game Theory

Computer Science and Game Theory

Page 9: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 9/41

Game Theory - Motivation

Model Checking

Target ModelRequirement

Properties

(F W)

How about different ap-proaches?

Game Theory

Page 10: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 10/41

Game Theory - Motivation

Game Theoretical Framework for Model Checking

Target Model

Requirement Properties

(F W)

The model does not satisfy the

requirement properties!!

The model satisfies

the require-ment prop-

erties!!

Player 1

Player 2

Does Player 2 always win?

Page 11: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Introduction

• Game Theory– Classification of Games– Notations

• Applications to Model Verification– Bisimulation– Model Checking

• Conclusion11/41

Game, Bisimulation and Model Checking

Content

Page 12: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Non-cooperative game– The players act individually, each decision

of a player influences the payoff of the other players

• Cooperative game– The players are allowed to from coalitions

and combine their decision-making prob-lems

12/41

Game Theory

Classification of Games

Page 13: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Normal form– Decisions of players are simultaneous– The payoffs are represented by a matrix– Ex. Prisoner’s Dilemma

• Extensive form– Decisions of players are sequential– The payoffs are represented by a tree– Ex. Nim game

13/41

Game Theory – Classification of Games

Non-cooperative Game

Page 14: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 14/41

Game Theory – Classification of Games – Non-cooperative Game

Normal Forms – Prisoner’s Dilemma

Page 15: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Al Thinks rationally– Case 1: Bob confess

• If Al confess then Al will get 10 years and Bob will get 10 years• If Al does not confess then Al will get 20 years, Bob will get 0 years

– Case 2: Bob does not confess• If Al confess then Al will get 0 years, Bob will get 20 years• If Al does not confess then Al will get 1 years, Bob will get 1 years

15/41

Game Theory – Classification of Games – Non-cooperative Game

Normal Forms – Prisoner’s Dilemma

AlConfess Don’t

Bob

Con-fess

10 years, 10 years 0, 20 years

Don’t 20, 0 years 1 year, 1 year

Page 16: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Al Thinks rationally– Case 1: Bob confess

• If Al confess then Al will get 10 years and Bob will get 10 years• If Al does not confess then Al will get 20 years, Bob will get 0 years

– Case 2: Bob does not confess• If Al confess then Al will get 0 years, Bob will get 20 years• If Al does not confess then Al will get 1 years, Bob will get 1 years

16/41

Game Theory – Classification of Games – Non-cooperative Game

Cooperative Game

AlConfess Don’t

Bob

Con-fess

10 years, 10 years 0, 20 years

Don’t 20, 0 years 1 year, 1 year

Page 17: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Extensive game– With perfect information

• Any player knows all the moves made before one’s own move

– Without perfect information• A player makes one’s move in the game, one does not

know opponent player’s move

• Computation (run or sequence)– Interaction between “Player” and “Opponent”– Represented by a sequence of move– Opponent always makes the first move

17/41

Game Theory

Notations of Extensive Game

Page 18: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Definition of Game (MG, λG, PG)– MG : the set of moves of the game– λG : MG → {P, O}

• Labeling function designating each move as by Player or Opponent

– PG : the set of alternating se-quences of moves in MG

• Non-empty, prefix-closed

• Example– MG = {a1, a2, b1, b2, b3}– λG = {(a1, O), (a2, O),

(b1, P), (b2, P), (b3, P)}– PG = {ε , a1, a1b1, a2, a2b2, a2b3}

18/41

Game Theory - Notations of Extensive Game

Definition of Game

a1 a2

b1b2 b3

Page 19: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• A game can be seen as specifying the possi-ble interactions between a System and its Environment

• Games classify behaviors– Programs will be modeled by strategies

• Strategies are rules specifying how the System should actually play

– Deterministic strategy σ on a game G (σ ⊆ PGeven)

• ε ∈ σ• sab ∈ σ ⇒ s ∈ σ• sab, sac ∈ σ ⇒ b = c

19/41

Game Theory - Notations of Extensive Game - Definition of Game

Strategies

Page 20: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Introduction

• Game Theory– Classification of Games– Notations

• Applications to Model Verification– Bisimulation– Model Checking

• Conclusion20/41

Game, Bisimulation and Model Checking

Content

Page 21: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 21/41

Application to the Model Verification

CCS Overview

Page 22: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 22/41

Application to the Model Verification

CCS Overview

Page 23: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 23/41

Application to the Model Verification

CCS Overview

Page 24: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 24/41

Application to the Model Verification

CCS Overview

Page 25: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 25/41

Application to the Model Verification

CCS Overview

Page 26: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 26/41

Application to the Model Verification

CCS Overview

Page 27: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 27/41

Application to the Model Verification

CCS Overview

Page 28: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 28/41

Application to the Model Verification

CCS Overview

Page 29: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 29/41

Application to the Model Verification – CCS Overview

Bisimulation

Page 30: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 30/41

Application to the Model Verification – CCS Overview

Bisimulation

Page 31: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Bisimulation relation can be modeled as a Bisimu-lation game (Equivalence Game)– Observer can repeatedly interact with a process by

choosing an available transition from it– Observer match their selections so that they can pro-

ceed with further corresponding choices

• Equivalence game G(E0, F0)– Player I and II : Observers who make choices of transi-

tions– Player I attempts to show initial processes are different– Player II attempts to show two processes are equivalent

31/41

Application to the Model Verification

Game-theoretical View

Page 32: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Equivalence game G(E0, F0)– Player I chooses a transition Ej –a-> Ej+1 and then player II

chooses a transition with the same label Fj –a-> Fj+1

– Player I chooses a transition Fj –a-> Fj+1 and then player II chooses a transition with the same label Ej –a-> Ej+1

• Player I win– Player I can choose a transition and player II will be unable to

match it

• Player II win– If the play is infinite – If the play reaches the position (En, Fn) and both processes

have no available transitions 32/41

Application to the Model Verification

Game-theoretical View

Page 33: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

Clock and Clock2 is equiva-

lent!

Clock and

Clock2 is different!

33/41

Application to the Model Verification - Game-theoretical View

Example

tick

Clock

tick

Clock2

tick

Player I Player II

G(Clock, Clock2)

(Clock, Clock2), (Clock, tick.Clock2), (Clock, Clock2) …. Player II wins

Page 34: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

Clock and Clock’ is equiva-

lent!

Clock and

Clock’ is different!

34/41

Application to the Model Verification - Game-theoretical View

Example

0

Clock

tick

Clock’

tick

Player I Player II

G(Clock, Clock2)

(Clock, 0)Player I wins

tick

Page 35: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Winning Strategy π– If the player wins every play in which the player uses π

• PropositionFor any game G(E,F) either player I or player II has a

history-free winning strategy

• History-free : Rules do not depend on what happened previously in the play

• If player II has a winning strategy for G(E, F) then E is game equivalent to process F

35/41

Application to the Model Verification - Game-theoretical View

Winning Strategy

Page 36: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• E is game equivalent to F iff E is bisimular to F– Only if

• Showing that the relation R = {(E, F) | E and F are game equivalent} is a bisimulation.

– Player I’s move : E –a-> E’ (this is possible move by player I)Player II can respond with F –a-> F’ (by game equivalent relation)

– Player I’s move : F –a-> F’ (this is possible move by player I) Player II can respond with E –a-> E’ (by game equivalent relation)

– If• There is a bisimulation relation R s.t. (E, F) ∈ R, Construct

a winning strategy for player II for the game G(E, F)• In any play, whatever move player I makes player II re-

sponds by making sure that the resulting pair of pro-cesses remain in the relation R

36/41

Application to the Model Verification - Game-theoretical View

Game Equivalent

Page 37: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

tea

U ≡ 1p.(1p.tea.U + 1p.cof -fee.U)

cof -fee

tea1p

1p 1p 1p

1p 1p

1p

V ≡ 1p.1p.tea.V + 1p.1pcoffee.V

37/41

Applications - Bisimulation

Examples : Vending Machine

U and V is bisimula-tion rela-

tion!

U and V is not bisim-ulation re-

lation!

Player I Player II

G(U, V)

Page 38: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST 38/41

Applications - Bisimulation

Examples : Vending Machine

Player I Player II

V -1p->1p.tea.V

(U, V) -> (1p.tea.U + 1p.coffee.U,

1p.tea.V)

U -1p-> 1p.tea.U + 1p.coffee.U

1p.tea.U + 1p.coffee.U, 1p.tea.V-1p-> coffee.U

(1p.tea.U + 1p.coffee.U, 1p.tea.V)

-> (coffee.U, tea.V)

1p.tea.V -1p-> tea.V)

It is not bisimulation rela-tion

Page 39: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Introduction

• Game Theory– Classification of Games– Notations

• Applications to Model Verification– Bisimulation– Model Checking

• Conclusion39/41

Game, Bisimulation and Model Checking

Content

Page 40: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Semantics of Interaction

• Computability Logic: A Formal Theory of Interaction (In Interactive Comput-ing)

• Model mu-calculus– Property Checking Game– Model Checking Game

40/41

Conclusion

Further Study

Page 41: Game, Bisimulation and Model Checking

Game, Bisimulation and Model Checking, Daniel Choi@PSWLAB, KAIST

• Overview of Game Theory and Using to Model the Knowl-edge of Multi-Agent Systemby Thuy Lien PHAM, Marc BUI, Michel LAMURE In Actes de la Pre-mière Conférence Internationale RIVF'03 Rencontres en Informa-tique Vietnam-France, RIVF'03

• Bisimulation, Model Checking and Other Gamesby Colin Stirling, In Notes for Mathfit instructional meeting on games and computation, Edinburgh, June 1997

• Games and Model Mu-Calculusby Colin Stirling, In TACAS 1996 Lecture Notes in Computer Science 1055, 298-312, 1996

• Semantics and Logics of ComputationEdited by A. Pitts and P. Dybjer, Cambrige Press, 1996

41/41

Reference

List of Papers