avoiding determinization

51
Avoiding Determinization Orna Kupferman Hebrew University Joint work with Moshe Vardi

Upload: adlai

Post on 01-Feb-2016

28 views

Category:

Documents


0 download

DESCRIPTION

Avoiding Determinization. Orna Kupferman Hebrew University. Joint work with Moshe Vardi. A single run on every input. NO!. Multiple runs on every input. perhaps. Deterministic (automaton, Turing machine, person…). Success: happily ever after in the unique future. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Avoiding Determinization

Avoiding Determinization

Orna Kupferman

Hebrew University

Joint work with Moshe Vardi

Page 2: Avoiding Determinization

Deterministic (automaton, Turing machine, person…)

NO!A single run on every input.

Success: happily ever after in the unique future.

Nondeterministic (automaton, Turing machine, person…)Multiple runs on every input.

perhapsSuccess: happily ever after in at

least one future.

Page 3: Avoiding Determinization

Success: happily ever after in at least one future.

A very convenient definition of success…

Risk is for free.

Goals are achieved in a more succinct way.

perhaps

Page 4: Avoiding Determinization

NFW are exponentially more succinct than DFW

{N,D,A,U} x {F,B,R,P} x {W,T}

NFW: nondeterministic automata on finite words.

DBW: deterministic Büchi word automata.

APT: alternating parity tree automata.

Page 5: Avoiding Determinization

NFW are exponentially more succinct than DFW

Ln = (0+1)*.0.(0+1)n

NFW: O(n) states

n

0, 1

0, 10, 1 0, 10 . . .

DFW: O(2n) states

uv1

v2 0

1

n

Page 6: Avoiding Determinization

Sometimes, nondeterminism causes no problems.Nonemptiness check:

L(A) ≠ Ø ?

Membership check, projection,…

NFW and DFW: reachability NLOGSPACE, linear time

Page 7: Avoiding Determinization

Sometimes, nondeterminism is problematic.

1. Complementation: L(A’) = comp(L(A))

DFW: dualize the acceptance condition.

0

1

1

0

L(A) = (0+1)*.1

comp(L(A)) = ε+ (0+1)*.0

Page 8: Avoiding Determinization

Sometimes, nondeterminism is problematic.

1. Complementation: L(A’) = comp(L(A))

DFW: dualize the acceptance condition.

0

1

1

0

L(A) = (0+1)*.1

comp(L(A)) = ε+ (0+1)*.0

Page 9: Avoiding Determinization

Sometimes, nondeterminism is problematic.

1. Complementation: L(A’) = comp(L(A))

NFW: dualize the acceptance condition?

0,11

L(A) = (0+1)*.1

comp(L(A)) = ε+ (0+1)*.0

Page 10: Avoiding Determinization

Sometimes, nondeterminism is problematic.

1. Complementation: L(A’) = comp(L(A))

NFW: dualize the acceptance condition?

L(A) = (0+1)*.1

comp(L(A)) = ε+ (0+1)*.0

0,11

L(A’) = (0+1)*

wL(A): exists an accepting run.

wL(A): all runs are rejecting.

dualization: exists a rejecting run.

Page 11: Avoiding Determinization

Tree automata:

Word automata: M(q0,a)={q1,q2}

Tree automata: M(q0,a)={q1,q3, q2,q1}

a

c c c a

c a

q0

q1 q3

Sometimes, nondeterminism is problematic.

2. Running A on a tree.

a

c

c

q0

q1

Page 12: Avoiding Determinization

Sometimes, nondeterminism is problematic.

2. Running A on a tree.

M(q0,a)={q1,q2}

Mt(q0,a)={q1,q1, q1,q2, q2,q1, q2,q2}

Given: an NFW A.

Mt(q,a) = M(q,a) x M(q,a)

Run A on each of the paths of the tree…

Wanted: an NFT At that accepts all trees all of whose paths are accepted by A.

Page 13: Avoiding Determinization

Sometimes, nondeterminism is problematic.

2. Running A on a tree.

L(A) = (0+1)*.0.(0+1)n

A: whenever you read 0, guess whether the input ends after exactly n letters.

At: whenever you read 0, guess whether all the

paths in the subtree end after exactly n letters.

n

0, 1

0, 1

0, 1

0, 1

0. . .

Page 14: Avoiding Determinization

Sometimes, nondeterminism is problematic.

2. Running A on a tree.

L(A) = (0+1)*.0.(0+1)n

A: whenever you read 0, guess whether the input ends after exactly n letters.

At: whenever you read 0, guess whether all the

paths in the subtree end after exactly n letters.

n

0, 1

0, 1

0, 1

0, 1

0. . .

Mt(●,0)={●,●, ●,●, ●,●, ●,●}

● ●

Page 15: Avoiding Determinization

Sometimes, nondeterminism is problematic.

2. Running A on a tree.

L(A) = (0+1)*.0.(0+1)n

A: whenever you read 0, guess whether the input ends after exactly n letters.

0accepts:

rejects:

0 0

1

1

0

0 0

1

0

0

0 1

1

0

1

n

0, 1

0, 1

0, 1

0, 1

0. . . ● ●

Mt(●,0)={●,●, ●,●, ●,●, ●,●}

n=2: ●

● ●

Page 16: Avoiding Determinization

Sometimes, nondeterminism is problematic.

2. Running A on a tree.

Applications in

1. Decidability of CTL*, μ-calculus,… [SE84, EJ91,…]

2. Solving games with ω-regular goals. [Tho95]

3. LTL realizability and synthesis. [RP89]

Page 17: Avoiding Determinization

How to solve complementation, decidability, games, synthesis,…?

DETERMINIZE!

#1 problem: exponential blow-up.

legitimate (matching lower bounds).

#2 problem (automata on infinite words):

determinization is awfully complicated.

Page 18: Avoiding Determinization

Automata on infinite words

0,1

1

1

s q L(A) = (0+1)*.1ω

Büchi acceptance: visit α infinitely often

0

1

1

0

{s}

{s,q}

Subset construction:

There is no DBW for L(A) [Lan69].

Safra’s determinization construction 1988:

NBW(n) DRW(2O(n log n), O(n))

Page 19: Avoiding Determinization

Safra’s construction:

- First optimal construction!

Each state of A’ is an ordered tree in which each node is labeled by a subset

of the states of A such that the label of a node is

- Beautiful!

MONA: implementation of a nonelementary algorithm

Model checking: tools! A success story!!

Synthesis: no tools, no story.

Very Complicated!!!

Page 20: Avoiding Determinization

Weare

afraid of Safra

Page 21: Avoiding Determinization

Universal (automaton, Turing machine, person…)

Multiple runs on every input.perhap

sSuccess: happily ever after in all futures.

When viewed as a UFW, L(A) =

When viewed as an NFW, L(A) = (0+1)*

(0+10)* every 1 is followed by 0

0,11 0

0,1

Page 22: Avoiding Determinization

Universal automata are sufficiently strong to serve as intermediate

automata in many applications in which deterministic automata are traditionally used as intermediate

automata.-Complementation constructions

-Decision procedures

-Synthesis

- You name it (please do)

Talk outline:

1. Indeed sufficiently strong.

2. Much simpler! Promising practical applications.

Page 23: Avoiding Determinization

Complementation

NFW DFW DFW

NFW UFW DFW

Finite words:

dualize both the branching mode and the set of accepting states

subset construction

a state S Q: all states the universal automaton may visit.

S is accepting iff S α

Page 24: Avoiding Determinization

Complementation

Given an NBW A, construct a complementary NBW.

1. Construct a DRW equivalent to A.

2. Dualize the DRW.

3. Translate the result to an NBW.

Current procedure:

co-determinization, Streett, LAR, …

Page 25: Avoiding Determinization

Complementation

1. NBW complementary UCW.

2. UCW NBW.

Our procedure:

Easy: dualize both the transitions and the acceptance condition and get a UCW for the comlementary language.

Given an NBW A, construct a complementary NBW.

Easy: analyze ranks in accepting runs of UCW.

[GSKV03]

co-Buchi acceptance: visit α only finitely often

Page 26: Avoiding Determinization

Example: 0,1

1

1

s1 s2

L(A) = (0+1)*.1ω

finitely many 0s

0,1

0s3

NBW:

Page 27: Avoiding Determinization

L(A) = (1*0)ω

infinitely many 0s

UCW:

0,1

1

1

s1 s2

0,1

0s3

Page 28: Avoiding Determinization

s2

s2

L(A) = (1*0)ω

0,1

1

1

s1 s2

0,1

0s3

s1

s10

1

0

s3

s1 s2

s1 s3

1

1

1

s1 s2

0s1 s3

0

a ranking function

f:V {0,…,2n}

s3s1

s3s1

Page 29: Avoiding Determinization

s2

s2

L(A) = (1*0)ω

0,1

1

1

s1 s2

0,1

0s3

s1

s10

1

0

s3

s1 s2

s1 s3

1

1

1

s1 s2

0s1 s3

0

a ranking function

f:V {0,…,2n}

The state space of the NBW:

subset construction + ranks for the states in the subset

s3s1

s3s1

1

1

1

1

1

2

2 2 2 3

3 3 3 3 3 3

3

Page 30: Avoiding Determinization

Complementationμ-calculus satisfiability

Page 31: Avoiding Determinization

μ-calculus satisfiability

Is there a tree satisfying Ψ?

1. Construct an APT AΨ that accepts all trees satisfying Ψ [EJ91,KVW00].

2. APT NPT.

3. Check emptiness of the NPT.

Current procedure:

determinization of an NPW that accepts good paths of the run tree.

parity games… [Jur00]

Page 32: Avoiding Determinization

μ-calculus satisfiability

Is there a tree satisfying Ψ?

1. Construct an APT AΨ that accepts all trees satisfying Ψ [EJ91,KVW00].

2. APT UCT.

3. Check emptiness of the UCT.

Our procedure:

Easy, “empiness equivalent” UCT, similar to the translation on NPW to NBW.

UCT “emptiness equivalent’’ NBT

Ranks…

Page 33: Avoiding Determinization

Complementationμ-calculus satisfiability

Synthesis

Page 34: Avoiding Determinization

Synthesis

Given an LTL formula Ψ over I and O, construct a finite-state strategy f: (2I)* 2O that generates only computations that satisfy Ψ.

Open system: interacts with an environment! o0

o1=f(i0)

o2=f(i0,i1)

o3=f(i0,i1,i2)

i2

i1

i0

(f() ) )i0,f)i0(( )i1,f)i0,i1(( )i2,f)i0,i1,i2(( …

Page 35: Avoiding Determinization

Synthesis

Is Ψ realizable?

1. Construct a DRW AΨ that accepts all computations satisfying Ψ.

2. Run AΨ on the I-exhaustive tree.

3. Check emptiness of the NRT.

Current procedure [PR88]:

Rabin emptiness… [PR88,KV98]

Page 36: Avoiding Determinization

Synthesis

Is Ψ realizable?

1. Construct an NBW A~Ψ that accepts all computations satisfying ~Ψ [VW94].

2. Run the dual UCW on the I-exhaustive tree.

3. Check emptiness of the UCT.

Our procedure:

Easy, running a universal automaton on a tree is sound and complete.

Page 37: Avoiding Determinization

The magic:

UCW NBW

UCT NBT

Based on an analysis of accepting runs of co-Büchi automata

A run is accepting iff the vertices of its run DAG can get ranks in {0,…,k} so that ranks along paths decrease and odd ranks appear only finitely often.

The NBW/NBT: guesses a ranking, checks decrease, checks infinitely many visits to even ranks.

Page 38: Avoiding Determinization

A run is accepting iff the vertices of its run DAG can get ranks in {0,…,k} so that ranks along paths decrease and odd ranks appear only finitely often.

s2

s2

s1

s1

s3

s1 s2

s1 s3

s1 s2

s1 s3

s3s1

s3s1

1

1 1 1 1

2

2 2 2

3

3 3 3 3 3 3

3

Width of the run DAG:

-For UCW: bounded by n.

-For UCT: ???

If the UCT accepts some tree, it also accepts a tree generated by a transducer with k=(2n!)n2n3n(n+1)/n! states.

k

We still need Safra!

k is bounded by the width of the run DAG.

Page 39: Avoiding Determinization

The magic:

UCW NBW

UCT NBT

Based on an analysis of accepting runs of co-Büchi automata

A run is accepting iff the vertices of its run DAG can get ranks in {0,…,k} so that ranks along paths decrease and odd ranks appear only finitely often.

The NBW/NBT: guesses a ranking, checks decrease, checks infinitely many visits to even ranks.

In practice: [GSKV03]

-Incremental search for k.

-Symbolic implementation.

Page 40: Avoiding Determinization

To sum up:

1. Many applications use determinization.

2. The complexity of Safra’s determinization prevents implementations.

3. Universality can replace determinization and results in much simpler and friendlier procedures.

universality

Page 41: Avoiding Determinization

The end

Page 42: Avoiding Determinization

0,11 0

s1 s2 s3

s1

s1

s1 s2

0

1

1

.

.

.

s2

0,1

Page 43: Avoiding Determinization

0,11 0

s1 s2 s3 0,1

s1

s1

0

1

0

s3

s1 s2

s1 s3

0

1

0s1 s2

s1 s3

s1

s3

s3

Page 44: Avoiding Determinization

Complementation

NFW DFW DFW

NFW UFW DFW

Finite words:

NBW DRW NBW

NBW UCW NBW

Infinite words:

co-Büchi acceptance:

visit α only

finitely often

Page 45: Avoiding Determinization

NBW UCW NBW

Page 46: Avoiding Determinization

NBW UCW NBW

Easy: dualize both branching mode and acceptance condition. O(1)

wA: exists a run that visits α infinitely often.

wA: all runs visit α only finitely often.

Page 47: Avoiding Determinization

NBW UCW NBW [KV97]

Page 48: Avoiding Determinization

UCW NBW 0,1

1

1

s1 s2

L(A) = (0+1)*.1ω

0,1

0s3

NBW:

Page 49: Avoiding Determinization

UCW NBW

L(A) = (1*0)ωUCW:

0,1

1

1

s1 s2

0,1

0s3

Page 50: Avoiding Determinization

UCW NBW

L(A) = (1*0)ω

s1

s10

1

0

s3

s1 s2

s1 s3

1

1

1s2

s1 s2

s1

s3

s3

s2

s1

0s1 s3

0,1

1

1

s1 s2

0,1

0s3

0

a ranking function

f:V {0,…,2n}

The state space of the NBW:

subset construction + ranks for the states in the subset

Page 51: Avoiding Determinization

Complementationμ-calculus satisfiability

[GSKV03]