• Aucun résultat trouvé

FaieA

N/A
N/A
Protected

Academic year: 2022

Partager "FaieA"

Copied!
60
0
0

Texte intégral

(1)

Alexandre Duret-Lutz

avril 2009

(2)

Hypotheseson the system to verify.

Youmay onsider fairness hypothesis anytime you have to deal

with a repeated hoie.

Messagessentover alossyhannel willbe deliveredafteranite

numberof retries(therepeatedhoie iswhether the hannel

willlosethe message)

Starvation-free resoure alloator: anybodyrequestingthe

resoure eventually getsit.

Two independent proessesrunningon the same hostgetarun

slie innitelyoften(therepeated hoieis doneby the

(3)

These hypotheses an beseen as onstraints for the emptiness hek.

Iftwo independent proesses running onthe same host shouldget a

runslie innitely often:

Wewanta ounterexamplewhere both proesses are progressing

innitelyoften.

Wean ignoreruns where one proess is stuk.

Do we reallyneed to modifythe emptiness hek algorithm?

(4)

To hekproposition prop underhypothesis fairness

we hekfairness

prop.

(5)

To hekproposition prop underhypothesis fairness

we hekfairness

prop.

A

M

⊗ A ¬ (

fairness

prop

)

(6)

To hekproposition prop underhypothesis fairness

we hekfairness

prop.

A

M

⊗ A ¬ (

fairness

prop

)

A

M

⊗ A

fairness

∧¬

prop

A

M

⊗ A

fairness

⊗ A ¬

prop

(7)

unonditionalfairness Something will happen innitely often.

weak fairness If something happens ontinuously, something else will

happen innitely often.

strongfairness If something happens innitelyoften, something else

will happeninnitely often.

(8)

unonditionalfairness Something will happen innitely often. GFp

weak fairness If something happens ontinuously, something else will

happen innitely often.

strongfairness If something happens innitelyoften, something else

will happeninnitely often.

(9)

unonditionalfairness Something will happen innitely often. GFp

weak fairness If something happens ontinuously, something else will

happen innitely often. FGe

GFe

strongfairness If something happens innitelyoften, something else

will happeninnitely often.

(10)

unonditionalfairness Something will happen innitely often. GFp

weak fairness If something happens ontinuously, something else will

happen innitely often. FGe

GFe

strongfairness If something happens innitelyoften, something else

will happeninnitely often. GFe

GFe

(11)

unonditionalfairness Something will happen innitely often. GFp

weak fairness If something happens ontinuously, something else will

happen innitely often. FGe

GFe

strongfairness If something happens innitelyoften, something else

will happeninnitely often. GFe

GFe

Wehave

FGe

GFe

= ¬

FGe

GFe

=

GF

¬

e

GFe

=

GF

e

e

)

therefore weak fairness an beexpressed as unonditionalfairness.

(12)

fairness

Wemay want to applyseveral fairness hypotheses.

weak fairness strong fairness

n

V

n

i

=

1GF

eni

oi

) V

n

i

=

1GFeni

GFoi

1 1 state 4 states

2 1 state 10states

3 1 state 28states

4 1 state 82states

.

.

.

.

.

.

(13)

Look of A

GF

en

o

)

¬

en

o en

∧ ¬

o

Bühiaeptane onditions orrespond to formulæsuh as GFa.

(14)

Look of A

GF

en

o

)

¬

en

o en

∧ ¬

o

Bühiaeptane onditions orrespond to formulæsuh as GFa.

A

M

Afairness

A

¬

prop

(15)

Look of A

GFen

GFo

¬

en

o

¬

en

⊤ ⊤

¬

o o

¬

en

¬

en

¬

en

¬

o o

Note: Idon't know of anyLTLtranslator whois able to reate the

leftautomaton!

Withn fairness hypotheses, the left automatonreahes 3 n

states and

the right automatonreahes 3

n

+

1states.

(16)

fairness

Weakfairness:

V

n

i

=

1GF

eni

oi

)

Strongfairness:

V

n

i

=

1GFeni

GFoi

(17)

fairness

Weakfairness:

V

n

i

=

1GF

eni

oi

)

GeneralizedBühi automataalways1 state,deterministi.

Weakfairness omesforfree ifyou haveageneralizedemptiness

hekforgeneralizedBühiautomata.

Strongfairness:

V

n

i

=

1GFeni

GFoi

(18)

fairness

Weakfairness:

V

n

i

=

1GF

eni

oi

)

GeneralizedBühi automataalways1 state,deterministi.

Weakfairness omesforfree ifyou haveageneralizedemptiness

hekforgeneralizedBühiautomata.

Strongfairness:

V

n

i

=

1GFeni

GFoi

GeneralizedBühi automatawith 3

n

+

1states,

non-deterministi.

(19)

fairness

Weakfairness:

V

n

i

=

1GF

eni

oi

)

GeneralizedBühi automataalways1 state,deterministi.

Weakfairness omesforfree ifyou haveageneralizedemptiness

hekforgeneralizedBühiautomata.

Strongfairness:

V

n

i

=

1GFeni

GFoi

GeneralizedBühi automatawith 3

n

+

1states,

non-deterministi.

Streettautomata always1 state,deterministi.

(20)

Dierfrom Bühi automataonly in aeptane onditions.

Aeptane onditions look likeif a run sees innitely often,

then it will see innitelyoften (an be generalized to more

pairs of olors)

(21)

Dierfrom Bühi automataonly in aeptane onditions.

Aeptane onditions look likeif a run sees innitely often,

then it will see innitelyoften (an be generalized to more

pairs of olors)

Exatly whatis needed to reognize GFen

GFo:

en

∧ ¬

o

o

¬

en

∧ ¬

o

(with

)

(22)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(23)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(24)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(25)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(26)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(27)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(28)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(29)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(30)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(31)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

Sine there isno in this SCC, westart again,but read as a

one-way barrier forbidding attemptsto ome bak.

(32)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(33)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

Sine there isno in this SCC, westart again,but read as a

one-way barrier forbidding attemptsto ome bak.

(34)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(35)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

Sine there isno in this SCC, westart again,but read as a

one-way barrier forbidding attemptsto ome bak.

(36)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(37)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

Sine there isno in this SCC, westart again,but read as a

one-way barrier forbidding attemptsto ome bak.

(38)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

(39)

For Bühi, we look for SCCswhose aeptane onditionsverify

∧ ∧ ∧

.

For Streett they must verify something like

⇒ ∧ ⇒

.

Sine there isno in this SCC, westart again,but read as a

one-way barrier forbidding attemptsto ome bak.

(40)

To be orret, has to be ombined with a variantof heuristi H2

(orderingsuessors SCC-wise)

Barriers must be rossedonly after all normal suessors have

been visited.

Slowdown (w.r.t. generalized Bühi emptiness hek):

SCC arerevisited at worst m times ifm pairs of aeptane

onditions.

Comparewith the 3

m

+

1states of the Bühiautomaton forthe

(41)

Converting(generalized) Bühiautomatainto Streett automata?

ConvertingStreett automatainto (generalized) Bühiautomata?

(42)

Converting(generalized) Bühiautomatainto Streett automata?

Easy!

s s s

s

4 s

5

(43)

Converting(generalized) Bühiautomatainto Streett automata?

Easy!

s

1

s

2

s

3 s

4 s

5

with

⇒ ∧ ⇒

.

ConvertingStreett automatainto (generalized) Bühiautomata?

(44)

Converting(generalized) Bühiautomatainto Streett automata?

Easy!

s s s

s

4 s

5

(45)

1 2 s

r

Client C

1

2 3

r

1

s

1

r

2

s

2

Server S

− ×

a

d

ChannelB

Synhronizationrules for the system

h

C

,

C

,

S

,

B

,

B

,

B

,

B

i

:

(

1

) h

s , . , . , . , . , a , .

i

(

2

) h

. , s , . , . , . , . , a

i

(

3

) h

r , . , . ,d , . , . , .

i

(

4

) h

. , r , . , . , d , . , .

i

(

5

) h

. , . , r1 , . , . , d , .

i

(

6

) h

. , . , s1 , a , . , . , .

i

(

7

) h

. , . , r2 , . , . , . , d

i

(

8

) h

. , . , s2 , . , a , . , .

i

(46)

¯

r

1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

¯

d1

¯

d2

¯

r

1

¯

r2 d1d2

¯

r

1

¯

r2

¯

d1

¯

d2

r1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1r2

¯

d

1

¯

d

2

r

1

¯

r2

¯

d1d2

¯

r1 r

2

d1

¯

d2

(47)

(

1

) h

s , . , . , . , . , a , .

i

(

2

) h

. , s , . , . , . , . , a

i

(

3

) h

r , . , . ,d , . , . , .

i

(

4

) h

. , r , . , . , d , . , .

i

(

5

) h

. , . , r1 , . , . , d , .

i

(

6

) h

. , . , s1 , a , . , . , .

i

(

7

) h

. , . , r2 , . , . , . , d

i

(

8

) h

. , . , s2 , . , a , . , .

i

(48)

(

1

) h

s , . , . , . , . , a , .

i (

2

) h

. , s , . , . , . , . , a

i (

3

) h

r , . , . ,d , . , . , .

i (

4

) h

. , r , . , . , d , . , .

i (

5

) h

. , . , r1 , . , . , d , .

i (

6

) h

. , . , s1 , a , . , . , .

i (

7

) h

. , . , r2 , . , . , . , d

i (

8

) h

. , . , s2 , . , a , . , .

i

Wewantthe hoie between transition (5)and (6)to befair.

Do we want strongor weakfairness?

(49)

(

1

) h

s , . , . , . , . , a , .

i (

2

) h

. , s , . , . , . , . , a

i (

3

) h

r , . , . ,d , . , . , .

i (

4

) h

. , r , . , . , d , . , .

i (

5

) h

. , . , r1 , . , . , d , .

i (

6

) h

. , . , s1 , a , . , . , .

i (

7

) h

. , . , r2 , . , . , . , d

i (

8

) h

. , . , s2 , . , a , . , .

i

Wewantthe hoie between transition (5)and (6)to befair.

Do we want strongor weakfairness?

Ifboth (5)and (7)areenabled (= an our) and we pik (5), then

transition(7) will not be enabled until(6) ours. Therefore ifwe

alwayspik (5), (7)will not beenabled ontinuously: it will only be

enabledinnitely often.

(50)

¯

r

1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

¯

d1

¯

d2

¯

r

1

¯

r2 d1d2

¯

r

1

¯

r2

¯

d1

¯

d2

r1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1r2

¯

d

1

¯

d

2

r

1

¯

r2

¯

d1d2

¯

r1 r

2

d1

¯

d2

(51)

Making the Kripke Struture fair (

⇒ ∧ ⇒

)

¯

r

1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

¯

d1

¯

d2

¯

r

1

¯

r2 d1d2

¯

r

1

¯

r2

¯

d1

¯

d2

r1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1r2

¯

d

1

¯

d

2

r

1

¯

r2

¯

d1d2

¯

r1 r

2

d1

¯

d2

r1

¯

r2

¯

d

1

¯

d

2

¯

r1r2

¯

d

1

¯

d

2

r

1 r

2

¯ ¯

(52)

Theprevious example still allows senarioswhere onelient never

work. What ifwe want to disallow this?

(

1

) h

s , . , . , . , . , a , .

i (

2

) h

. , s , . , . , . , . , a

i (

3

) h

r , . , . ,d , . , . , .

i (

4

) h

. , r , . , . , d , . , .

i (

5

) h

. , . , r1 , . , . , d , .

i (

6

) h

. , . , s1 , a , . , . , .

i (

7

) h

. , . , r2 , . , . , . , d

i

( ) h i

(53)

Theprevious example still allows senarioswhere onelient never

work. What ifwe want to disallow this?

(

1

) h

s , . , . , . , . , a , .

i (

2

) h

. , s , . , . , . , . , a

i (

3

) h

r , . , . ,d , . , . , .

i (

4

) h

. , r , . , . , d , . , .

i (

5

) h

. , . , r1 , . , . , d , .

i (

6

) h

. , . , s1 , a , . , . , .

i (

7

) h

. , . , r2 , . , . , . , d

i (

8

) h

. , . , s2 , . , a , . , .

i

Wewant(1)or (3) to our innitely often (i.e., lient 1progresses),

and (2)or (3) toour innitely often (i.e., lient 2 progresses too).

(54)

Theprevious example still allows senarioswhere onelient never

work. What ifwe want to disallow this?

(

1

) h

s , . , . , . , . , a , .

i (

2

) h

. , s , . , . , . , . , a

i (

3

) h

r , . , . ,d , . , . , .

i (

4

) h

. , r , . , . , d , . , .

i (

5

) h

. , . , r1 , . , . , d , .

i (

6

) h

. , . , s1 , a , . , . , .

i (

7

) h

. , . , r2 , . , . , . , d

i

( ) h i

(55)

¯

r

1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

¯

d1

¯

d2

¯

r

1

¯

r2 d1d2

¯

r

1

¯

r2

¯

d1

¯

d2

r1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1r2

¯

d

1

¯

d

2

r

1

¯

r2

¯

d1d2

¯

r1 r

2

d1

¯

d2

r1

¯

r2

¯

d

1

¯

d

2

¯

r1r2

¯

d

1

¯

d

2

r

1 r

2

¯ ¯

(56)

¯

r

1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

¯

d1

¯

d2

¯

r

1

¯

r2 d1d2

¯

r

1

¯

r2

¯

d1

¯

d2

r1

¯

r2

¯

d

1

¯

d

2

¯

r1

¯

r2

¯

d

1 d

2

¯

r1

¯

r2

d

1

¯

d

2

¯

r1r2

¯

d

1

¯

d

2

r

1

¯

r2

¯

d1d2

¯

r1 r

2

d1

¯

d2

(57)

(

GFp0

GFp1

) ∧ (

GFp2

GFp0

) ∧

(

GFp3

GFp2

) ∧ (

GFp4

GFp2

) ∧ (

GFp5

GFp3

) ∧ (

GFp6

GF

(

p5

p4

)) ∧ (

GFp7

GFp6

) ∧ (

GFp1

GFp7

)

GFp8

How many states to enode the negation in a Bühi automaton?

(58)

(

GFp0

GFp1

) ∧ (

GFp2

GFp0

) ∧

(

GFp3

GFp2

) ∧ (

GFp4

GFp2

) ∧ (

GFp5

GFp3

) ∧ (

GFp6

GF

(

p5

p4

)) ∧ (

GFp7

GFp6

) ∧ (

GFp1

GFp7

)

GFp8

How many states to enode the negation in a Bühi automaton?

Spot'sLTL to Bühitranslation without optimizations : 7291 states.

Withoptimizations : 1731 states.

(59)

(

GFp0

GFp1

) ∧ (

GFp2

GFp0

) ∧ (

GFp3

GFp2

) ∧ (

GFp4

GFp2

) ∧ (

GFp5

GFp3

) ∧ (

GFp6

GF

(

p5

p4

)) ∧ (

GFp7

GFp6

) ∧ (

GFp1

GFp7

)

GFp8

How many states to enode the negation in a Streett automaton?

(60)

(

GFp0

GFp1

) ∧ (

GFp2

GFp0

) ∧ (

GFp3

GFp2

) ∧ (

GFp4

GFp2

) ∧ (

GFp5

GFp3

) ∧ (

GFp6

GF

(

p5

p4

)) ∧ (

GFp7

GFp6

) ∧ (

GFp1

GFp7

)

GFp8

How many states to enode the negation in a Streett automaton?

Formula of the form

ψ → ϕ

where

ψ

is a strong fairness hypothesis.

A = A ⊗ A

Références

Documents relatifs

Langage mahine.- L'instrution en langage symbolique n'est là que pour nous aider à s'en

Elle vous apportera le premier regard extérieur dont vous avez besoin pour vérifier si votre idée tient la route, avancer dans votre projet, commencer à lui donner chair.. Vous

exacte, du cas où N est impair pour lequel le point central sera la moyenne. de

Groundwater flow and natural resources maps make it possible, on a quantitative basis, to solve important practical problems of integrated use and protection of water resources over

[r]

[r]

Exercices sur les fractions et quotients avec corrections, PGCD

[r]