Numerical Abstract Domain using Support Function. Yassamine Seladji - - PowerPoint PPT Presentation

numerical abstract domain using support function
SMART_READER_LITE
LIVE PREVIEW

Numerical Abstract Domain using Support Function. Yassamine Seladji - - PowerPoint PPT Presentation

Numerical Abstract Domain using Support Function. Yassamine Seladji and Olivier Bouissou. CEA, LIST, LMeASI. yassamine.seladji@cea.fr olivier.bouissou@cea.fr 19 juin 2012 Context An industriel problem The crash of Ariane 5 : caused by


slide-1
SLIDE 1

Numerical Abstract Domain using Support Function.

Yassamine Seladji and Olivier Bouissou.

CEA, LIST, LMeASI. yassamine.seladji@cea.fr

  • livier.bouissou@cea.fr

19 juin 2012

slide-2
SLIDE 2

Context

An industriel problem

◮ The crash of Ariane 5 : caused by an overflow.

= ⇒ 700 Million euro of lost.

2 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-3
SLIDE 3

Introduction

Fixpoint computation

Program

Input : S0 ⊆ ❘n Input : A ∈ ❘n × ❘m, b ∈ ❘m. Input : c ∈ ❘n, l ∈ ❘ X ∈ S0 while (X, c ≤ l) { X = AX + b. }

3 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-4
SLIDE 4

Introduction

Fixpoint computation

Program

Input : S0 ⊆ ❘n Input : A ∈ ❘n × ❘m, b ∈ ❘m. Input : c ∈ ❘n, l ∈ ❘ X ∈ S0 while (X, c ≤ l) { X = AX + b. } Si = Si−1 ∪ [(ASi−1 + b) ∩ (c, X ≤ l)]

3 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-5
SLIDE 5

Introduction

Static analysis by abstract interpretation

4 / 28 Yassamine Seladji , and , Olivier Bouissou.

z

  • n

e Sign ellipsoide Box Polyhedra T e m p l a t e Octagon Zonotope

slide-6
SLIDE 6

Introduction

Static analysis by abstract interpretation

4 / 28 Yassamine Seladji , and , Olivier Bouissou.

z

  • n

e Sign ellipsoide Box Polyhedra T e m p l a t e Octagon Zonotope

slide-7
SLIDE 7

Introduction

Static analysis by abstract interpretation

4 / 28 Yassamine Seladji , and , Olivier Bouissou.

Polyhedra

Constraints representation Generators representation

slide-8
SLIDE 8

Introduction

Static analysis by abstract interpretation

Polyhedra

Constraints representation Generators representation Support function

4 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-9
SLIDE 9

Outline

Support functions Definition Properties Abstract domain Definition Fixpoint computation The accelerated Kleene iteration Experimentation Related work Conclusion and future work

5 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-10
SLIDE 10

Support Function

Definition

Definition

Let S be a convex set and δS its support function, such that : ∀d ∈ ❘n, δS(d) = sup{x, d : x ∈ S}

6 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-11
SLIDE 11

Support Function

Over-approximation

Let ∆ = {d1, d2, d3, d4, d5} be a set of directions.

7 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-12
SLIDE 12

Support Function

Over-approximation

Let ∆ = {d1, d2, d3, d4, d5} be a set of directions.

7 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-13
SLIDE 13

Support Function

Over-approximation

Let ∆ = {d1, d2, d3, d4, d5} be a set of directions.

Property

Let S be a convex set, and ∆ ⊆ ❘n be a set of directions. We put P =

  • d∈∆

{x ∈ ❘n|x, d ≤ δS(d)} Then S ⊆ P

7 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-14
SLIDE 14

Support Function

Over-approximation

Let ∆ = {d1, d2, d3, d4, d5} be a set of directions.

The special case of polyhedron

Let P be a polyhedron. If P is represented by :

◮ Linear system, δP is obtained

using Linear Programming.

◮ Generators (vertices) vi,

δP(d) = sup{vi, d : vi ∈ P}.

7 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-15
SLIDE 15

Support Function

Properties

Properties

Let S, S′ be two convex sets. We have :

◮ ∀M ∈ ❘n × ❘m, δMS(d) = δS(MTd). ◮ ∀λ ≥ 0, δλS(d) = λδS(d). ◮ δS⊕S′(d) = δS(d) + δS′(d). ◮ δS∪S′(d) = max(δS(d), δS′(d)). ◮ δS∩S′(d) ≤ min(δS(d), δS′(d)).

8 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-16
SLIDE 16

Support Function

Properties

Properties

Let S, S′ be two convex sets. We have :

◮ ∀M ∈ ❘n × ❘m, δMS(d) = δS(MTd). ◮ ∀λ ≥ 0, δλS(d) = λδS(d). ◮ δS⊕S′(d) = δS(d) + δS′(d).S ⊕ S′ = {x + x′ | x ∈ S, x′ ∈ S′} ◮ δS∪S′(d) = max(δS(d), δS′(d)). ◮ δS∩S′(d) ≤ min(δS(d), δS′(d)).

8 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-17
SLIDE 17

Support Function

Properties

Properties

Let S, S′ be two convex sets. We have :

◮ ∀M ∈ ❘n × ❘m, δMS(d) = δS(MTd). ◮ ∀λ ≥ 0, δλS(d) = λδS(d). ◮ δS⊕S′(d) = δS(d) + δS′(d). ◮ δS∪S′(d) = max(δS(d), δS′(d)). ◮ δS∩S′(d) ≤ min(δS(d), δS′(d)).

8 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-18
SLIDE 18

Support Function

Properties

Properties

Let S, S′ be two convex sets. We have :

◮ ∀M ∈ ❘n × ❘m, δMS(d) = δS(MTd). ◮ ∀λ ≥ 0, δλS(d) = λδS(d). ◮ δS⊕S′(d) = δS(d) + δS′(d). ◮ δS∪S′(d) = max(δS(d), δS′(d)). ◮ δS∩S′(d) ≤ min(δS(d), δS′(d)).

8 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-19
SLIDE 19

Abstract domain

Definition

For a set of directions ∆, P ❘ ❘ ❘ ❘

9 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-20
SLIDE 20

Abstract domain

Definition

For a set of directions ∆, let P♯

∆ = ∆ → ❘∞ be the abstract

domain. ❘ ❘ ❘

9 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-21
SLIDE 21

Abstract domain

Definition

For a set of directions ∆, let P♯

∆ = ∆ → ❘∞ be the abstract

domain.

The concretisation function

γ∆ : (∆ → ❘∞) − → P(❘n) Ω − →

  • d∈∆{x ∈ ❘n | x, d ≤ Ω(d)}

9 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-22
SLIDE 22

Abstract domain

Definition

For a set of directions ∆, let P♯

∆ = ∆ → ❘∞ be the abstract

domain.

The concretisation function

γ∆ : (∆ → ❘∞) − → P(❘n) Ω − →

  • d∈∆{x ∈ ❘n | x, d ≤ Ω(d)}

Example :

9 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-23
SLIDE 23

Abstract domain

Definition

For a set of directions ∆, let P♯

∆ = ∆ → ❘∞ be the abstract

domain.

The concretisation function

γ∆ : (∆ → ❘∞) − → P(❘n) Ω − →

  • d∈∆{x ∈ ❘n | x, d ≤ Ω(d)}

Example :

9 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-24
SLIDE 24

Abstract domain

Definition

The abstraction function

α∆ : P(❘n) − → (∆ → ❘∞) S − →      λd. − ∞ if S = ∅ λd. + ∞ if S = ❘n λd. δS(d)

  • therwise

Example :

10 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-25
SLIDE 25

Abstract domain

Definition

The abstraction function

α∆ : P(❘n) − → (∆ → ❘∞) S − →      λd. − ∞ if S = ∅ λd. + ∞ if S = ❘n λd. δS(d)

  • therwise

Example :

10 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-26
SLIDE 26

Abstract domain

Definition

The abstraction function

α∆ : P(❘n) − → (∆ → ❘∞) S − →      λd. − ∞ if S = ∅ λd. + ∞ if S = ❘n λd. δS(d)

  • therwise

Example :

10 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-27
SLIDE 27

Abstract domain

Definition

The abstraction function

α∆ : P(❘n) − → (∆ → ❘∞) S − →      λd. − ∞ if S = ∅ λd. + ∞ if S = ❘n λd. δS(d)

  • therwise

Example :

10 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-28
SLIDE 28

Abstract domain

Definition

The complete lattice P♯

∆, ⊑, ⊥, ⊤, ⊔, ⊓ is defined by : ◮ An order relation : Ω1 ⊑ Ω2 ⇔ γ∆(Ω1) ⊆ γ∆(Ω2). ◮ A minimal element : ⊥ = λd. − ∞. ◮ A maximal element : ⊤ = λd. + ∞. ◮ A join operator : Ω1 ⊔ Ω2 = λd. max(Ω1(d), Ω2(d)). ◮ A meet operator : Ω1 ⊓ Ω2 = λd. min(Ω1(d), Ω2(d)).

11 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-29
SLIDE 29

Abstract domain

Definition

The complete lattice P♯

∆, ⊑, ⊥, ⊤, ⊔, ⊓ is defined by : ◮ An order relation : Ω1 ⊑ Ω2 ⇔ γ∆(Ω1) ⊆ γ∆(Ω2). ◮ A minimal element : ⊥ = λd. − ∞. ◮ A maximal element : ⊤ = λd. + ∞. ◮ A join operator : Ω1 ⊔ Ω2 = λd. max(Ω1(d), Ω2(d)). ◮ A meet operator : Ω1 ⊓ Ω2 = λd. min(Ω1(d), Ω2(d)).

Notes : γ∆(Ω1 ⊔ Ω2) = γ∆(Ω1) ⊔ γ∆(Ω2). γ∆(Ω1 ⊓ Ω2) ⊒ γ∆(Ω1) ⊓ γ∆(Ω2).

11 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-30
SLIDE 30

Abstract domain

The special case of polyhedron

Property

Let P be a polyhedron and Ω ∈ P♯

∆ such that Ω = α∆(P). We

have that, P ⊆ γ∆(Ω) where this over approximation is tight as the vertices of P touch the faces of γ∆(Ω).

12 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-31
SLIDE 31

Abstract domain

Fixpoint computation

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. Input : c ∈ ❘n, l ∈ ❘ X ∈ P0 while (X, c ≤ l) { X = AX + b. }

13 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-32
SLIDE 32

Abstract domain

Fixpoint computation

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. Input : c ∈ ❘n, l ∈ ❘ X ∈ P0 while (X, c ≤ l) { X = AX + b. } Ωi = Ωi−1 ∪ [(AΩi−1 + b) ∩ (c, X ≤ l)]

13 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-33
SLIDE 33

Abstract domain

Assignment

◮ Case 1 : Ω = AΩ0 + b

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. X = AX + b.

P P

14 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-34
SLIDE 34

Abstract domain

Assignment

◮ Case 1 : Ω = AΩ0 + b

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. X = AX + b.

The abstract element

Ω = λd.δAP0⊕b(d)

P

14 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-35
SLIDE 35

Abstract domain

Assignment

◮ Case 1 : Ω = AΩ0 + b

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. X = AX + b.

The abstract element

Ω = λd.δAP0⊕b(d) = λd.δP0(ATd) + b, d

14 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-36
SLIDE 36

Abstract domain

Fixpoint computation

◮ Case 2 : Ωi = Ωi−1 ∪ [(AΩi−1 + b)∩(c, X ≤ l)]

/////////////////

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. while (true) { X = AX + b } P

P

15 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-37
SLIDE 37

Abstract domain

Fixpoint computation

◮ Case 2 : Ωi = Ωi−1 ∪ [(AΩi−1 + b)∩(c, X ≤ l)]

/////////////////

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. while (true) { X = AX + b } P

The abstract element

Ωi = λd. max{δP0(ATjd) + j

k=1b, AT(k−1)d, j = 0, .., i}

15 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-38
SLIDE 38

Abstract domain

Fixpoint computation

◮ Case 2 : Ωi = Ωi−1 ∪ [(AΩi−1 + b)∩(c, X ≤ l)]

/////////////////

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. while (true) { X = AX + b } α∆(Pi) = Ωi

The abstract element

Ωi = λd. max{δP0(ATjd) + j

k=1b, AT(k−1)d, j = 0, .., i}

15 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-39
SLIDE 39

Abstract domain

Fixpoint computation

◮ Case 3 : Ωi = Ωi−1 ∪ [(AΩi−1 + b) ∩ (c, X ≤ l)]

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. Input : c ∈ ❘n, l ∈ ❘ while (X, c ≤ l) { X = AX + b. }

16 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-40
SLIDE 40

Abstract domain

Fixpoint computation

◮ Case 3 : Ωi = Ωi−1 ∪ [(AΩi−1 + b) ∩ (c, X ≤ l)]

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. Input : c ∈ ❘n, l ∈ ❘ while (X, c ≤ l) { X = AX + b. } H : X, c ≤ l

16 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-41
SLIDE 41

Abstract domain

Fixpoint computation

◮ Case 3 : Ωi = Ωi−1 ∪ [(AΩi−1 + b) ∩ (c, X ≤ l)]

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. Input : c ∈ ❘n, l ∈ ❘ while (X, c ≤ l) { X = AX + b. } H : X, c ≤ l δH(d) = l if d = λc +∞

  • therwise

16 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-42
SLIDE 42

Abstract domain

Fixpoint computation

◮ Case 3 : Ωi = Ωi−1 ∪ [(AΩi−1 + b) ∩ (c, X ≤ l)]

Program

Input : P0 a bounded polyhedron. Input : A ∈ ❘n × ❘m, b ∈ ❘m. Input : c ∈ ❘n, l ∈ ❘ while (X, c ≤ l) { X = AX + b. } H : X, c ≤ l δH(d) = l if d = λc +∞

  • therwise

We put ∆ ∪ {c} :

◮ ∆1 = {c} ∪ {d ∈ ∆|d = λc, λ ≥ 0}. ◮ ∆2 = ∆ \ ∆1

16 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-43
SLIDE 43

Abstract domain

Fixpoint computation

◮ Case 3 : Ωi = Ωi−1 ∪ [(AΩi−1 + b) ∩ (c, X ≤ l)] ◮ For d ∈ ∆2 : we use the same method as for Case 2. P P

17 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-44
SLIDE 44

Abstract domain

Fixpoint computation

◮ Case 3 : Ωi = Ωi−1 ∪ [(AΩi−1 + b) ∩ (c, X ≤ l)] ◮ For d ∈ ∆2 : we use the same method as for Case 2.

Ωi = λd. max{δP0(ATjd) +

j

  • k=1

b, AT(k−1)d, j = 0, .., i}

P

17 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-45
SLIDE 45

Abstract domain

Fixpoint computation

◮ Case 3 : Ωi = Ωi−1 ∪ [(AΩi−1 + b) ∩ (c, X ≤ l)] ◮ For d ∈ ∆2 : we use the same method as for Case 2.

Ωi = λd. max{δP0(ATjd) +

j

  • k=1

b, AT(k−1)d, j = 0, .., i}

◮ For d ∈ ∆1, we have that :

Ωi(d) = max(δγ∆(Ωi−1)(d), min(δγ∆(Ωi−1)(ATd) + b, d, l)) Such that λd.δPi(d) ≤ Ωi(d).

17 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-46
SLIDE 46

Abstract domain

Fixpoint computation

Ωi(d) = max{δP0(ATjd) + j

k=1b, AT(k−1)d, j = 0, .., i}

Algorithm 1 Kleene Algorithm using support function. Require: ∆ ⊂ ❘n, set of l directions. P0, The initial polyhedron Require: A ∈ ❘n × ❘m, b ∈ ❘m

1: D = ∆, Ω = δP0(∆) 2: repeat 3:

Ω′ = Ω

4:

for all i = 0, . . . , (l − 1) do

5:

Θ[i] = Θ[i] + b, D[i]

6:

D[i] = ATD[i]

7:

Υ[i] = δP0(d[i]) + Θ[i]

8:

Ω[i] = max(Ω[i], Υ[i])

9:

end for

10: until Ω ⊑ Ω′

18 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-47
SLIDE 47

Abstract domain

Fixpoint computation

Ωi(d) = max{δP0(ATjd) + j

k=1b, AT(k−1)d, j = 0, .., i}

Algorithm 2 Kleene Algorithm using support function. Require: ∆ ⊂ ❘n, set of l directions. P0, The initial polyhedron Require: A ∈ ❘n × ❘m, b ∈ ❘m

1: D = ∆, Ω = δP0(∆) 2: repeat 3:

Ω′ = Ω

4:

for all i = 0, . . . , (l − 1) do

5:

Θ[i] = Θ[i] + b, D[i]

6:

D[i] = ATD[i]

7:

Υ[i] = δP0(d[i]) + Θ[i]

8:

Ω[i] = max(Ω[i], Υ[i])

9:

end for

10: until Ω ⊑ Ω′

18 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-48
SLIDE 48

Abstract domain

Fixpoint computation

Ωi(d) = max{δP0(ATjd) + j

k=1b, AT(k−1)d, j = 0, .., i}

Algorithm 3 Kleene Algorithm using support function. Require: ∆ ⊂ ❘n, set of l directions. P0, The initial polyhedron Require: A ∈ ❘n × ❘m, b ∈ ❘m

1: D = ∆, Ω = δP0(∆) 2: repeat 3:

Ω′ = Ω

4:

for all i = 0, . . . , (l − 1) do

5:

Θ[i] = Θ[i] + b, D[i]

6:

D[i] = ATD[i]

7:

Υ[i] = δP0(d[i]) + Θ[i]

8:

Ω[i] = max(Ω[i], Υ[i])

9:

end for

10: until Ω ⊑ Ω′

18 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-49
SLIDE 49

Abstract domain

Fixpoint computation

Ωi(d) = max{δP0(ATjd)+

j

  • k=1

b, AT(k−1)d

  • , j = 0, .., i}

Algorithm 4 Kleene Algorithm using support function. Require: ∆ ⊂ ❘n, set of l directions. P0, The initial polyhedron Require: A ∈ ❘n × ❘m, b ∈ ❘m

1: D = ∆, Ω = δP0(∆) 2: repeat 3:

Ω′ = Ω

4:

for all i = 0, . . . , (l − 1) do

5:

Θ[i] = Θ[i] + b, D[i]

6:

D[i] = ATD[i]

7:

Υ[i] = δP0(d[i]) + Θ[i]

8:

Ω[i] = max(Ω[i], Υ[i])

9:

end for

10: until Ω ⊑ Ω′

18 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-50
SLIDE 50

Abstract domain

Fixpoint computation

The Algorithm doesn’t guarantee the termination of the computation. P

19 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-51
SLIDE 51

Abstract domain

Fixpoint computation

The Algorithm doesn’t guarantee the termination of the computation.

◮ Solution 1 :

widening

∀Ω1, Ω2 ∈ P♯

∆, Ω1∇∆Ω2 = λd.

Ω2(d) if Ω1(d) = Ω2(d) +∞

  • therwise

19 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-52
SLIDE 52

Abstract domain

Fixpoint computation

The Algorithm doesn’t guarantee the termination of the computation.

◮ Solution 1 :

widening

∀Ω1, Ω2 ∈ P♯

∆, Ω1∇∆Ω2 = λd.

Ω2(d) if Ω1(d) = Ω2(d) +∞

  • therwise

◮ Solution 2 :

The accelerated Kleene iteration

19 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-53
SLIDE 53

The accelerated Kleene iteration

Static analysis Abstract element Fixpoint computation : Kleene iteration Widening + Fixpoint Λ(∪xn) Numerical analysis Numerical element Numerical sequence Transformation method + Convergence point ΛA ΥA limn−>∞ΛA(xn)

20 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-54
SLIDE 54

The accelerated Kleene iteration

Algorithm 5 The accelerated Kleene iteration

1: repeat 2:

− → Xi := − − → Xi−1 ⊔ F(− − → Xi−1)

3:

− → yi := Accelerate

  • ΛA(−

→ X0), . . . , ΛA(− → Xi)

  • 4:

if ||− → yi − − − → yi−1|| ≤ δ then

5:

− → Xi := − → Xi ⊔ ΥA(− → yi )

6:

end if

7: until −

→ Xi ⊑ − − → Xi−1

21 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-55
SLIDE 55

The accelerated Kleene iteration

◮ The method to accelerated the numerical sequences

convergence. Algorithm 6 The accelerated Kleene iteration

1: repeat 2:

− → Xi := − − → Xi−1 ⊔ F(− − → Xi−1)

3:

− → yi := Accelerate ( ΛA(X0) , . . . , ΛA(− → Xi))

4:

if ||− → yi − − − → yi−1|| ≤ δ then

5:

− → Xi := − → Xi ⊔ ΥA(− → yi )

6:

end if

7: until −

→ Xi ⊑ − − → Xi−1

22 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-56
SLIDE 56

The accelerated Kleene iteration

◮ The method to accelerated the numerical sequences

convergence. Algorithm 7 The accelerated Kleene iteration

1: repeat 2:

− → Xi := − − → Xi−1 ⊔ F(− − → Xi−1)

3:

− → yi := Accelerate ( ΛA(X0) , . . . , ΛA(− → Xi))

4:

if ||− → yi − − − → yi−1|| ≤ δ then

5:

− → Xi := − → Xi ⊔ ΥA(− → yi )

6:

end if

7: until −

→ Xi ⊑ − − → Xi−1

◮ The Extraction function

22 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-57
SLIDE 57

The accelerated Kleene iteration

◮ The method to accelerated the numerical sequences

convergence. Algorithm 8 The accelerated Kleene iteration

1: repeat 2:

− → Xi := − − → Xi−1 ⊔ F(− − → Xi−1)

3:

− → yi := Accelerate ( ΛA(X0) , . . . , ΛA(− → Xi))

4:

if ||− → yi − − − → yi−1|| ≤ δ then

5:

− → Xi := − → Xi ⊔ ΥA(− → yi )

6:

end if

7: until −

→ Xi ⊑ − − → Xi−1

◮ The Extraction function ◮ The Combination function

22 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-58
SLIDE 58

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration :3

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-59
SLIDE 59

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration :3

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-60
SLIDE 60

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration :5

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) [-3.038029,7.492492] [-3.695558,7.871720] [-4.663282,8.463092] max(10.944139,2.367053) 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-61
SLIDE 61

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration :7

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) [-3.038029,7.492492] [-3.695558,7.871720] [-4.663282,8.463092] max(10.944139,2.367053) [-4.084503,8.185954] [-4.386442,8.369221] [-5.189239,8.851176] max(0.525957,0.388084) 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-62
SLIDE 62

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration :9

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) [-3.038029,7.492492] [-3.695558,7.871720] [-4.663282,8.463092] max(10.944139,2.367053) [-4.084503,8.185954] [-4.386442,8.369221] [-5.189239,8.851176] max(0.525957,0.388084) [-4.594886,8.508279] [-4.751445,8.603235] [-5.197089,8.872567] max(0.00785,0.021391) 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-63
SLIDE 63

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration :11

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) [-3.038029,7.492492] [-3.695558,7.871720] [-4.663282,8.463092] max(10.944139,2.367053) [-4.084503,8.185954] [-4.386442,8.369221] [-5.189239,8.851176] max(0.525957,0.388084) [-4.594886,8.508279] [-4.751445,8.603235] [-5.197089,8.872567] max(0.00785,0.021391) [-4.865385,8.673918] [-4.950393,8.725095] [-5.197506,8.873307] max(0.000417,0.00074) [-5.197506,8.873307] 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-64
SLIDE 64

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration : 12

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) [-3.038029,7.492492] [-3.695558,7.871720] [-4.663282,8.463092] max(10.944139,2.367053) [-4.084503,8.185954] [-4.386442,8.369221] [-5.189239,8.851176] max(0.525957,0.388084) [-4.594886,8.508279] [-4.751445,8.603235] [-5.197089,8.872567] max(0.00785,0.021391) [-4.865385,8.673918] [-4.950393,8.725095] [-5.197506,8.873307] max(0.000417,0.00074) [-5.197506,8.873307] [-5.197506,8.873307] 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-65
SLIDE 65

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration : 13

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) [-3.038029,7.492492] [-3.695558,7.871720] [-4.663282,8.463092] max(10.944139,2.367053) [-4.084503,8.185954] [-4.386442,8.369221] [-5.189239,8.851176] max(0.525957,0.388084) [-4.594886,8.508279] [-4.751445,8.603235] [-5.197089,8.872567] max(0.00785,0.021391) [-4.865385,8.673918] [-4.950393,8.725095] [-5.197506,8.873307] max(0.000417,0.00074) [-5.197506,8.873307] [-5.197506,8.873307] [-5.197506,8.873307] [-5.197089,8.872567] max(0.000417,0.00074) [-5.197089,8.872567] 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-66
SLIDE 66

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306]

It´ eration : 15

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) [-3.038029,7.492492] [-3.695558,7.871720] [-4.663282,8.463092] max(10.944139,2.367053) [-4.084503,8.185954] [-4.386442,8.369221] [-5.189239,8.851176] max(0.525957,0.388084) [-4.594886,8.508279] [-4.751445,8.603235] [-5.197089,8.872567] max(0.00785,0.021391) [-4.865385,8.673918] [-4.950393,8.725095] [-5.197506,8.873307] max(0.000417,0.00074) [-5.197506,8.873307] [-5.197506,8.873307] [-5.197506,8.873307] [-5.197089,8.872567] max(0.000417,0.00074) [-5.197089,8.872567] [-5.197567,8.873341] [-5.197616,8.873348] [-5.198638,8.849716] max(0.001549,0.022851) 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-67
SLIDE 67

The accelerated Kleene iteration

Example

while (1) { xn1 = -0.4375 * x1 + 0.0625 * x2 + 0.2652 * x3 + 0.1 * u1 ; xn2 = 0.0625 * x1 + 0.4375 * x2 + 0.2652 * x3 + 0.1 * u2 ; xn3 = -0.2652 * x1 + 0.2652 * x2 + 0.375 * x3 + 0.1 * u3 ; x1 = xn1 ;x2 = xn2 ;x3 = xn3 ; } [-5.197505,8.873306] [-5.197598,8.873362]

It´ eration : 16

x1 ΥA(− → y ) yi − yi−1 Seuils (δ = 10−3) [1.000000,2.000000] [1.000000,2.000000] [-0.447300,5.716500] [-2.291255,6.573381] [6.280857,6.830145] max(5.280857,4.830145) [-3.038029,7.492492] [-3.695558,7.871720] [-4.663282,8.463092] max(10.944139,2.367053) [-4.084503,8.185954] [-4.386442,8.369221] [-5.189239,8.851176] max(0.525957,0.388084) [-4.594886,8.508279] [-4.751445,8.603235] [-5.197089,8.872567] max(0.00785,0.021391) [-4.865385,8.673918] [-4.950393,8.725095] [-5.197506,8.873307] max(0.000417,0.00074) [-5.197506,8.873307] [-5.197506,8.873307] [-5.197506,8.873307] [-5.197089,8.872567] max(0.000417,0.00074) [-5.197089,8.872567] [-5.197567,8.873341] [-5.197616,8.873348] [-5.198638,8.849716] max(0.001549,0.022851) [-5.197598,8.873362] 23 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-68
SLIDE 68

Accelerated Kleene Algorithm using support function

Algorithm 9 Accelerated Kleene Algorithm using support function. Require: ∆ ⊂ ❘n, P0, A ∈ ❘n × ❘m, b ∈ ❘m

1: D = ∆, Ω = δP0(∆) 2: repeat 3:

Ω′ = Ω, Y ′ = Y

4:

for all i = 0, . . . , (l − 1) do

5:

Θ[i] = Θ[i] + b, D[i]

6:

D[i] = ATD[i]

7:

Υ[i] = δP0(d[i]) + Θ[i]

8:

Y [i] := Accelerate (Υ[0], . . . , Υ[i])

9:

if ||Y [i] − Y ′[i]|| ≤ ε then

10:

Ω[i] = max(Ω[i], Y [i])

11:

else Ω[i] = max(Ω[i], Υ[i])

12:

end if

13:

end for

14: until Ω ⊑ Ω′

24 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-69
SLIDE 69

Experimentation

Kleene Algorithm using support function

begin while (0<=10) do xn = 0.5 *x - y - 2.5; yn = 0.9 *y + 10; x = xn; y = yn; done; end 8 directions (0.044 seconde) 50 directions (0.34 seconde) 100 directions (0.7 seconde)

25 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-70
SLIDE 70

Experimentation

Accelerated Kleene Algorithm using support function

begin while (0<=10) do xn = 0.5 *x - y - 2.5; yn = 0.9 *y + 10; x = xn; y = yn; done; end 8 directions

◮ Kleene iteration using support function : 200 iterations ◮ Accelerated Kleene iteration using support function :

11 iterations

26 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-71
SLIDE 71

Related work

Template Abstract Domain

  • S. Sankaranarayanan, H. Sipma, and Z. Manna. Scalable analysis
  • f linear systems using mathematical programming. In VMCAI.

Springer, 2005.

27 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-72
SLIDE 72

Related work

Template Abstract Domain

  • S. Sankaranarayanan, H. Sipma, and Z. Manna. Scalable analysis
  • f linear systems using mathematical programming. In VMCAI.

Springer, 2005. Similarities :

◮ Abstract domain based on a static choice of directions set. ◮ The same definition of inclusion, meet and join operators.

27 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-73
SLIDE 73

Related work

Template Abstract Domain

  • S. Sankaranarayanan, H. Sipma, and Z. Manna. Scalable analysis
  • f linear systems using mathematical programming. In VMCAI.

Springer, 2005. Similarities :

◮ Abstract domain based on a static choice of directions set. ◮ The same definition of inclusion, meet and join operators.

Differences :

◮ The fixpoint computation uses Linear Programming. ◮ The fixpoint is computed with the abstract elements obtained

in each Kleene iteration.

27 / 28 Yassamine Seladji , and , Olivier Bouissou.

slide-74
SLIDE 74

Conclusion and future work

Conclusion

◮ We develop a new numerical abstract domain based on

support function.

◮ Our abstract domain depends on a set of finite directions. ◮ The fixpoint is computed in a polynomial time.

Perspectives

◮ Implements this domain on APRON. ◮ According to the program to analyse, defines a relevant set of

directions.

28 / 28 Yassamine Seladji , and , Olivier Bouissou.