models and theory of computation (mtc) epfl

61
Models and Theory of Computation (MTC) EPFL Dirk Beyer, Jasmin Fisher, Nir Piterman Simon Kramer: Logic for cryptography Marc Schaub: Models for biological systems Vasu Singh: Software interface derivation Gregory Theoduloz: Combining model checking and program analysis Arindam Chakrabarti: Web service interfaces Krishnendu Chatterjee: Stochastic games Slobodan

Upload: mona-lucas

Post on 03-Jan-2016

25 views

Category:

Documents


1 download

DESCRIPTION

Models and Theory of Computation (MTC) EPFL Dirk Beyer, Jasmin Fisher, Nir Piterman - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Models and Theory of Computation (MTC) EPFL

Models and Theory of Computation (MTC)

EPFL

Dirk Beyer, Jasmin Fisher, Nir Piterman

Simon Kramer: Logic for cryptography Marc Schaub: Models for biological systems Vasu Singh: Software interface derivation Gregory Theoduloz: Combining model checking and program analysis

Arindam Chakrabarti: Web service interfaces Krishnendu Chatterjee: Stochastic games Slobodan Matic: Time-triggered programming Vinayak Prabhu: Robust hybrid systems

Page 2: Models and Theory of Computation (MTC) EPFL

Model Checking: From Graphs to Games

Tom Henzinger EPFL

Page 3: Models and Theory of Computation (MTC) EPFL

Graph Models of Systems

vertices = states

edges = transitions

paths = behaviors

Page 4: Models and Theory of Computation (MTC) EPFL

Game Models of Systems

vertices = states

edges = transitions

paths = behaviors

players = components

Page 5: Models and Theory of Computation (MTC) EPFL

graph

Game Models of Systems

INDEPENDENT COMPONENTS:

game

FAIRNESS: -automaton

PROBABILITIES: Markov decision process

stochastic game

regular game

Page 6: Models and Theory of Computation (MTC) EPFL

Graphs vs. Games

a

baa b

a

Page 7: Models and Theory of Computation (MTC) EPFL

-synthesis [Church, Rabin, Ramadge/Wonham, Pnueli/Rosner et al.]

-receptiveness [Dill, Abadi/Lamport]

-semantics of interaction [Abramsky]

-reasoning about adversarial behavior

-interface-based design

-modular reasoning [Kupferman/Vardi et al.]

-early error detection [deAlfaro/H/Mang]

-model-based testing [Gurevich et al.]

-scheduling [Sifakis et al.]

-reasoning about security [Raskin et al.]

-etc.

Game Models enable

Page 8: Models and Theory of Computation (MTC) EPFL

Game Models

Always about open systems:

-players = processes / components / agents

-input vs. output

-demonic vs. angelic nondeterminism

Page 9: Models and Theory of Computation (MTC) EPFL

Game Models

Always about open systems:

-players = processes / components / agents

-input vs. output

-demonic vs. angelic nondeterminism

1. Output games: input demonic (adversarial)

2. Input games: output demonic

Page 10: Models and Theory of Computation (MTC) EPFL

Output Games

P1:

init x := 0

loop

choice | x := x+1 mod 2| x := 0

end choice

end loop

S1: (x ¸ y )

P2:

init y := 0

loop

choice | y := x | y := x+1 mod 2

end choice

end loop

S2: even(y)

Page 11: Models and Theory of Computation (MTC) EPFL

Graph Questions

8 (x ¸ y)

9 (x ¸ y)

Page 12: Models and Theory of Computation (MTC) EPFL

Graph Questions

8 (x ¸ y)

9 (x ¸ y)00

10 11

01

X

Page 13: Models and Theory of Computation (MTC) EPFL

Zero-Sum Game Questions

hhP1ii (x ¸ y)

hhP2ii even(y)

Page 14: Models and Theory of Computation (MTC) EPFL

Zero-Sum Game Questions

hhP1ii (x ¸ y)

hhP2ii even(y)

00

00 00

10

10 10

01

01 01

11

1111ATL [Alur/H/Kupferman]

X

Page 15: Models and Theory of Computation (MTC) EPFL

Nonzero-Sum Game Questions

hhP1ii (x ¸ y)

hhP2ii even(y)

00

00 00

10

10 10

01

01 01

11

1111

Page 16: Models and Theory of Computation (MTC) EPFL

Nonzero-Sum Game Questions

hhP1ii (x ¸ y)

hhP2ii even(y)

00

00 00

10

10 10

01

01 01

11

1111

Secure equilibrium [Chatterjee/H/Jurdzinski]

Page 17: Models and Theory of Computation (MTC) EPFL

Classical Notion of Rationality

Nash equilibrium: none of the players gains by deviation.

3,1 1,0

4,23,2

(row, column)

Page 18: Models and Theory of Computation (MTC) EPFL

Refined Notion of Rationality

Nash equilibrium: none of the players gains by deviation.

Secure equilibrium: none hurts the opponent by deviation.

3,1 1,0

4,23,2

(row, column)

Page 19: Models and Theory of Computation (MTC) EPFL

Secure Equilibrium

• Natural notion of rationality for multi-component systems:– First, a component tries to meet its specification.– Second, a component may obstruct the other components.

• A secure equilibrium is a contract:

if one player deviates to lower the other player’s payoff, then her own payoff decreases as well, and vice versa.

Page 20: Models and Theory of Computation (MTC) EPFL

Theorem

W10 hhP1ii (S1 Æ : S2 )

W01 hhP2ii (S2 Æ : S1)

W11

W00

hhP1iiS1 hhP2iiS2

Page 21: Models and Theory of Computation (MTC) EPFL

Generalization of Determinacy

W10

W01

W11

W00W1

W2

Zero-sum games: S1 = :S2 Nonzero-sum games: S1, S2

hhP2iiS2

hhP1iiS1

Page 22: Models and Theory of Computation (MTC) EPFL

Game Models

Always about open systems:

-players = processes / components / agents

-input vs. output

-demonic vs. angelic nondeterminism

1. Output games: input demonic (adversarial)

2. Input games: output demonic

Page 23: Models and Theory of Computation (MTC) EPFL

Input Games

x! y!

x! z!

a?b?

b?

a?

Control objective: : z

Page 24: Models and Theory of Computation (MTC) EPFL

Input Games

x! y!

x! z!

a?b?

b?

a?

Control objective: : z

Page 25: Models and Theory of Computation (MTC) EPFL

Input Games

x! y!

x! z!

a?b?

b?

a?

Control objective: : z

Page 26: Models and Theory of Computation (MTC) EPFL

Input Games

x! y!

x! z!

a?b?

b?

a?

Controller:

x? y?

a! b!

[Ramadge/Wonham et al.]

Page 27: Models and Theory of Computation (MTC) EPFL

Input Games

x! y!

x! z!

a?

b?

a?

Not input enabling

Page 28: Models and Theory of Computation (MTC) EPFL

Input Games

x! y!

x! z!

a?

b?

a?

Environment avoids deadlock

=

Input assumption

Interface automata [deAlfaro/H]

Page 29: Models and Theory of Computation (MTC) EPFL

Input Games

x! y!

x! z!

a?

b?

a?

x,y?

a!

Legal environment

Page 30: Models and Theory of Computation (MTC) EPFL

Input Games

x! y!

x! z!

a?

b?

a?

x,y?

b!

Illegal environment

Page 31: Models and Theory of Computation (MTC) EPFL

open

data

close

read

open?

read? data!

close?

File server

Interface Compatibility

Page 32: Models and Theory of Computation (MTC) EPFL

open

data

close

read

open?

read? data!

close?open!

data?

read!close!

Good client

Interface Compatibility

File server

Page 33: Models and Theory of Computation (MTC) EPFL

open

data

close

read

open?

read? data!

close?open!

open!

Interface Compatibility

Bad client File server

Page 34: Models and Theory of Computation (MTC) EPFL

Incremental Design

Page 35: Models and Theory of Computation (MTC) EPFL

Incremental Design

Page 36: Models and Theory of Computation (MTC) EPFL

Incremental Design

Page 37: Models and Theory of Computation (MTC) EPFL

Input assumption

Incremental Design

Input assumption

Page 38: Models and Theory of Computation (MTC) EPFL

Propagated weakest input assumption

Incremental Design

Page 39: Models and Theory of Computation (MTC) EPFL

x

y

a b

a? b?

x! y!

a? b?

y! x!

a?

x! y!

Input Assumption Propagation

Page 40: Models and Theory of Computation (MTC) EPFL

x

y

a ab b

a?

x,y?

a,b?

y?

a? b?

x! y!

a? b?

y! x!

a?

x! y!

Input Assumption Propagation

Page 41: Models and Theory of Computation (MTC) EPFL

x

y

a ab b

a?

x,y?

a,b?

y?

a? b?

x! y!

a? b?

y! x!

a?

x! y!

Input Assumption Propagation

Page 42: Models and Theory of Computation (MTC) EPFL

x

y

a ab b

a?

x,y?

a,b?

y?

a? b?

x! y!

a? b?

y! x!

a?

x! y!

Two interfaces are compatible if they can be used together in some environment.

Page 43: Models and Theory of Computation (MTC) EPFL

a b

a?

x! y!

b? a?

x y

y! y!

The Composite Interface

Page 44: Models and Theory of Computation (MTC) EPFL

Refinement

x! y!

x! z!

a?

b?

a?

x,y?

a!

Every legal environment should be a legal environment of the refined process.

y!

x,z?y?

Page 45: Models and Theory of Computation (MTC) EPFL

Refinement

x! y!

x! z!

a?

b?

a?

x,y?

a!

Every legal environment should be a legal environment of the refined process.

y!

x,z?y?

Page 46: Models and Theory of Computation (MTC) EPFL

Refinement

x! y!

x! z!

a?

b?

a?

x,y?

a!

Every legal environment should be a legal environment of the refined process.

y!

x,z?y?

b?

Page 47: Models and Theory of Computation (MTC) EPFL

Refinement

x! y!

x! z!

a?

b?

a?

x,y?

a!

Every legal environment should be a legal environment of the refined process.

y!

x,z?y?

Page 48: Models and Theory of Computation (MTC) EPFL

Refinement

x! y!

x! z!

a?

b?

a?

x,y?

a!

Every legal environment should be a legal environment of the refined process.

y!

x,z?y?

z!

Page 49: Models and Theory of Computation (MTC) EPFL

Interface Refinement: I/O Alternating Simulation

A’ A

iff

1. for all inputs i, if A –i?-> B , then there exists B’ such that A’ –i?-> B’ and B’ B ,

and

2. for all outputs o, if A’ –o!-> B’ , then there exists B such that A –o!-> B and B’ B .

Page 50: Models and Theory of Computation (MTC) EPFL

Interface Refinement: I/O Alternating Simulation

A’ A

iff

1. for all inputs i, if A –i?-> B , then there exists B’ such that A’ –i?-> B’ and B’ B ,

and

2. for all outputs o, if A’ –o!-> B’ , then there exists B such that A –o!-> B and B’ B .

Page 51: Models and Theory of Computation (MTC) EPFL

Interface Refinement: I/O Alternating Simulation

A’ A

iff

1. for all inputs i, if A –i?-> B , then there exists B’ such that A’ –i?-> B’ and B’ B ,

and

2. for all outputs o, if A’ –o!-> B’ , then there exists B such that A –o!-> B and B’ B .

Every environment (i.e., input strategy that avoids deadlock) for A is an environment for A’ [Alur/H/Kupferman/Vardi].

Page 52: Models and Theory of Computation (MTC) EPFL

If A and B is are compatible and A' A and B' B, then A’ and B' are compatible and A'||B' A||B.

A’ · A … A’ refines / implements A

The Principle of Independent Implementability

Page 53: Models and Theory of Computation (MTC) EPFL

If A and B is are compatible and A' A and B' B, then A’ and B' are compatible and A'||B' A||B.

A’ · A … A’ refines / implements A

The Principle of Independent Implementability

This is a theorem if

-A, B, A’, B’ are two-player games Input vs. Output

-two games are compatible if player Input has a winning strategy in the composite game

Page 54: Models and Theory of Computation (MTC) EPFL

Interface-based Design

Page 55: Models and Theory of Computation (MTC) EPFL

Interface-based Design

Page 56: Models and Theory of Computation (MTC) EPFL

Interface-based Design

Page 57: Models and Theory of Computation (MTC) EPFL

Interface-based Design

Page 58: Models and Theory of Computation (MTC) EPFL

Interface-based Design

Page 59: Models and Theory of Computation (MTC) EPFL

Summary

There are many models of computation (e.g. pushdown, timed, stochastic) and many models of interaction (e.g. synchronous).

Similarly, there are many variants of games (e.g. concurrent vs. turn-based moves; pure vs. randomized strategies).

Page 60: Models and Theory of Computation (MTC) EPFL

Summary

There are many models of computation (e.g. pushdown, timed, stochastic) and many models of interaction (e.g. synchronous).

Similarly, there are many variants of games (e.g. concurrent vs. turn-based moves; pure vs. randomized strategies).

The technical details are different, but to ask and answer the kind of questions we discussed, the only important feature of a model is the presence of multiple players.

Page 61: Models and Theory of Computation (MTC) EPFL

References

Interface Automata: de Alfaro, H FSE 2001

Secure Equilibria: Chatterjee, H, Jurdzinski LICS 2004