consistency maintenance

31

Upload: others

Post on 27-Oct-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Consistency Maintenance: Propagation

Consistency Maintenance: PropagationCon!ict Resolution

9

97

Activating inactive features

Fix incompleteness

Challenges

Con!gurator

Con!guration GUI

Con!guration Language Code

Con!gurator

Con!guration GUI

Con!guration Language Code

Range Fix AlgorithmSMT-Lib

Translation

Use_Pre_Allocation -> (Pre_Allocation_Size <= Buffer_Size * 1024 / Object_Size)

10 <= 8

Use_Pre_Allocation -> (Pre_Allocation_Size <= Buffer_Size * 1024 / Object_Size)

Fixes Decrease Pre_Allocation_SizeIncrease Buffer_SizeDecrease Object_SizeDisable Use_Pre_Allocation

By how much?

Complete !x list

Pre_Allocation_Size <= 8Buffer_Size >= 5Object_Size <= 409,6Use_Pre_Allocation = false

Fix Generator

Typed variables

Pre_Allocation_Size: IntBuffer_Size: IntObject_Size: IntUse_Pre_Allocation: Bool

Assigned values

Pre_Allocation_Size = 10Buffer_Size = 4Object_Size = 512Use_Pre_Allocation = true

Logic constraint

Use_Pre_Allocation -> (...)

Overview

Constraint violationV : {m:Bool, a:Int, b:Int }

e : {m=true, a=6, b=5}

c : (m→a>10) ⋀ (¬m→b>10) ⋀ (a < b)

Typed variables

Con"guration (assignment)

Violated constraint

[m := false, b : b > 10]

[(a,b) : a > 10 ⋀ a < b]

Range Unit

Range Fix

Range Fix

Assignment Unit

Range Fixe

Constraint violationV : {m:Bool, a:Int, b:Int }

e : {m=true, a=6, b=5}

c : (m→a>10) ⋀ (¬m→b>10) ⋀ (a < b)

Typed variables

Con"guration (assignment)

Violated Constraint

Range Fixe

Correct All the con"guration that can be produced satisfy the constraint

Minimality of variables A "x should change a minimal set of variables

Maximality of ranges The range of a "x should be maximal

Fix generation algorithm

1. Find minimal diagnoses HS-DAG algorithm

Hard constraint (c) (m→a>10) ⋀ (¬m→b>10) ⋀ (a < b)

Soft constraints (e) [1] m = true [2] a = 6 [3] b = 5

Fix generation algorithm

1. Find minimal diagnoses HS-DAG algorithm

Hard constraint (c) (m→a>10) ⋀ (¬m→b>10) ⋀ (a < b)

Soft constraints (e) [1] m = true [2] a = 6 [3] b = 5

Fix generation algorithm

UNSAT cores? {1,2} and {3}

{1,2}

{3} {3}

SAT

1 2

3 3

SAT

{m = true, b=5} {a = 6, b=5}

UNSAT core 1

UNSAT core n

...Diag

1Diag

m...

HS-DAG algorithm

Hard constraint (c) (m→a>10) ⋀ (¬m→b>10) ⋀ (a < b)

Soft constraints (e) [1] m = true [2] a = 6 [3] b = 5

Fix generation algorithm

1. Find minimal diagnoses

2. Replace unchanged variables

HS-DAG algorithm

{m = true, b=5}

(m→6>10) ⋀ (¬m→b>10) ⋀ (6 < b)

Replace a

Fix generation algorithm

1. Find minimal diagnoses

2. Replace unchanged variables

3. Generate the "xes (m→6>10) ⋀ (¬m→b>10) ⋀ (6 < b)

(¬m⋁6>10) ⋀ (m⋁b>10) ⋀ (6 < b)

(¬m) ⋀ (b>10) ⋀ (6 < b)

(¬m) ⋀ (b>10⋀ 6 < b)(¬m) ⋀ (b>10)merging

CNF

folding + simpl.

simplifying

(m→6>10) ⋀ (¬m→b>10) ⋀ (6 < b)

{m = true, b=5}

Multi-Constraint violation

V : {m:Bool, n:Bool, x:Bool, y:Bool, z:Bool }

e : {m=true, n=false, x=false, y=false, z=false}

c : (m⋀ n)

S : {n→(x⋁y), x→z} Satis"ed constraints

[n := true]Possible "x Violates

n→(x⋁y) Ignore

Eliminate "x

Propagate

Fix generation algorithm with propagation

P : {m⋀ n}

P : {m⋀ n, n→(x⋁y)}Shares variables with {n→(x⋁y), x→z} ?

P : {m⋀ n, n→(x⋁y), x→z}Shares variables with { x→z} ?

Replace c by Pc : (m⋀ n)⋀(n→(x⋁y))⋀(x→z)

Apply Fix generation algorithm[n=true, x=true, z=true][n=true, y=true]

cS

0

250

500

750

1000

virtex4 xilinx ea2468 aki3068net gps4020 arcom-viper

Options Constraints Violations

Number of variables per fix

Nu

mb

er

of

fixe

s

0

20

40

60

80

1 2 3 4 5 6 7 8 9

75%

Number of fixes

Nu

mb

er

of

vio

latio

ns

0

10

20

30

40

50

0 1 2 3 4 5 8 9

95%

Generation Time (ms)

De

nsi

ty o

f vi

ola

tion

s

0.000

0.005

0.010

0.015

0.020

0.025

50 100 150 200

73% coverage of error resolution by con"gtool100% coverage of error resolution by our tool

Number of variables

Nu

mb

er

of

vio

latio

ns

0102030405060

0102030405060

0102030405060

0 1 2 3 4 6 7 8 9 16 18 23 38 56 57 58

Elim

ina

tion

Ign

ora

nce

Pro

pa

ga

tion

50ms

17ms

20ms17 ignored

0 ignored

1 ignored

32% new errors

Con!gurator

Con!guration GUI

Con!guration Language Code

Range Fix AlgorithmSMT-Lib

Translation

Con!gurator

Con!guration GUI

Con!guration Language Code

A. Hubaux

K. Czarnecki C. Drescher

L. Hvam

V. Ganesh

D. Jannach T. Mannisto L. Murta T. Nguyen

P. Heymans

M. Zanker

Unify Software & Product Con"guration

Knowledge Modelling

Automated reasoning

Complexity

Life cycle coverage

Knowledge evolution

?

Knowledge Modelling

Automated reasoning

Complexity

Life cycle coverage

Knowledge evolution

Knowledge Modelling

Automated reasoning

Complexity

Life cycle coverage

Knowledge evolution

Dagstuhl Seminar submitted