Symbolic synthesis of state based reactive programs Diploma Thesis - - PowerPoint PPT Presentation

symbolic synthesis of state based reactive programs
SMART_READER_LITE
LIVE PREVIEW

Symbolic synthesis of state based reactive programs Diploma Thesis - - PowerPoint PPT Presentation

Symbolic synthesis of state based reactive programs Diploma Thesis Nico Wallmeier 18.03.03 Structure 1. Background 2. Infinite games over a finite game graph 3. Transformation to the symbolic state space 4. Applications 18.03.03 Nico


slide-1
SLIDE 1

Symbolic synthesis of state based reactive programs

Diploma Thesis

Nico Wallmeier 18.03.03

slide-2
SLIDE 2

18.03.03 Nico Wallmeier 2

Structure

  • 1. Background
  • 2. Infinite games over a finite game graph
  • 3. Transformation to the symbolic state space
  • 4. Applications
slide-3
SLIDE 3
  • 1. Background
slide-4
SLIDE 4

18.03.03 Nico Wallmeier 4

Motivation

  • Crash of the first Ariane-5 rocket

(iX, September 1996)

  • Computation error of the Intel Pentium processor

⇒Verification is necessary

  • Testing & Simulation

– Does not supply any correctness guarantee – Sometimes only limited applicability

⇒ Computer aided techniques in formal verification

slide-5
SLIDE 5

18.03.03 Nico Wallmeier 5

Model Checking

  • Clarke, Emerson et al.:

Model checking is an automatic technique for verifying correctness properties of safety-critical reactive systems.

  • System is tested against a specification
  • If an error occurs an error scenario will be

generated

slide-6
SLIDE 6

18.03.03 Nico Wallmeier 6

Model Checking - 2

  • Procedure

Real system Specification Temporal logic formula System model

Model Checker

slide-7
SLIDE 7

18.03.03 Nico Wallmeier 7

Model Checking - 3

  • Success in practical applications with two

ideas (symbolic Model Checking):

– Specification logic CTL (polynomial time) by Clarke and Emerson at the beginning of the 1980s – Symbolic method to overcome the “state explosion problem” – presentation of the states is done via BDDs (Binary Decision Diagrams) (Lee, Akers, Moret and Bryant)

slide-8
SLIDE 8

18.03.03 Nico Wallmeier 8

Infinite two person games

  • Better system model: 2 agents

– Controller (agent 0) – Environment (agent 1)

  • Specification by

– Game graph – Winning condition for player 0

  • Play: Infinite path in the game graph
slide-9
SLIDE 9

18.03.03 Nico Wallmeier 9

Infinite two person games - 2

  • Classical theory of solving games

– 1969 Büchi, Landweber – 1993 McNaughton – Currently: EU-project GAMES (Aachen, Bordeaux, ..., Warsaw)

  • Goal of this work:

– Transformation to the symbolic method – Implementation of these algorithms

slide-10
SLIDE 10

18.03.03 Nico Wallmeier 10

Goal

  • Goal is to solve such examples:

Express floor Postoffice Express floor

. . .

slide-11
SLIDE 11

18.03.03 Nico Wallmeier 11

Specification

  • Two lifts in a building with e floors should satisfy:

– All requested floors will be served – The highest and the ground floor are served directly – No lift drives past a requested floor on his way – At most one person gets in a lift at a time – At least three floors are not requested – In the second floor is the post office. A lift needs one turn of the controller to wait there for exchanging the mail. – Both lifts are not at the same time in the second floor.

slide-12
SLIDE 12
  • 2. Infinite games over a finite game

graph

slide-13
SLIDE 13

18.03.03 Nico Wallmeier 13

Game graph

  • Game graph G is defined by

– Set of states – Transitions (every state must have a successor)

  • Play ρ is a infinite sequence of states

ρ=ρ(0)ρ(1)ρ(2)... with (ρ(i),ρ(i+1))∈E

  • Oc(ρ)={ q | ∃i ρ(i)=q } – occurrence set
  • In(ρ)={ q | ∃ωi ρ(i)=q } – infinity set

1

Q Q Q ∪ = &

Q Q E × ⊆

slide-14
SLIDE 14

18.03.03 Nico Wallmeier 14

Overview winning conditions

In(ρ) ∩ F ≠ ∅ F ⊆ Q Büchi Temporal: Oc(ρ) ⊆ F F ⊆ Q Safety Pi, Qi ⊆ Q (1≤i≤r) Request-Response max(In(c(ρ))) is even c:Q→{0,...,k} Parity Oc(ρ) ∈ F F ⊆ Pot(Q) Staiger-Wagner max(Oc(c(ρ))) is even c:Q→{0,...,k} Weak parity Oc(ρ) ∩ F ≠ ∅ F ⊆ Q Reachability Winning condition Requirement Name

) ) ( ) ( (

1 i i r i

R j j j P j j ∈ ′ ≥ ′ ∃ ⇒ ∈ ∀ ∧

=

ρ ρ ) (

1 i i r i

R F P G →

=

slide-15
SLIDE 15

18.03.03 Nico Wallmeier 15

Method for solving example

  • 1. Capture safety conditions by restricting

the game graph

  • 2. Rest of winning conditions is conjunction
  • f request-response conditions:

Reduce to Büchi condition

  • 3. Solve game for Büchi condition
slide-16
SLIDE 16

18.03.03 Nico Wallmeier 16

Reachability winning condition

  • Simplest winning condition:

reachability of a set F

  • player 0 wins the play ρ ⇔

ρ reaches a state in the set F sometime

  • Solution with “Attractor”: Compute for

i=0,1,2,… the nodes, from which player 0 can reach the set F in ≤ i moves

slide-17
SLIDE 17

18.03.03 Nico Wallmeier 17

Attractor

  • Definition

– Attr0i(F) = { q∈Q | player 0 can reach the set F from q in ≤ i moves} – Attr00(F) = F – Attr0i+1(F) = Attr0i(F) ∪ { q∈Q0 | ∃(q,r)∈E with r∈Attr0i(F) } ∪ { q∈Q1 | ∀(q,r)∈E holds r∈Attr0i(F) }

  • Conclusions:

– Attr0i(F) ⊆ Attr0i+1(F) – Attr0m(F) = Attr0m+1(F) for a m ≤ |Q| ⇒ Attr0(F)= Attr0m(F) for such a m

slide-18
SLIDE 18

18.03.03 Nico Wallmeier 18

Use of attractor computation

  • Solvable games by attractor computation

– Reachability game – Safety game – Weak parity game – Büchi game

slide-19
SLIDE 19
  • 3. Transformation to the symbolic state

space

slide-20
SLIDE 20

18.03.03 Nico Wallmeier 20

Motivation

  • Abstract state space:

– „State Explosion Problem“ – Analogous to Model Checking – Often no practical application possible

⇒In this work the symbolic method is introduced (as known from Model Checking)

slide-21
SLIDE 21

18.03.03 Nico Wallmeier 21

Symbolic state space

  • Set of Boolean variables
  • Concrete state is an assignment of all

variables of V

  • 2n states → n variables

} ,..., { as well as } ,..., {

n n

v v V v v V ′ ′ = ′ =

slide-22
SLIDE 22

18.03.03 Nico Wallmeier 22

Symbolic game graph

  • Is defined by formulas for

– Nodes of player 0 – Nodes of player 1 – Transitions

  • Nodes of player 0

– ϕ0 = ¬v0

  • Nodes of player 1

– ϕ1 = v0

slide-23
SLIDE 23

18.03.03 Nico Wallmeier 23

Symbolic game graph - 2

  • Transition formula τ

i. ¬v0 ∧ ¬v1 ∧ v0‘ ii. ¬v0 ∧ v1 ∧ ¬v1‘

  • iii. v0 ∧ ¬v1 ∧ v1‘
  • iv. v0 ∧ v1 ∧ (v0‘ ⇔ ¬v1‘)
slide-24
SLIDE 24

18.03.03 Nico Wallmeier 24

Attractor

  • Definition

– Attr00(λ) = λ – Attr0i+1(λ) = Attr0i(λ) ∨ ( ϕ0 ∧ ( τ ∧ Attr0i(λ)|V→V‘ )|V ) ∨ ( ϕ1 ∧ ¬( τ ∧ ¬Attr0i(λ)|V→V‘ )|V )

  • Strategy

– Strat00(λ) = false – Strat0i+1(λ) = Strat0i(λ) ∨ ( Attr0i+1(λ) ∧ ¬Attr0i(λ) ∧ τ ∧ ( ϕ1 ∨ ( ϕ0 ∧ Attr0i(λ)|V→V‘ )))

slide-25
SLIDE 25

18.03.03 Nico Wallmeier 25

Achieved results

Attractor computation Safety McNaughton-algorithm Parity Attractor+ and Recur Büchi Reduction to Büchi Request-Response Reduction to weak parity Staiger-Wagner Attractor computation Weak parity Attractor computation Reachability Solution Game

slide-26
SLIDE 26
  • 4. Applications
slide-27
SLIDE 27

18.03.03 Nico Wallmeier 27

Input language

  • x[2], x‘[2]
  • Boolean Operations such as Or, And, XOr,

XAnd, Not, ...

  • Existential and universal quantifier for

variable indices – e.g. Ei{i<3} x[i]

  • Arithmetic for variable indices, e.g. x[i+3]
  • External parameters
slide-28
SLIDE 28

18.03.03 Nico Wallmeier 28

Case study

  • Request-Response game with 3·(e-2) RR-pairs
  • 5·e+3 variables for e floors

– e variables: Position first lift – e variables: Position second lift – e variables: Requests on the floors – e variables: Requests in the first lift – e variables: Requests in the second lift – One variable to determine the player – Two variables for the post office

slide-29
SLIDE 29

18.03.03 Nico Wallmeier 29

Case study - 2

119,006,208 516,864 1,200 Büchi game Size Size winning regions Solve BDD Size Floors 12,913 673 25 game graph 12,913 191.10 m 172.29 s 5 1 672 73.09 s 53.77 s 4 1 24 30.38 s 40.69 s 3 player 1 player 0 game creation

slide-30
SLIDE 30

18.03.03 Nico Wallmeier 30

Case study - 3

Winning strategy of the environment for five floors

Force one lift to second floor, let it wait one move with no other requests and look at second lift:

Ground floor + 1. floor

  • 4. floor

Ground floor + 4. floor

  • 3. floor

Ground floor + 4. floor

  • 1. floor
  • 1. floor + 4. floor

Ground floor Chosen Requests

  • Pos. 2. Lift

E P E

slide-31
SLIDE 31

18.03.03 Nico Wallmeier 31

Further work

  • Develop suitable restrictions for

– Game graph specification – Winning conditions

  • Hierarchical approach (SDL specification)
  • Support for time conditions
slide-32
SLIDE 32

18.03.03 Nico Wallmeier 32

Screenshots

slide-33
SLIDE 33

18.03.03 Nico Wallmeier 33

Screenshots - 2

slide-34
SLIDE 34

18.03.03 Nico Wallmeier 34

Screenshots - 3

slide-35
SLIDE 35

18.03.03 Nico Wallmeier 35

Screenshots - 4

slide-36
SLIDE 36

18.03.03 Nico Wallmeier 36

Screenshots - 5