Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Tree-Width of Decidable Problems 1 Gennaro Parlato (U. Southampton, UK) joint work with: P. Madhusudan (UIUC, USA) Salvatore La Torre (U. Salerno,

Similar presentations


Presentation on theme: "The Tree-Width of Decidable Problems 1 Gennaro Parlato (U. Southampton, UK) joint work with: P. Madhusudan (UIUC, USA) Salvatore La Torre (U. Salerno,"— Presentation transcript:

1 The Tree-Width of Decidable Problems 1 Gennaro Parlato (U. Southampton, UK) joint work with: P. Madhusudan (UIUC, USA) Salvatore La Torre (U. Salerno, Italy) Constantin Enea, Peter Habermehl (LIAFA, CNRS, U. Paris 7, France) Omar Inverso (U. Southampton, UK)

2 what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem 2 search space

3 what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem 3 search space Integer Linear programming (ILP) x 1 + x 2 + … + x n = search space: N x N x … N (tuples of natural numbers) a1a1 a2a2 anan b

4 what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem 4 search space Emptiness for automata:  finite state a.  pushdown a.  multi-stack a.  dist. automata with FIFO channels  … search space: init final (runs: sequences of configurations)

5 what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem search space Representation depends on the problem (ILP, Empt. …) We propose uniform repr. with labeled graphs (finite set of labels) search space = class of graphs that is MSO definable (MSO=Monadic Second Order logic)

6 what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem search space finding a solution to P => exists a graph representing a solution => satisfiability of MSO on graphs Satisfibility problem for MSO – undecidable in general – decidable for bounded tree-width graphs (Courcelle/Seese’s theorem)

7 approach - MSO formula describing search space -show solutions have bounded tree-width -algorithm for free! (Courcelle’s theorem) Why existing decision procedures intrinsically “compute” tree-decompositions a new way to look at “old” decidable problems derive new decidability results

8 outline Definitions –MSO on graphs –tree-width Applications –Emptiness automata with auxiliary storage –Integer Linear Programming Conclusions

9 MSO on graphs For a fixed alphabet , a  -labeled graph is a structure (V, {E a } a   ) where – V is a finite set of vertices – E a  V x V is a set of edges labeled by a MSO is given by the following grammar  ::= x=y | x ∈ X | E a (x,y) |  ∨  |  ∧  | ¬  |  x.  (x) |  X.  (X) | ∀ x.  (x) | ∀ X.  (X) where – x, y are first-order variables, X is a second-order variable – E a (x,y) is an edge relation

10 MSO on graphs: examples A bipartite graph is a graph whose vertices can be divided into two disjoint sets U and V such that every edge connects a vertex in U to one in V. bipartite ≡ ∃ U,V. [ partition(U, V) ∧ ∀ u,v. edge(u,v) ⇒ ((u ∈ U ∧ v ∈ V) ∨ (u ∈ V ∧ v ∈ U)) ] partition(U, V) ≡ ∀ z. (z ∈ U ∨ z ∈ V) ∧ ¬(z ∈ U ∧ z ∈ V) Graph 3-Colorability: Given an undirected graph G does there exists a way to colour the nodes red, green, and blue so that no adjacent nodes have the same colour? 3-Colorability ≡ ∃ X,Y,Z. part(X, Y, Z) ∧ ∀ u,v. (u ∈ X ∧ edge(u,v)) ⇒ ¬(v ∈ X) ∧ ∀ u,v. (u ∈ Y ∧ edge(u,v)) ⇒ ¬(v ∈ Y) ∧ ∀ u,v. (u ∈ Z ∧ edge(u,v)) ⇒ ¬(v ∈ Z)

11 tree-width of graphs A tree decomposition of G=(V,E) is a pair (T, {bag z } z is a node of T ), where T is a tree and bag z is a subset of G nodes, such that – every node of G is in some bag – every edge of G has both endpoints in some bag – for every node of G the set of bags that contain it form a sub-tree of T The width of the tree decomposition is the maximum of |bag z |-1 over all T nodes z The tree-width of a graph G, is the minimum such width over all tree decompositions of G Tree width of a tree is 1

12 4 4 tree-decompositions (examples) 1 2 3 4 Line graph: tw=1 1 23 4 56 7 Tree: tw=1 1 2 3 4 Cycle: tw=2 Clique with k nodes: tw= k-1

13 MSO on graphs Satisfiability problem for MSO on a class of graphs C: – Given an MSO formula , is there a graph G in C that satisfies  ? Over the class of all graphs, MSO is undecidable (even FO is undecidable) Satisfiability problem for MSO is decidable on the class of all graphs of tree width k, for any fixed k [Courcelle/Seese’s theorem]

14 outline Definitions –MSO on graphs –tree-width Applications –Emptiness automata with auxiliary storage –Integer Linear Programming Conclusions ✔

15 Emptiness for Automata with auxiliary storage -pushdown automata -multi-stack pushdown automata -distributed automata 15

16 pushdown automata Finite Control stack S Stack alphabet  Finite set of states Q Initial state q 1 Final states F  Q transitions : Internal moves: (q, q’) Pop moves: (q, , q’) Push moves: (q, , q’) S

17 nested words (search space) (Alur-Madhusudan) A nested word NW graph captures the behavior of a run – The stack is compiled down into the nested word (nesting edges) push int pop int pop int push int pop q1q1 q2q2 q3q3 q4q4 q5q5 q6q6 q7q7 q8q8 q9q9 q 10 q 11 q 12 q 13 q 14 final init

18 nested words (search space) (Alur-Madhusudan) The class of NWs is MSO definable – linear relation on black edges – nesting relation on matching edges the simulation of the automaton on nested word using MSO – a second order variable for each state – a second order variable for each symbol in the stack alphabet – check internal, push, and pop moves (local check) The class of NW has tree-width 2 (next slide) Decidability from Courcelle’s theorem q1q1 q2q2 q3q3 q4q4 q5q5 q6q6 q7q7 q8q8 q9q9 q 10 q 11 q 12 q 13 q 14 final γ2γ2 γ3γ3 γ4γ4 γ 11 q 13 init

19 Nested words have bounded tree-width 12 34 567891011121314 Tree decomposition of NW of tw 3 Bags: u is un the bag u if (u,v) is an edge of NW add u to the bags of all nodes of the unique path in T from u to v captures summaries of procedures 1 2 3 4 5 6 7 8 9 10 12 11 13 14 3, 2, 8,13

20 multistack pushdown automata … Finite Control Finite number of stacks S 1, …,S n Stack alphabet  Finite set of states Q Initial state q 0 Final states F  Q Transitions : Internal move: (q, q’) Pop move: (q, , stack_num, q’) Push move: (q, , stack_num, q’) S1S1 S2S2 SnSn

21 Multiply Nested Words (MNW) A MNW graph captures the behavior of a run – Stacks are compiled down into the graph (nesting edges) The class MNWs is – MSO definable – Unbounded tree-width push 1 push 2 pop 1 pop 2 pop 1 int push 1 pop 2 pop 1

22 decidable emptiness problem (Madhusudan, Parlato - POPL’11) Multi-stack pushdown automata with – bounded context-switches (Rehof, Qadeer - TACAS’05) – bounded-phases (La Torre, Madhusudan, Parlato - LICS’07 ) – ordered (Breveglieri, Cherubini, Citrini, Crespi-Reghizzi - Int. J. Found. Comput. Sci.’95) – bounded-scope (La Torre, Napoli - CONCUR’11 ) (La Torre, Parlato - FSTTCS’12 )

23 bounded context-switches Emptiness decidable (Qadeer, Rehof - TACAS’05) In a context only one stack can be used The class of MNWs with k contexts is – MSO definable – tree-width: k + 1 …

24 distributed automata with queues Distributed automata with queues – finite state processes – pushdown processes process FIFO channel

25 queue graphs (finite processes) P1:P1: P2:P2: P3:P3: A queue graph captures the behavior of a run – queues are compiled down into the graph (blue edges) The class of queue graphs is MSO definable (linear orders for each process, FIFO edges) Unbounded tree-width

26 stack-queue graphs (PD processes) P1:P1: P2:P2: P3:P3: A stack-queue graph captures the behavior of a run – Stacks and queues are compiled down into the graph The class of stack-queue graphs is MSO definable Unbounded tree-width

27 decidable emptiness problem (POPL’11) Multi-stack pushdown automata with – bounded context-switches (Rehof, Qadeer - TACAS’05 ) – bounded-phases (La Torre, Madhusudan, Parlato - LICS’07 ) – ordered (Breveglieri, Cherubini, Citrini, Crespi-Reghizzi - Int. J. Found. Comput. Sci.’95) – Bounded-Scope (La Torre, Napoli - CONCUR’11 ) (La Torre, Parlato - FSTTCS’12 ) Distributed automata with finite processes & FIFO queues – finite state processes with polyforest architecture – pushdown processes with forest architecture + well queuing (La Torre, Madhusudan, Parlato - TACAS’08 ) – Non-confluent architectures + eager runs (Heußner, Leroux, Muscholl, Sutre - FOSSACS’10 ) (Heußner – CONCUR workshop’10 )

28 outline Definitions –MSO on graphs –tree-width Applications –Emptiness automata –Integer Linear Programming Conclusions ✔ ✔

29 Integer Linear Programming (ILP) S I is set of all solutions (s 1,s 2, …, s n ) (tuple of natural numbers) Feasibility problem: is S I empty ? x 1 + x 2 + … + x n = Instance I a 11 a 21. a m1 a 12 a 22. a m2 a 1n a 2n. a mn b1b2...bmb1b2...bm

30 plan representing solutions with graphs rather than tuples of natural numbers the class of all solution graphs is MSO definable If there is a solution, there is a graph representing it of path-width 2n where n is the # of variables feasibility problem reduces to the satisfiability problem of MSO on the class of 2n path-width graphs

31 graph representation of a solution Example 1: one constraint 3x 1 – 2x 2 + 1x 3 = 0 solution: x1=3, x2 = 5, x3=1 + + x1x1 - x2x2 x3x3 x1x1 x1x1 x2x2 x2x2 x2x2 x2x2

32 graph representation of a solution Example 2: (two constraints) 3 x 1 – 2 x 2 + x 3 = 0 solution: x1=3, x2 = 5, x3=1 -2 x 1 +1 x 2 + 4 x 3 = 3 + + x1x1 - x2x2 x3x3 x1x1 x1x1 x2x2 x2x2 x2x2 x2x2 b + + - - constraint 1 constraint 2

33 graph representation of a solution Solution graphs (logical characterization) is the class C I of all graphs G = (V, L var, {L sign i } i in [1,…m], {E i } i in [1,m] ) L var : V -> {x 1, x 2, …, x n, b } with exactly one node v with L var (v) = b L sign i : V -> {+, -} - if L var (v) = x j then L sign i (v) = sign( a i j ) - if L var (v) = b then L sign i (v) = sign( -b i ) degree i ( v ) = |a i j | if L var (v) = x j degree i ( v ) = |b i | if L var (v) = b sign i (u) ≠ sign i (v) if (u,v) is an edge of E i All the above properties can be easily defined in MSO (ϕ I )

34 Feasibility to satisfiability on graphs Each graph G in C I corresponds to a solution: ( #nodes labeled x 1, …, #nodes labeled x n ) If s=(s 1, …, s n ) is a solution then there is one or more graphs G in C I s.t. G has exactly s j nodes labeled with variable x j If s=(s 1, …, s n ) is a solution then there is a graph G in C I of path-width 2n representing s

35 bounded path-width Let s = (s 1, …, s n ) be a solution intuition: we construct G and its path decomposition by adding a node labeled x j in a balanced way Example: s=(x 1 =100, x 2 =50, x 3 =25) each 2 (=100/50) increments of x 1, increment x 2 each 4 (=100/25) increments of x 1, increment x 3

36 bounded path-width Two sets of counters (initially set to 0) c j (associated to var x j ) operations: - Increase(j) : c j = c j + s max - Reduce(): c j = c j – s j for all j r i (associated to i-th row of the matrix) r i = SUM j (a i,j * # increase(j)) Invariant c 1 a i,1 + … + c n a i,n r i = -------------------------------- s max by induction after Increase(j) s max r i ’ = r j + a i,j = r j + ----- a i,j = s max c 1 a i,1 + … + (c j +s max ) + … + c n a i,n = --------------------------------------------- s max after Reduce (c 1 - s 1 ) a i,1 + … + (c n - s n ) r i ’ = ------------------------------------= s max s 1 a i,1 + … + s n a i,n = r i - ------------------------- = r i s max

37 bounded path-width Two sets of counters (initially set to 0) c j (associated to var x j ) operations: - Increase(j) : c j = c j + s max - Reduce(): c j = c j – s j for all j r i (associated to i-th row of the matrix) r i = SUM j (a i,j * # increase(j) ) Algorithm: (1)Increase(max); (2)Reduce(), stop if r i =0 for all i (3)Increase(j) for all j≠max s.t. c j < 0 goto (1) Invariant c 1 a i,1 + … + c n a i,n r i = -------------------------------- s max along execution of Algorithm |c j | ------- ≤ 1 s max Therefore SUM (a i,j ) ≤ r i ≤ SUM (a i,j ) a i,j ≤0 a i,j ≥0

38 path-width decomposition - given a solution s - run algorithm according to s list of increase operations: increase( j 1 ), …, increase( j i ), … increase(j t ) xj1xj1 xj1xj1 xjixji xjixji xjixji xjixji xjixji xjixji add a node labeled x j i -match edges -oldest nodes first -remove fully matched nodes size of the each bag ≤ SUM i |r i | ≤ SUM i,j |a i,j | we can prove that this path-decomposition has width at most 2n

39 Conclusions 39

40 Conclusion/Future work A general criterion that uniformly explains many decidability results for automata with auxiliary storage (stacks, queues) Integer Linear Programming Other decidable results? Several decidability results for automata are obtained using Parikh + Presburger A Perfect Model for Bounded Verification [Esparza,Ganty, Majumdar, LICS’12] Is this a general principle that governs decidability ?

41 Future work (program verification) Reasoning about Concurrent programs + Weak Memory models? Automata with heap structures? -a concurrent/distributed program can be seen as as sequential program + stacks/queues -what about lists, trees, …, graphs? Behavior graphs? Can we exploit this new view to device (under-approximate) scalable solutions for the analysis of programs??? -sequentialization of programs … tree-decompositions can be seen as a tree or a sequential programs with procedure calls -New SMT encodings (bounded model checking) -Fixed point engines …

42 Open problem: “abab problem”

43 Example w = aabababbaabb [ # a (a) = # b (w)] Marking of w: aabababbaabb =w aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) Marking M w : row 0 000000000000 row 1 000100000000 row 2 000100100000 row 3 010100100000 row 4 011100100000 row 5 111100100000 row 6 111100110000 row 7 111100111000 row 8 111110111000 row 9 111111111000 row 10 111111111010 row 11 111111111110 row 12 111111111111

44 Open problem: “abab problem” Let w be any word over the alphabet {a,b}, with # a (w) = # b (w). w is called balanced word. A marking of w is a bit matrix M w of dimension (n+1) x n (rows: 0 to n) (columns: 1 to n ) first row of M is all 0’s for i>1, the i-th row is a copy of the (i-1)-th row except one position, say j, s. t. M[i-1, j]=0 and M[i, j]=1. Furthermore, if i is odd w[i]=a, otherwise w[i]=b

45 Open problem: “abab problem” Given a marking M w of a balanced word w, we define the width of M w as follows. The width of a row of M w is the number of its 1-sequences. The width of M w is the maximum width over all M w rows. Example: The marking-width of a balanced word w, denoted marking-width(w), is the minimum width overall markings of w. Marking M w : row 0 000000000000 width = 0 row 1 000100000000 width = 1 row 2 000100100000 width = 2 row 3 010100100000 width = 3 row 4 011100100000 width = 2 row 5 111100100000 width = 2 row 6 111100110000 width = 2 row 7 111100111000 width = 2 row 8 111110111000 width = 2 row 9 111111111000 width = 1 row 10 111111111010 width = 2 row 11 111111111110 width = 1 row 12 111111111111 width = 1 width(M w )=3

46 Constantin Enea, Peter Habermehl, Gennaro Parlato “abab problem” Is there a constant k s. t. for every balanced word w, w has marking-width ≤ k ?


Download ppt "The Tree-Width of Decidable Problems 1 Gennaro Parlato (U. Southampton, UK) joint work with: P. Madhusudan (UIUC, USA) Salvatore La Torre (U. Salerno,"

Similar presentations


Ads by Google