Checking Two Structural Properties of Vector Addition ... - MoVeP 2012

Definition. A vector addition system with state (VASS) is a directed graph. G = (Q,A,i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by ...
402KB taille 1 téléchargements 349 vues
Checking Two Structural Properties of Vector Addition Systems with States Florent Avellaneda & Rémi Morin Université d’Aix Marseille

6 décembre 2012

Florent Avellaneda

MOVEP 2012

1 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

VASS Definition A vector addition system with state (VASS) is a directed graph G = (Q, A, i) with : Q a finite set of nodes. A ⊆ Q × Zd × Q a finite set of edges labeled by vectors. An initial state ∈ Q × Nd .

(-1, 1)

l1 q2

(1, -1)

q1 l4 (-1, 0)

Florent Avellaneda

l2

(0, -1) l3

(5, 5)

MOVEP 2012

2 / 19

Petri net

VASS are very close to Petri nets : A VASS can be simulated by a Petri net.

q2 a→b

b

a

l1 b→∅

l2

l3

q2

b→a

q1 l4

a→∅

∅→4a 3b

q1

Florent Avellaneda

MOVEP 2012

3 / 19

Petri net VASS are very close to Petri nets : A VASS can be simulated by a Petri net. A Petri net is a VASS with one state. 3a→4b 5c 3c→a 2b

a b→2c

b 3c→2a

Florent Avellaneda

MOVEP 2012

3 / 19

MSG

MSG (Message Sequence Graph) Automaton where each node is labeled by an MSC.

MSGs are a special case of VASSs.

a b c a b c a b c

a b c

Florent Avellaneda

VASSs are exponentially more concise than MSGs.

b c

MOVEP 2012

4 / 19

Example : simplified sliding window protocol

i j n.w j m→b j

i b→i w

i

j

i

j

i

j

i

j

...

i

j

i

j

i w→i b

j b→j m

...

n

Florent Avellaneda

MOVEP 2012

5 / 19

Termination

Carstensen 87 Termination of a given VASS is EXPSPACE-hard.

Florent Avellaneda

MOVEP 2012

6 / 19

Termination

Carstensen 87 Termination of a given VASS is EXPSPACE-hard. But, structural termination is polynomial problem.

Florent Avellaneda

MOVEP 2012

6 / 19

Property A VASS is structurally terminating if and only if there exists no closed path whose cost is ≥ ~0.

Florent Avellaneda

MOVEP 2012

7 / 19

Property A VASS is structurally terminating if and only if there exists no closed path whose cost is ≥ ~0. Problem solvable in polynomial time by linear programming.

Florent Avellaneda

MOVEP 2012

7 / 19

Minimum length of a closed path solution is potentially exponential.

(n, -n)

(-1, 1) l2

l1

l1 . . . l2 l2 l2 l2 . . . ⇒ l1 + n · l2 | {z } n times

The counter example is a multiset of edges.

Florent Avellaneda

MOVEP 2012

8 / 19

Challenge The counter example as multiset of edge is too complex.

Goal Find a simple representation of counter examples.

Solution Use a set of lassos.

Florent Avellaneda

MOVEP 2012

9 / 19

Definition Let Y0 be a circuit starting from node n. Let Y1 be a simple path from qin to n and Y2 be a simple path from n to qin . The closed path Y1 · (Y0 )k · Y2 is called a lasso with valuation k starting from qin .

k times

n

qin

Florent Avellaneda

MOVEP 2012

10 / 19

Result

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ .

(-1, -1) (3, -1) l2

Florent Avellaneda

q2

q0 a1

a3 a2 (-1, -1)

(-1, -1) q1

l1 (-1, 2)

MOVEP 2012

11 / 19

Example

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ .

x1 (-1, -1) (3, -1) l2 x3

Florent Avellaneda

q2

q0 a3

a1

(-1, -1) x1

a2 (-1, -1) x1

q1

l1 (-1, 2) x5

H = a1 + 5l1 + a2 + 3l2 + a3 S1 = a1 + 10l1 + a2 + a3 S2 = a1 + a2 + 6l2 + a3 S = S1 + S2 = 2 × cost(H)

MOVEP 2012

12 / 19

Example

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ .

x1 (-1, -1) (3, -1) l2

Florent Avellaneda

q2

q0 a3

a1

(-1, -1) x1

a2 (-1, -1) x1

q1

l1 (-1, 2) x10

H = a1 + 5l1 + a2 + 3l2 + a3 S1 = a1 + 10l1 + a2 + a3 S2 = a1 + a2 + 6l2 + a3 S = S1 + S2 = 2 × cost(H)

MOVEP 2012

13 / 19

Example

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ .

x1 (-1, -1) (3, -1) l2 x6

Florent Avellaneda

q2

q0 a3

a1

(-1, -1) x1

a2 (-1, -1) x1

q1

l1 (-1, 2)

H = a1 + 5l1 + a2 + 3l2 + a3 S1 = a1 + 10l1 + a2 + a3 S2 = a1 + a2 + 6l2 + a3 S = S1 + S2 = 2 × cost(H)

MOVEP 2012

14 / 19

Example

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ .

(-1, -1) (3, -1) l2

Florent Avellaneda

q2

q0 a1

a3 a2 (-1, -1)

(-1, -1) q1

l1 (-1, 2)

H = a1 + 5l1 + a2 + 3l2 + a3 S1 = a1 + 10l1 + a2 + a3 S2 = a1 + a2 + 6l2 + a3 S = S1 + S2 cost(S) = 2 × cost(H)

MOVEP 2012

15 / 19

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ . Idea :

b H

Florent Avellaneda

MOVEP 2012

16 / 19

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ . Idea :

b L H

Florent Avellaneda

MOVEP 2012

16 / 19

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ . Idea :

b L H

Florent Avellaneda

b'

MOVEP 2012

16 / 19

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ . Idea :

b

L'

L H

Florent Avellaneda

b'

MOVEP 2012

16 / 19

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ . Idea :

b

L'

H

Florent Avellaneda

MOVEP 2012

16 / 19

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ . Idea :

b

L'

H

Florent Avellaneda

MOVEP 2012

16 / 19

Theorem Let H be a closed path given as a multiset of edges. We can compute in polynomial time a finite multiset of lassos S starting from b ∈ VH such that cost(S) = m × cost(H) with m ∈ N ∗ . Idea :

b

L'

3H

Florent Avellaneda

MOVEP 2012

16 / 19

Corollary Let H be a closed path with b ∈ VH . Then there exist a closed path H 0 with almost d lassos starting from b such that cost(H) = m × cost(H 0 ). Idea : x1 · cost(S1 ) + x2 · cost(S2 ) + ... + x|A| · cost(S|A| ) ≥ ~0 By linear programming, we can find d lassos such that xi1 · cost(Si1 ) + xi2 · cost(Si2 ) + ... + xid · cost(Sid ) ≥ ~0

Florent Avellaneda

MOVEP 2012

17 / 19

Conclusion

Structural termination of VASS is equivalent to search a positive closed path. Linear programming solve this problem in polynomial time, but with complex counter example. Polynomial algorithm to represent a counter example by d lassos.

Florent Avellaneda

MOVEP 2012

18 / 19

Thanks.

Florent Avellaneda

MOVEP 2012

19 / 19