the language theory of bounded context-switching
Post on 07-Jan-2016
39 Views
Preview:
DESCRIPTION
TRANSCRIPT
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.)
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
Multi-stack Visibly Pushdown Automata (MVPAs)
…
stack-1 stack-2 stack-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 aInti
- Push move onto stack i if aPushi
- Pop move from stack i if aPopi
The symbol of ∑ determines the kind of move to make
VISIBLE ALPHABET
Each stack has its own alphabet - Pushi, Popi, Inti (disjoint sets)
∑ i = (Pushi U Popi U Inti) is the alphabet of stack iSymbols describe the behavior of the automaton
∑ i and ∑ j are pairwise disjoint for ij
∑ = ∑ 1 U∑ 2 U … U ∑ n is the input alphabet
Bounded round executions We consider only executions going through k rounds
A round is a word in the languageRound = ∑ 1
+ . ∑ 2
+ . … ∑ n
+
Roundk 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 w11 w12 w13 … w1n
round 2 w21 w22 w23 … w2n
… … … … …
round k wk1 wk2 wk3 … wkn
w= w11 w12 w13 … w1n w21w22 w23 …w2n …. wk1 wk2 wk3 … wkn
A k-round execution can be seen as
w11
w21
w31
wk1
w12
w22
w32
wk2
w1n
w2n
w3n
wkn
round 1
round 2
round 3
round k
stack 1 stack 2 stack n
q11
q21
q31
qk1
q’12
q’22
q’32
q’k2
q’11
q’21
q’31
q’k1
q12
q22
q32
qk2
q1n
q2n
q3n
qkn
q’1n
q’2n
q’3n
q’kn
Example: a language recognized by a 2-round MVPA
L= { ai xj bi yj | 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)
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
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)
Determinization (main technical result)
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 AD such that L(A)=L(AD)
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 …
A run can be seen as …
w11
w21
w31
wk1
w12
w22
w32
wk2
w1n
w2n
w3n
wkn
round 1
round 2
round 3
round k
stack 1 stack 2 stack n
q11
q21
q31
qk1
q’12
q’22
q’32
q’k2
q’11
q’21
q’31
q’k1
q12
q22
q32
qk2
q1n
q2n
q3n
qkn
q’1n
q’2n
q’3n
q’kn
… … …
… …
…
Interfaces
w1j
w2j
w3j
wkj
round 1
round 2
round 3
round k
INi
q’1i
q’2ii
q’3i
q’ki
q1i
q2i
q3i
qki
An interface of stack i Is definded w.r.t. a word of stack i
w1i # w2i # w3i # … # wki (# represents a context-switch)
It corresponds to the pair (INi, OUTi) where- Ini = ( q1j, q2j, q3j, … qkj )- OUTi = ( q’1j, q’2j, q’3j, … q’kj )
Interfaces of stack i can be computed by a non deterministic VPA Ai
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
…… …
…
OUTi
Why consider interfaces
w11
w21
w31
wk1
w12
w22
w32
wk2
w1n
w2n
w3n
wkn
round 1
round 2
round 3
round k
stack 1 stack 2 stack n
q11
q21
q31
qk1
q’12
q’22
q’32
q’k2
q’11
q’21
q’31
q’k1
q12
q22
q32
qk2
q1n
q2n
q3n
qkn
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 Inti, one
for each stack i on the word wi, such that Int1 composes Int2 composes … composes Intn
Intn wraps Int1
q11 is the initial state & q’kn is a final state
Construction of a deterministic MVPA AD
Ai can be determinized (AiD) (Alur, Madhusudan, STOC’04)
Every AiD state encodes the set of all possible interfaces on any
k-round word wi (wi is the subword of w composed only by symbols of stack i)
The deterministic automaton AD simulates in parallel all the AiD
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)
Idea of the simulation
w11
w21
w31
wk1
w12
w22
w32
wk2
w1n
w2n
w3n
wkn
round 1
round 2
round 3
round k
stack 1 stack 2 stack n
q11
q21
q31
qk1
q’12
q’22
q’32
q’k2
q’11
q’21
q’31
q’k1
q12
q22
q32
qk2
q1n
q2n
q3n
qkn
q’1n
q’2n
q’3n
q’kn
… … …
… …
…
Reading a symbol of wij, except the first one, simulate AjD
Reading the first symbol of wij, simulate in parallel (# is not in ∑) Aj-1
D on the symbol #, and Aj
D on the first symbol of wij
AD is deterministic
… going back to the construction of AD
Ai can be determinized (AiD) (Alur, Madhusudan, STOC’04)
Every AiD state encodes the set of all possible interfaces on the k-round
word wi
The deterministic automaton AD simulates in parallel all the AiD switching
from one AiD to another reading the input word
After reading w every AiD has computed the set of all possible interfaces
on wi
Final states: AD accepts a word w iff there is a set of interfaces, one for each stack, that satisfy the accepting condition
Conclusion
Conclusion 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
top related