Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Language Theory of Bounded Context-Switching Gennaro Parlato (U. of Illinois, U.S.A.) Joint work with: Salvatore La Torre (U. of Salerno, Italy) P.

Similar presentations


Presentation on theme: "The Language Theory of Bounded Context-Switching Gennaro Parlato (U. of Illinois, U.S.A.) Joint work with: Salvatore La Torre (U. of Salerno, Italy) P."— Presentation transcript:

1 The Language Theory of Bounded Context-Switching Gennaro Parlato (U. of Illinois, U.S.A.) Joint work with: Salvatore La Torre (U. of Salerno, Italy) P. Madhusudan (U. of Illinois, U.S.A.)

2 What is this talk about?  Our work is motivated by the verification of concurrent programs with recursive procedures communicating through shared variables  Reachability/Emptiness is undecidable for such programs  Restricted reachability has gained a lot of attention in the literature for programs with variable ranging over finite domain  Reachability within a fixed number of context-switches is decidable  Many errors manifest themselves within few context-switches  We undertake a language- and automata-theoretic study of concurrent programs under bounded context-switches  Multi-stack Pushdown Automata are a natural model for such programs

3 Multi-stack Visibly Pushdown Automata (MVPAs) … stack-1stack-2stack-n Finite Control Finite number of states - including an initial state & set of final states Moves only the symbol a - Internal move for stack i if a  Int i - Push move onto stack i if a  Push i - Pop move from stack i if a  Pop i The symbol of ∑ determines the kind of move to make VISIBLE ALPHABET Each stack has its own alphabet - Push i, Pop i, Int i (disjoint sets) ∑ i = (Push i U Pop i U Int i ) is the alphabet of stack i Symbols describe the behavior of the automaton ∑ i and ∑ j are pairwise disjoint for i  j ∑ = ∑ 1 U∑ 2 U … U ∑ n is the input alphabet

4 Bounded round executions  We consider only executions going through k rounds A round is a word in the language Round = ∑ 1 +. ∑ 2 +. … ∑ n + Round k is the set of all k-round words  A k-round word can be seen as a matrix A row is a round The concatenation of the word on column i is the stack i projection of the input word w round 1 w 11 w 12 w 13 … w 1n round 2 w 21 w 22 w 23 … w 2n … … … … … round k w k1 w k2 w k3 … w kn w= w 11 w 12 w 13 … w 1n w 21 w 22 w 23 … w 2n …. w k1 w k2 w k3 … w kn

5 A k-round execution can be seen as w 11 w 21 w 31 w k1 w 12 w 22 w 32 w k2 w 1n w 2n w 3n w kn round 1 round 2 round 3 round k stack 1stack 2stack n q 11 q 21 q 31 q k1 q’ 12 q’ 22 q’ 32 q’ k2 q’ 11 q’ 21 q’ 31 q’ k1 q 12 q 22 q 32 q k2 q 1n q 2n q 3n q kn q’ 1n q’ 2n q’ 3n q’ kn

6 Example: a language recognized by a 2-round MVPA  L= { a i x j b i y j | i,j > 0 } Push $ onto stack 1 reading a Push @ onto stack 2 reading x Pop $ form stack 1 reading b Pop @ from stack 2 reading y (The first symbol pushed onto each stack is encoded differently to check later whether the stack is empty)  L can be accepted by a 2-round MVPA  L is not context-free language  All recognized languages are context-sensitive (La Torre, Madhusudan, Parlato, LICS’07)

7 Bounded-round MVPLs Class of languages accepted by bounded-round MVPAs  A sub-class of context-sensitive languages  Visibily implies closure under Union Intersection  Nondeterministic and deterministic versions are equivalent  Closed under complement (through Determinizability)  Decidable Emptiness and Membership problems  Universality and inclusion problems are decidable closure under Boolean operations decidability of the emptiness problem

8 Related Work  Visibly pushdown automata (Alur, Madhusudan, STOC’04)  Bounded-phase multi-stack visibly push-down automata (not determinizable) (La Torre, Madhusudan, Parlato, LICS’07)  Visibly ordered pushdown automata (NOT determinizable, wrong determinizability proof is given) (Carotenuto, Murano, Peron, DLT’07)

9 Determinization (main technical result)

10 Deterministic bounded-round VMPAs  A VMPA is deterministic if for any state, and for any input symbol at most one move is allowed  Bounded-round VMPAs are determinizable: If A is a k-round MVPA, then there exists a k-round MVPA A D such that L(A)=L(A D ) Boundedness of the number of rounds is crucial for our proof The class of MVPAs is not closed under determinization (La Torre, Madhusudan, Parlato, LICS’07)  Determinization construction …

11 A run can be seen as … w 11 w 21 w 31 w k1 w 12 w 22 w 32 w k2 w 1n w 2n w 3n w kn round 1 round 2 round 3 round k stack 1stack 2stack n q 11 q 21 q 31 q k1 q’ 12 q’ 22 q’ 32 q’ k2 q’ 11 q’ 21 q’ 31 q’ k1 q 12 q 22 q 32 q k2 q 1n q 2n q 3n q kn q’ 1n q’ 2n q’ 3n q’ kn … … … …… …

12 Interfaces w 1j w 2j w 3j w kj round 1 round 2 round 3 round k IN i q’ 1i q’ 2ii q’ 3i q’ ki q 1i q 2i q 3i q ki An interface of stack i Is definded w.r.t. a word of stack i w 1i # w 2i # w 3i # … # w ki (# represents a context-switch) It corresponds to the pair (IN i, OUT i ) where - In i = ( q 1j, q 2j, q 3j, … q kj ) - OUT i = ( q’ 1j, q’ 2j, q’ 3j, … q’ kj ) Interfaces of stack i can be computed by a non deterministic VPA A i STATES: (q, Interface, round) -q is any A state -Interface is an encoding of the interface computed until now - round tracks the round under simulation MOVES: - All A’s moves on stack i symbols - internal moves on the fresh symbol # -update q with any q’ (guess the state at next round) -update Interface storing q and q’ -increment round … … … … OUT i

13 Why consider interfaces w 11 w 21 w 31 w k1 w 12 w 22 w 32 w k2 w 1n w 2n w 3n w kn round 1 round 2 round 3 round k stack 1stack 2stack n q 11 q 21 q 31 q k1 q’ 12 q’ 22 q’ 32 q’ k2 q’ 11 q’ 21 q’ 31 q’ k1 q 12 q 22 q 32 q k2 q 1n q 2n q 3n q kn q’ 1n q’ 2n q’ 3n q’ kn … … … …… … Theorem (accepting condition): A k-round word w is accepted by A iff there is an interface Int i, one for each stack i on the word w i, such that Int 1 composes Int 2 composes … composes Int n Int n wraps Int 1 q 11 is the initial state & q’ kn is a final state

14 Construction of a deterministic MVPA A D  A i can be determinized (A i D ) (Alur, Madhusudan, STOC’04)  Every A i D state encodes the set of all possible interfaces on any k-round word w i (w i is the subword of w composed only by symbols of stack i)  The deterministic automaton A D simulates in parallel all the A i D independently, switching from one to another reading the input word It does not care if interfaces compose/wrap Composition and wrapping is checked only at the end of the computation for acceptance (see accepting condition)

15 Idea of the simulation w 11 w 21 w 31 w k1 w 12 w 22 w 32 w k2 w 1n w 2n w 3n w kn round 1 round 2 round 3 round k stack 1stack 2stack n q 11 q 21 q 31 q k1 q’ 12 q’ 22 q’ 32 q’ k2 q’ 11 q’ 21 q’ 31 q’ k1 q 12 q 22 q 32 q k2 q 1n q 2n q 3n q kn q’ 1n q’ 2n q’ 3n q’ kn … … … …… …  Reading a symbol of w ij, except the first one, simulate A j D  Reading the first symbol of w ij, simulate in parallel (# is not in ∑ ) A j-1 D on the symbol #, and A j D on the first symbol of w ij A D is deterministic

16 … going back to the construction of A D  A i can be determinized (A i D ) (Alur, Madhusudan, STOC’04)  Every A i D state encodes the set of all possible interfaces on the k-round word w i  The deterministic automaton A D simulates in parallel all the A i D switching from one A i D to another reading the input word  After reading w every A i D has computed the set of all possible interfaces on w i  Final states: A D accepts a word w iff there is a set of interfaces, one for each stack, that satisfy the accepting condition

17 Conclusion

18  We have defined a robust sub-class of context-sensitive languages Determinazable  (we conjecture that finding a larger class in terms of patterns is unlikely) Closed under all Boolean operations Decidable emptiness, universality and inclusion problems MSO characterization, Parikh theorem (La Torre, Madhusudan, Parlato, LICS’07)  Same results if we consider bounded context-switch words instead of bounded round words


Download ppt "The Language Theory of Bounded Context-Switching Gennaro Parlato (U. of Illinois, U.S.A.) Joint work with: Salvatore La Torre (U. of Salerno, Italy) P."

Similar presentations


Ads by Google