114

Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Synthesis

Sven S hewe

University of Liverpool

AVACS Autumn S hool, O tober 2

nd

, 2015

Page 2: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

A Modest Goal

obtain orre t systems . . .

Page 3: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

A Modest Goal

obtain orre t systems . . .

. . . without doing anything.

Spe i� ation

Implementation

Veri� ation

orre t

in orre t

Spe i� ation Synthesis

implementation

unrealisable

Page 4: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Appli ations

Dete tion of in onsistent spe i� ations

Partial design veri� ation

(Early error dete tion)

Error lo alisation

Automated prototyping

Page 5: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Synthesis

Spe i� ation Spe i� ation

& Ar hite ture

ATL, ATL*, CL + CTL, LTL, CTL*

alternating-time �- al ulus + �- al ulus

Requirement: The s ientist an get as mu h o�ee as she likes.

ATL*: hhs ientistii get

o�ee

Page 6: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Synthesis

Spe i� ation Spe i� ation

& Ar hite ture

ATL, ATL*, CL + CTL, LTL, CTL*

alternating-time �- al ulus + �- al ulus

environment

ontroller

brewing group

sensorgrinder

want

o�ee

get

o�ee

brew!

grind!

b info

g info

d

o

n

e

Requirement: The s ientist an get as mu h o�ee as she likes.

LTL: (want

o�ee

! get

o�ee

)

CTL: 8 (want

o�ee

! 8 get

o�ee

)

Page 7: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Synthesis

Spe i� ation Spe i� ation

& Partial Design

ATL, ATL*, CL + CTL, LTL, CTL*

alternating-time �- al ulus + �- al ulus

environment

ontroller

brewing group

sensorgrinder

want

o�ee

get

o�ee

brew!

grind!

b info

g info

d

o

n

e

Requirement: The s ientist an get as mu h o�ee as she likes.

LTL: (want

o�ee

! get

o�ee

)

CTL: 8 (want

o�ee

! 8 get

o�ee

)

Page 8: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Synthesis

Spe i� ation Spe i� ation

& Partial Design

ATL, ATL*, CL + CTL, LTL, CTL*

alternating-time �- al ulus + �- al ulus

environment

ontroller

brewing group

sensorgrinder

want

o�ee

get

o�ee

brew!

grind!

b info

g info

d

o

n

e

| {z }

Automata-Theory

| {z }

Constru tive Non-Emptiness Games

Page 9: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

The birth of the synthesis problem

Alonzo Chur h Summer Institute of Symboli Logi

Cornell University 1957

Given a requirement whi h a ir uit is to satisfy, we may suppose

the requirement expressed in some suitable logisti system whi h is

an extension of restri ted re ursive arithmeti . The synthesis

problem is then to �nd re ursion equivalen es representing a ir uit

that satis�es the given requirement (or alternatively, to determine

that there is no su h ir uit).

Page 10: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

Env Pro

Input

Variables

Output

Variables

Chur h's Solvability Problem 1963

Given: an interfa e spe i� ation

(identi� ation of input and output variables)

and a behavioural spe i� ation '

Sought: an implementation (Input

! Output), satisfying '

Input

j= '

Page 11: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

Env Pro

Input

Variables

Output

Variables

Chur h's Solvability Problem 1963

Given: an interfa e spe i� ation

(identi� ation of input and output variables)

and a behavioural spe i� ation '

Sought: an implementation (Input

! Output), satisfying '

Env k Pro j= '

Page 12: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

Env Pro

Input

Variables

Output

Variables

Chur h's Solvability Problem 1963

Given: an interfa e spe i� ation

(identi� ation of input and output variables)

and a behavioural spe i� ation '

Sought: an implementation (Input

! Output), satisfying '

9Pro 8Env. Env k Pro j= '

Page 13: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Part I

But how? History and Simpli ity of Synthesis

Page 14: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Synthesis through the ages

1963 Chur h's solvability problem

1969 B�u hi and Landweber, �nite games of in�nte duration

1969 Rabin's solution based on deterministing !-automata

Algorithms LTL

1989 Pnueli and Rosner

2005 Kupferman and Vardi \Safraless"

2007 S and Finkbeiner \B�u hiless"

Tools LTL

2009 Filiot, Jin, and Raskin (Anti hain)

2010 Ehlers (BDD)

. . .

Page 15: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Algorithms

in the vi inity of synthesis

Tree Automata

1

Proje tion simple

2

Narrowing / information hiding simple

Word Automata

1

determinisation diÆ ult

Page 16: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Algorithms

in the vi inity of synthesis

Tree Automata

1

Proje tion simple

2

Narrowing / information hiding simple

Word Automata

1

determinisation diÆ ult

But why is it diÆ ult?

Page 17: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Finite and B�u hi Automata

1 2

a; b

a; b

b

Finite Automata

interpreted over �nite words here: over � = fa; bg

run: start at some initial state

stepwise: read an input letter, and

traverse the automaton respe tively

a epting: is in a �nal state after pro essing the omplete word

language: words with a epting runs

here: �

r f"g

Page 18: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Finite and B�u hi Automata

1 2

a; b

a; b

b

B�u hi Automata

interpreted over in�nite words here: over � = fa; bg

run: start at some initial state

stepwise: read an input letter, and

traverse the automaton respe tively

a epting: is in�nitely often in a �nal state while pro essing

the omplete !-word

language: words with a epting runs

here: !-words with �nitely many a's

Page 19: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Determinisation of Finite Automata

1 2

a; b

a; b

b

1

1; 2

a; b

a; b

Page 20: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Determinisation of B�u hi Automata

1 2

a; b

a; b

b

Deterministi B�u hi Automata . . .

. . . are less expressive than nondeterministi B�u hi automata.

Example Language: All words with �nitely many a's

Constru t an input word by repeatedly

hoosing b's until a �nal state is rea hed

hoosing an a on e.

) determinisation requires more involved a eptan e

ondition

Page 21: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Determinisation of B�u hi Automata

1 2

a; b

a; b

b

b

a

a b

Muller Automata

Table of a eptable in�nity sets.

�nitely many a's:

f�g

Page 22: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Determinisation of B�u hi Automata

b

a

a b

Muller Automata normal forms

Rabin: list of pairs (A

i

;R

i

) of a epting and reje ting

states

for some pair, some a epting and no reje ting

state o urs in�nitely often

Streett: list of pairs (A

i

;R

i

) of a epting and reje ting

states (dual ase)

for all pairs, some a epting or no reje ting

state o urs in�nitely often

Parity: priority fun tion states! N

lowest priority o urring in�nitely often is even

Rabin hain or Streett double hain ondition

Page 23: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Determinisation of B�u hi Automata

b

a

a b

Muller Automata normal forms

Rabin: list of pairs (A

i

;R

i

) of a epting and reje ting

states

for some pair, some a epting and no reje ting

state o urs in�nitely often

Streett: list of pairs (A

i

;R

i

) of a epting and reje ting

states (dual ase)

for all pairs, some a epting or no reje ting

state o urs in�nitely often

Parity: priority fun tion states! N

lowest priority o urring in�nitely often is even

Rabin hain or Streett double hain ondition

Page 24: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Determinisation of B�u hi Automata

b

a

a b

Muller Automata normal forms

Rabin: list of pairs (A

i

;R

i

) of a epting and reje ting

states

for some pair, some a epting and no reje ting

state o urs in�nitely often

Streett: list of pairs (A

i

;R

i

) of a epting and reje ting

states (dual ase)

for all pairs, some a epting or no reje ting

state o urs in�nitely often

Parity: priority fun tion states! N

lowest priority o urring in�nitely often is even

Rabin hain or Streett double hain ondition

Page 25: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Algorithms

determinising !-automata

1969 Rabin's solution based on deterministing !-automata

1988 Safra n

O(n)

1988 Mi hel n

�(n)

2006 Piterman O(n!

2

) (bound by [S08℄)

2008 S O

( n)

n

with � 1:65 Rabin

2008 Col ombet and Zdanowski �

( n)

n

Rabin

2012 S and Varghese determinising GBA

2014 S and Varghese �(n!

2

) parity and Streett

Page 26: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Part II

Warm-Up: LTL { Automata & Simple Cases

Page 27: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Automata & Games

LTL

LTL ) alternating word automata (AA)

AA ) a eptan e game for tra es

AA 6) existen e game for tra es

NBA ) existen e game for tra es

NBA and model he king

Page 28: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Linear-Time Temporal Logi s

{ as a word language {

LTL formulas

' ::= true j p j :' j ' ^ ' j ' _ ' j ' j ' j' j 'U '

p: p

': '

':'

': ' ' ' ' ' ' ' ' ' '

'U : ' ' ' ' ' ' ' '

Page 29: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Linear-Time Temporal Logi s

{ a ba kwards aproa h {

p _:p

a harmless tautology

p: p p p p p p p : : :

p:

p p p p p p p p

:p:p p

p _:p:p p p p p p p p p p

p _:p:p p p p p p p p p p

p _:p:p p p p p p p p p

Page 30: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

A eptan e Game

p _:p AA

1 p _:p ! p _:p ^ p _:p

2 p _:p ! p _:p _ p _:p

3 p _:p ! p _:p

4 p ! p

5 :p ! :p

p: p p p p p p p : : :

Page 31: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Emptiness Game

p _:p AA

1 p _:p ! p _:p ^ p _:p

2 p _:p ! p _:p _ p _:p

3 p _:p ! p _:p

4 p ! p

5 :p ! :p

Page 32: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Emptiness Game

p ^:p AA

1 p ^:p ! p ^:p ^ p ^:p

2 p ^:p ! p ^:p _ p ^:p

3 p ^:p ! p ^:p

4 p ! p

5 :p ! :p

the a eptan e player an heat

by using previous hoi es of the reje tion player when

onstru ting a \model"

Page 33: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Emptiness Game

p ^:p AA

1 p ^:p ! p ^:p ^ p ^:p

2 p ^:p ! p ^:p _ p ^:p

3 p ^:p ! p ^:p

4 p ! p

5 :p ! :p

the a eptan e player an heat

by using previous hoi es of the reje tion player when

onstru ting a \model"

Page 34: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

A eptan e Game

{ non-deterministi automata {

p _:p GBA

1

f ; ; p _:p; p; pg

2

f ; ; p _:p; p;:pg

3

f ; ; p _:p;:p; pg

4

f ; ; p _:p;:p;:pg

5

f ; ; pg

6

f ; ;:pg

p: p p p p p p p : : :

GBA: 3 2 1 1 3 2 1 1 1 1

Page 35: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Emptiness Game

{ non-deterministi automata {

p _:p GBA

1

f ; ; p _:p; p; pg

2

f ; ; p _:p; p;:pg

3

f ; ; p _:p;:p; pg

4

f ; ; p _:p;:p;:pg

5

f ; ; pg

6

f ; ;:pg

Page 36: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Model Che king Game

{ non-deterministi automata {

p _:p GBA

1

f ; ; p _:p; p; pg

2

f ; ; p _:p; p;:pg

3

f ; ; p _:p;:p; pg

4

f ; ; p _:p;:p;:pg

5

f ; ; pg

6

f ; ;:pg

Input

j= '

Page 37: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Model Che king Game

{ non-deterministi automata {

p _:p GBA

1

f ; ; p _:p; p; pg

2

f ; ; p _:p; p;:pg

3

f ; ; p _:p;:p; pg

4

f ; ; p _:p;:p;:pg

5

f ; ; pg

6

f ; ;:pg

Input

6j= '

Page 38: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Model Che king Game

{ non-deterministi automata {

p _:p GBA

1

f ; ; p _:p; p; pg

2

f ; ; p _:p; p;:pg

3

f ; ; p _:p;:p; pg

4

f ; ; p _:p;:p;:pg

5

f ; ; pg

6

f ; ;:pg

Input

6j= :'

Page 39: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Model Che king Game

{ non-deterministi automata {

p _:p GBA

1

f ; ; p _:p; p; pg

2

f ; ; p _:p; p;:pg

3

f ; ; p _:p;:p; pg

4

f ; ; p _:p;:p;:pg

5

f ; ; pg

6

f ; ;:pg

Input

6j= '

Page 40: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Model Che king Game

{ universal automata {

: p _:p UCA

1

f ; ; p _:p; p; pg

2

f ; ; p _:p; p;:pg

3

f ; ; p _:p;:p; pg

4

f ; ; p _:p;:p;:pg

5

f ; ; pg

6

f ; ;:pg

Input

j= '

Page 41: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Model Che king Game

{ universal automata {

p _:p UCA

NBA for :p ^ p

1

f g

2

f ; ; p;:pg

(blo ks as NBA, a epts immediately as UCA)

Input

j= '

Page 42: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Part III

Automata & Solvability

Page 43: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

Env Pro

Input

Variables

Output

Variables

Chur h's Solvability Problem { 1963

Given: an interfa e spe i� ation

(identi� ation of input and output variables)

and a behavioural spe i� ation '

Sought: an implementation (Input

! Output), satisfying '

Input

j= '

Page 44: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Automata & Games for Synthesis

Implementation

Computation Tree

Automata-theoreti approa h

Spe i� ation ' � Automaton A

'

Models of ' � Language of A

'

Realisability of ' � Language Non-Emptiness of A

'

Page 45: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

{ on the running example {

Env Pro

;

p

as before { AA won't do

how about NA?

Page 46: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

{ on the running example {

Env Pro

;

p

as before { AA won't do

how about NA?

Page 47: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

{ on the running example {

Env Pro

p

;

p _:p GBA

1

f ; ; p _:p; p; pg

2

f ; ; p _:p; p;:pg

3

f ; ; p _:p;:p; pg

4

f ; ; p _:p;:p;:pg

5

f ; ; pg

6

f ; ;:pg

Page 48: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

{ on the running example {

Env Pro

p

;

p _:p UCA

NBA for :p ^ p

1

f g

2

f ; ; p;:pg

(blo ks as NBA, a epts immediately as UCA)

Page 49: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Chur h's Solvability Problem

{ in omplete information {

Env Pro

Input

Variables

Output

Variables

AA ) UA / NA ) DA (expensive)

Input

j= '

Page 50: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Extension: In omplete Information

Env Pro

Input

Variables

Output

Variables

Hidden

Variables

UA / NA ) DA (expensive)

\narrowing operation" AA ) AA, UA ) UA, NA 6) NA

if dir

1

and dir

2

are indistinguishable and

you'd send s

1

to dir

1

and s

2

to dir

2

; send s

1

and s

2

to dir

12

Page 51: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Extension: In omplete Information

Env Pro

Input

Variables

Output

Variables

Hidden

Variables

UA / NA ) DA (expensive)

\narrowing operation" AA ) AA, UA ) UA, NA 6) NA

if dir

1

and dir

2

are indistinguishable and

you'd send s

1

to dir

1

and s

2

to dir

2

; send s

1

and s

2

to dir

12

Page 52: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

Part IV

Distributed Strategies

Page 53: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

Distributed Synthesis

{ lassi results {

De idable Ar hite tures

Pipelines [Pnueli+Rosner 90℄

Two-Way Chains [Kupferman+Vardi 01℄

One-Way Rings [Kupferman+Vardi 01℄

Unde idable Ar hite ture

a

b d

[Pnueli+Rosner 90℄

Page 54: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

What does a Pro ess Know?

Env b1 b2 b3 b4

a b d

pro ess b2 knows its input

pro ess b2 knows its output

) pro ess b2 knows the input to pro ess b3

) pro ess b2 knows the output of pro ess b3

: : : least �xed point ) knowledge of b2

Page 55: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

What does a Pro ess Know?

Env b1 b2 b3 b4

a b d

pro ess b2 knows its input

pro ess b2 knows its output

) pro ess b2 knows the input to pro ess b3

) pro ess b2 knows the output of pro ess b3

: : : least �xed point ) knowledge of b2

Page 56: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

What does a Pro ess Know?

Env b1 b2 b3 b4

a b d

pro ess b2 knows its input

pro ess b2 knows its output

) pro ess b2 knows the input to pro ess b3

) pro ess b2 knows the output of pro ess b3

: : : least �xed point ) knowledge of b2

Page 57: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

What does a Pro ess Know?

Env b1 b2 b3 b4

a b d

pro ess b2 knows its input

pro ess b2 knows its output

) pro ess b2 knows the input to pro ess b3

) pro ess b2 knows the output of pro ess b3

: : : least �xed point ) knowledge of b2

Page 58: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

What does a Pro ess Know?

Env b1 b2 b3 b4

a b d

pro ess b2 knows its input

pro ess b2 knows its output

) pro ess b2 knows the input to pro ess b3

) pro ess b2 knows the output of pro ess b3

: : : least �xed point ) knowledge of b2

Page 59: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

Super-Pro esses

Env b1 b2 b3 b4

a b d

b2 is better informed than b3 and b4 (b2 � b3, b4)

b2 an simulate b3 and b4

) b2 an be used as a super-pro ess

Page 60: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De idability of Ar hite tures

{ parti ularities {

� is an order

pro esses in omparable by �

a

b d

Page 61: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

Information Fork

Envw1

b2

b3

b4

b5

b2 ' b5 � b3, b4

Unde idable

a

b

b

b

d

d

e

e

f

f

Page 62: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

Information Fork

Env b1

w2

b3

b4

b5

b1 � b5 � b3, b4

Unde idable

a

b

b

b

d

d

e

e

f

f

Page 63: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

No Information Fork

Env b1

b2

w3

b4

b5

b1 � b2 ' b5 � b4

De idable

a

b

b

b

d

d

e

e

f

f

Page 64: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1 b2

a; b

a

A

'

a epts strategies for super-pro ess

Automata transformation: A

'

� B

'

B

'

a epts a strategy for pro ess b2 i�

there is a strategy for pro ess b1 su h that

their omposition is a epted by A

'

test non-emptiness of B

'

A

0

'

{ a epts proper strategies for b1

test non-emptiness of A

0

'

Page 65: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1 b2

a; b

a

A

'

a epts strategies for super-pro ess

Automata transformation: A

'

� B

'

B

'

a epts a strategy for pro ess b2 i�

there is a strategy for pro ess b1 su h that

their omposition is a epted by A

'

test non-emptiness of B

'

A

0

'

{ a epts proper strategies for b1

test non-emptiness of A

0

'

Page 66: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1s2

a; b

a

A

'

a epts strategies for super-pro ess

Automata transformation: A

'

� B

'

B

'

a epts a strategy for pro ess b2 i�

there is a strategy for pro ess b1 su h that

their omposition is a epted by A

'

test non-emptiness of B

'

A

0

'

{ a epts proper strategies for b1

test non-emptiness of A

0

'

Page 67: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1s2

a; b

a

A

'

a epts strategies for super-pro ess

Automata transformation: A

'

� B

'

B

'

a epts a strategy for pro ess b2 i�

there is a strategy for pro ess b1 su h that

their omposition is a epted by A

'

test non-emptiness of B

'

A

0

'

{ a epts proper strategies for b1

test non-emptiness of A

0

'

Page 68: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Envs1 s2

a; b

a

A

'

a epts strategies for super-pro ess

Automata transformation: A

'

� B

'

B

'

a epts a strategy for pro ess b2 i�

there is a strategy for pro ess b1 su h that

their omposition is a epted by A

'

test non-emptiness of B

'

A

0

'

{ a epts proper strategies for b1

test non-emptiness of A

0

'

Page 69: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1 b2

a; b

a

LTL, UWA / UT A, DWA / DT A

proje tion (NT A), narrowing (AT A),

non-determinisation NT A

\annotate" strategy { UT A

determinise { DT A

proje t strategy { NT A

test non-emptiness of NT A { TS / DTA

interse t

test non-emptiness

Page 70: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1 b2

a; b

a

LTL, UWA / UT A, DWA / DT A

proje tion (NT A), narrowing (AT A),

non-determinisation NT A

\annotate" strategy { UT A

determinise { DT A

proje t strategy { NT A

test non-emptiness of NT A { TS / DTA

interse t

test non-emptiness

Page 71: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1 b2

a; b

a

LTL, UWA / UT A, DWA / DT A

proje tion (NT A), narrowing (AT A),

non-determinisation NT A

\annotate" strategy { UT A

determinise { DT A

proje t strategy { NT A

test non-emptiness of NT A { TS / DTA

interse t

test non-emptiness

Page 72: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1s2

a; b

a

LTL, UWA / UT A, DWA / DT A

proje tion (NT A), narrowing (AT A),

non-determinisation NT A

\annotate" strategy { UT A

determinise { DT A

proje t strategy { NT A

test non-emptiness of NT A { TS / DTA

interse t

test non-emptiness

Page 73: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Env b1s2

a; b

a

LTL, UWA / UT A, DWA / DT A

proje tion (NT A), narrowing (AT A),

non-determinisation NT A

\annotate" strategy { UT A

determinise { DT A

proje t strategy { NT A

test non-emptiness of NT A { TS / DTA

interse t

test non-emptiness

Page 74: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

{ ordered ar hite ture {

Envs1 s2

a; b

a

LTL, UWA / UT A, DWA / DT A

proje tion (NT A), narrowing (AT A),

non-determinisation NT A

\annotate" strategy { UT A

determinise { DT A

proje t strategy { NT A

test non-emptiness of NT A { TS / DTA

interse t

test non-emptiness

Page 75: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

Env b1

b2

w3

b4

b5

a

b

b

b

d

d

e

e

f

f

Ar hite ture transformation 3 linear on bla k-box pro esses

merge equivalent pro esses

atta h white-box pro esses to better informed pro ess

remove feedba k

Page 76: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

Env b1

b2,b5

w3

b4

a

bb

b

; f

d

d

e

e

f

Ar hite ture transformation 3 linear on bla k-box pro esses

merge equivalent pro esses

atta h white-box pro esses to better informed pro ess

remove feedba k

Page 77: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

Env b1

b2,b5

w3

b4

a

b

b

; f

d

d

e

e

f

Ar hite ture transformation 3 linear on bla k-box pro esses

merge equivalent pro esses

atta h white-box pro esses to better informed pro ess

remove feedba k

Page 78: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

Env b1

b2,b5,w3

b4

a

b

b

; f

e

d ; f

Ar hite ture transformation 3 linear on bla k-box pro esses

merge equivalent pro esses

atta h white-box pro esses to better informed pro ess

remove feedba k

Page 79: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

De ision Pro edure

Env b1

b2,b5,w3

b4

a

b

d ; f

Ordered Ar hite ture

de ision pro edure

adds one exponent / level of knowledge

hardness result

Page 80: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

Perfe t { But Something 's Wrong

Interfa es { friend or foe?

theory: restri ted information an be abused

pra ti e: then it is a spe i� ation error

Infeasible omplexity non-elementary, unde idable

theory: ompleteness result

maximal size of minimal model

pra ti e: no small model ) spe i� ation error

Rede�ne realisability

there is a feasible model

prede�ned bounds on the implementation

) Bounded Synthesis

Page 81: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

Perfe t { But Something 's Wrong

Interfa es { friend or foe?

theory: restri ted information an be abused

pra ti e: then it is a spe i� ation error

Infeasible omplexity non-elementary, unde idable

theory: ompleteness result

maximal size of minimal model

pra ti e: no small model ) spe i� ation error

Rede�ne realisability

there is a feasible model

prede�ned bounds on the implementation

) Bounded Synthesis

Page 82: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

knowledge information fork synthesis li� hanger

Perfe t { But Something 's Wrong

Interfa es { friend or foe?

theory: restri ted information an be abused

pra ti e: then it is a spe i� ation error

Infeasible omplexity non-elementary, unde idable

theory: ompleteness result

maximal size of minimal model

pra ti e: no small model ) spe i� ation error

Rede�ne realisability

there is a feasible model

prede�ned bounds on the implementation

) Bounded Synthesis

Page 83: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Part V

Two Steps Towards Pra ti e

Page 84: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Overview

Spe i� ation '

Universal Co-B�u hi Automaton

Deterministi

Parity Automaton

Parity

Emptiness Game

Parameterised Deterministi

Safety Automaton

Parameterised Safety

Emptiness Game

SMT Problem

SMT Solving

t

r

a

d

i

t

i

o

n

a

l

bounded

Complete Information

Distributed

Sequen e of Automata Transformations

Safra-Constru tions { Exponential

Lo ality Constraints

Small { Usually Cheap

Page 85: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Overview

Spe i� ation '

Universal Co-B�u hi Automaton

Deterministi

Parity Automaton

Parity

Emptiness Game

Parameterised Deterministi

Safety Automaton

Parameterised Safety

Emptiness Game

SMT Problem

SMT Solving

t

r

a

d

i

t

i

o

n

a

l

bounded

Complete Information

Distributed

Sequen e of Automata Transformations

Safra-Constru tions { Exponential

Lo ality Constraints

Small { Usually Cheap

Page 86: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Overview

Spe i� ation '

Universal Co-B�u hi Automaton

Deterministi

Parity Automaton

Parity

Emptiness Game

Parameterised Deterministi

Safety Automaton

Parameterised Safety

Emptiness Game

SMT Problem

SMT Solving

t

r

a

d

i

t

i

o

n

a

l

bounded

Complete Information

Distributed

Sequen e of Automata Transformations

Safra-Constru tions { Exponential

Lo ality Constraints

Small { Usually Cheap

Page 87: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Example { Simpli�ed Arbiter

1

2 3

?

g

1

g

2

r

1

r

2

g

1

g

2

Synthesis with Complete Information

env

p

1

p

2

r

1

; r

2

r

1

; r

2

g

1

g

2

env

p

1

r

1

; r

2

g

1

; g

2

Page 88: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

From Co-B�u hi to Safety

1

2 3

?

g

1

g

2

r

1

r

2

g

1

g

2

Realisable spe i� ation

�nite implementation { size s

bound b on the number of reje ting states { b � s � jF j

safety ondition

s an be bounded by the size of the resp. deterministi automaton

Page 89: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Parameterised Emptiness Game

env

p

1

Input

r

1

; r

2

Output

g

1

; g

2

1

2 3

?

g

1

g

2

r

1

r

2

g

1

g

2

(0; ; )

(0; 0; ) (0; 0; 0) (0; ; 0)

(0; 1; )

(0; 1; 1)

(0; ; 1)

(0; 1; 0) (0; 0; 1)

g

1

g

2

g

1

g

2

g

1

g

2

Page 90: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Parameterised Emptiness Game

env

p

1

Input

r

1

; r

2

Output

g

1

; g

2

1

2 3

?

g

1

g

2

r

1

r

2

g

1

g

2

(0; 1; )

Semanti s of a Game Positon

olle ts the paths of the run tree

i-th position in the annotation:

: no path ends in automaton-state i

n 2 N: a path may end in automaton-state i

ea h su h path has � n previous visits to reje ting states

Page 91: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Parameterised Emptiness Game

env

p

1

Input

r

1

; r

2

Output

g

1

; g

2

1

2 3

?

g

1

g

2

r

1

r

2

g

1

g

2

(0; ; )

(0; 0; ) (0; 0; 0) (0; ; 0)

(0; 1; )

(0; 1; 1)

(0; ; 1)

(0; 1; 0) (0; 0; 1)

g

1

g

2

g

1

g

2

g

1

g

2

Page 92: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Parameterised Emptiness Game

env

p

1

Input

r

1

; r

2

Output

g

1

; g

2

1

2 3

?

g

1

g

2

r

1

r

2

g

1

g

2

(0; ; )

(0; 0; ) (0; 0; 0) (0; ; 0)

(0; 1; )

(0; 1; 1)

(0; ; 1)

(0; 1; 0) (0; 0; 1)

g

1

g

2

g

1

g

2

g

1

g

2

Page 93: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Completeness

(0; 1; 0; r

1

r

2

; g

1

g

2

) (0; 1; 0; r

1

r

2

; g

1

g

2

) (0; 1; 0; r

1

r

2

; g

1

g

2

) (0; 1; 0; r

1

r

2

; g

1

g

2

)

(0; 0; 1; r

1

r

2

; g

1

g

2

) (0; 0; 1; r

1

r

2

; g

1

g

2

) (0; 0; 1; r

1

r

2

; g

1

g

2

) (0; 0; 1; r

1

r

2

; g

1

g

2

)

Theorem { Completeness

An (input preserving) transition system is a epted by a UCB

, it has a valid annotation.

Proof idea

Cy le with reje ting state rea hable in the run graph

, no valid annotation.

Page 94: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

bounded example safety emptiness game implementation ompleteness bounded synthesis

Progress Constraints { Automaton Transitions

output omplexity: NP- omplete

1

2 3?

g

1

g

2

r

1

r

2

g

1

g

2

8t: �

B

1

(t)! �

B

1

(�

r

1

r

2

(t)) ^ �

#

1

(�

r

1

r

2

(t)) � �

#

1

(t)

^ �

B

1

(�

r

1

r

2

(t)) ^ �

#

1

(�

r

1

r

2

(t)) � �

#

1

(t)

^ �

B

1

(�

r

1

r

2

(t)) ^ �

#

1

(�

r

1

r

2

(t)) � �

#

1

(t)

^ �

B

1

(�

r

1

r

2

(t)) ^ �

#

1

(�

r

1

r

2

(t)) � �

#

1

(t)

8t: �

B

1

(t)! :g

1

(t) _ :g

2

(t)

8t: �

B

1

(t) ^ r

1

(t)! �

B

2

(�

r

1

r

2

(t)) ^ �

#

2

(�

r

1

r

2

(t)) � �

#

1

(t)

^ �

B

2

(�

r

1

r

2

(t)) ^ �

#

2

(�

r

1

r

2

(t)) � �

#

1

(t)

^ �

B

2

(�

r

1

r

2

(t)) ^ �

#

2

(�

r

1

r

2

(t)) � �

#

1

(t)

^ �

B

2

(�

r

1

r

2

(t)) ^ �

#

2

(�

r

1

r

2

(t)) � �

#

1

(t)

8t: �

B

2

(t) ^ :g

1

(t)! �

B

2

(�

r

1

r

2

(t)) ^ �

#

2

(�

r

1

r

2

(t)) > �

#

2

(t)

^ �

B

2

(�

r

1

r

2

(t)) ^ �

#

2

(�

r

1

r

2

(t)) > �

#

2

(t)

^ �

B

2

(�

r

1

r

2

(t)) ^ �

#

2

(�

r

1

r

2

(t)) > �

#

2

(t)

^ �

B

2

(�

r

1

r

2

(t)) ^ �

#

2

(�

r

1

r

2

(t)) > �

#

2

(t)

Page 95: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Expli it Synthesis

Env Pro

Input

Variables

Output

Variables

Chur h's Solvability Problem { 1963

Given: an interfa e spe i� ation

(identi� ation of input and output variables)

and a behavioural spe i� ation '

Sought: a ir uit s.t. (Input

! Output) satis�es '

TS j= '

CTL: EXPTIME- omplete, exponential transition system

LTL: 2EXPTIME- omplete, doubly exponential TS

Page 96: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Expli it vs. Su in t

ounter:

^

1<i�n

8 (p

i

= 8 p

i

)$

^

j<i

p

j

^ (p

i

= 9 p

i

)$

^

j<i

p

j

expli it su in t

ir uit

transition system program

Kripke stru ture online Turing ma hine

2

n

states tape size n

Page 97: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t Synthesis

min-output PSPACE- omplete

Env Pro

Input

Variables

Output

Variables

Is there always a small oTM? CTL

if and

only if

PSPACE = EXPTIME

Is there always a small & fast ir uit? CTL

if and

only if

EXPTIME � P/poly

LTL: dito for intermediate automata

Page 98: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t Synthesis

min-output PSPACE- omplete

Env Pro

Input

Variables

Output

Variables

Is there always a small oTM? CTL

if and

only if

PSPACE = EXPTIME

Is there always a small & fast ir uit? CTL

if and

only if

EXPTIME � P/poly

LTL: dito for intermediate automata

Page 99: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t Synthesis

min-output PSPACE- omplete

Env Pro

Input

Variables

Output

Variables

Is there always a small oTM? CTL

if and

only if

PSPACE = EXPTIME

Is there always a small & fast ir uit? CTL

if and

only if

EXPTIME � P/poly

LTL: dito for intermediate automata

Page 100: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t Synthesis

Env Pro

Input

Variables

Output

Variables

Is there always a small oTM? CTL

if and

only if

PSPACE = EXPTIME

only if: guess & verify EXPTIME- omplete

hen e: PSPACE in the minimal su in t solution

if: mu h harder

uses the DSA from bounded synthesis

Page 101: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t Synthesis

Env Pro

Input

Variables

Output

Variables

Is there always a small oTM? CTL

if and

only if

PSPACE = EXPTIME

only if: guess & verify EXPTIME- omplete

hen e: PSPACE in the minimal su in t solution

if: mu h harder

uses the DSA from bounded synthesis

Page 102: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t Synthesis

Env Pro

Input

Variables

Output

Variables

Is there always a small oTM? CTL

if and

only if

PSPACE = EXPTIME

only if: guess & verify EXPTIME- omplete

hen e: PSPACE in the minimal su in t solution

if: mu h harder

uses the DSA from bounded synthesis

Page 103: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

PSPACE=EXPTIME ) Small Model

env

p

1

Input

r

1

; r

2

Output

g

1

; g

2

1

2 3

?

g

1

g

2

r

1

r

2

g

1

g

2

(0; ; )

(0; 0; ) (0; 0; 0) (0; ; 0)

(0; 1; )

(0; 1; 1)

(0; ; 1)

(0; 1; 0) (0; 0; 1)

g

1

g

2

g

1

g

2

g

1

g

2

Page 104: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t & Fast Synthesis

Env Pro

Input

Variables

Output

Variables

Is there always a small & fast ir uit? CTL

if and

only if

EXPTIME � P/poly

if: as before

only if: onstru tion not enough

en ode universal spa e bounded ATM

environment provides initial tape

immediate answer to the halting problem

Page 105: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t & Fast Synthesis

Env Pro

Input

Variables

Output

Variables

Is there always a small & fast ir uit? CTL

if and

only if

EXPTIME � P/poly

if: as before

only if: onstru tion not enough

en ode universal spa e bounded ATM

environment provides initial tape

immediate answer to the halting problem

Page 106: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Su in t & Fast Synthesis

Env Pro

Input

Variables

Output

Variables

Is there always a small & fast ir uit? CTL

if and

only if

EXPTIME � P/poly

if: as before

only if: onstru tion not enough

en ode universal spa e bounded ATM

environment provides initial tape

immediate answer to the halting problem

Page 107: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Implementations

General Sear h: Geneti Progamming & Co

Gal Katz, Doron Peled: MCGP: A Software Synthesis Tool

Based on Model Che king and Geneti Programming. ATVA

2010: 359-364

Gal Katz, Doron Peled: Code Mutation in Veri� ation and

Automati Code Corre tion. TACAS 2010: 435-450

Gal Katz, Doron Peled: Model Che king-Based Geneti

Programming with an Appli ation to Mutual Ex lusion.

TACAS 2008: 141-156

Colin G. Johnson: Geneti Programming with Fitness Based

on Model Che king. EuroGP 2007: 114-124

Page 108: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

Sneak Preview

Sear h mutex leader ele tion

Te hnique 2 shared bits 3 shared bits 3 nodes 4 nodes

simulated

annealing

exe ution time 20 23 84 145

su ess rate 19 23 19 17

overall time 105.26 100 442.1 852.94

hybrid

exe ution time 113 171 418 536

su ess rate 31 17 15 11

overall time 364.51 1,005.88 2,786.66 4,872.72

geneti

programming

exe ution time 583 615 1120 1311

su ess rate 7 7 3 3

overall time 8,328.57 8,785.71 37,333.33 43,700.00

Page 109: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

pure bounded su in t summary

Part VII

summary

Page 110: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

pure bounded su in t summary

Automata Theoreti Approa h

pro: simple

narrowing

proje tion

determinisation (word)

pro: lean

introdu tion of Partial Designs

hara terisation of the lass of de idable

ar hite tures �

uniform synthesis algorithm

on: beyond pri e

on: does not bene�t from small solutions

Page 111: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

pure bounded su in t summary

Bounded Synthesis

Bounded Synthesis

guess implementation & verify

NP omplete in minimal transition system & A

'

pro: omplexity loser to model he king

pro: appli able to distributed systems

on: transition system vs. program / ir uit

Page 112: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

pure bounded su in t summary

Su in t Synthesis

| is good news |

Env Pro

Input

Variables

Output

Variables

Is there always a small oTM? CTL

if and

only if

PSPACE = EXPTIME

Is there always a small & fast ir uit? CTL

if and

only if

EXPTIME � P/poly

Page 113: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

pure bounded su in t summary

Synthesis vs. Model Che king

Bounded Synthesis of Su in t Systems

onstru t a orre t program / ir uit

PSPACE omplete in minimal program / ir uit & '

pro: omplexity equal to model he king

pro: appli able to distributed systems

Page 114: Synthesis - AVACS · Octob er 2 nd, 2015. A Mo dest Goal obtain rrect co systems. . . A Mo dest Goal obtain rrect co systems. . .. . . without doing anything. Sp eci cation Implementation

pure bounded su in t summary

Summary

Distributed Synthesis

de idability

omplexity

Bounded Synthesis

de idability

omplexity

Su in t Synthesis

de idability

omplexity