Parikh-Equivalent Bounded Underapproximations
Pierre Ganty, Rupak Majumdar, Benjamin Monmege · arXiv (Cornell University) · 2008
Many problems in the verification of concurrent software systems reduce to checking the non-emptiness of the intersection of context-free languages, an undecidable problem. We propose a decidable underapproximation, and a semi-algorithm based on the under-approximation, for this problem through bounded languages. Bounded languages are context-free subsets of regular languages of the form w ∗ 1w ∗ 2... w ∗ k for some w1,..., wk ∈ Σ ∗. Bounded languages have nice structural properties, in particular the nonemptiness of the intersection of a bounded language and a context free language is decidable. Thus, in the under-approximation, we replace each of the context free languages in the intersection by bounded subsets, and check if the intersection of these languages is non-empty. In order to provide useful results in practice, the under-approximation must preserve “many ” words from the original language (the empty language is a bounded subset, but clearly useless). Our main theoretical result is a constructive proof of the following result: for any context free language L, there is a bounded language L ′ ⊆ L which has the same Parikh (commutative) image as L. Along the way, we show an iterative construction that associates with each context free language a family of linear languages and linear substitutions that preserve the Parikh image of the context free language. We show two applications of this result: to underapproximate the reachable state space of multi-threaded procedural programs, and to under-approximate the reachable state space of counter automata with context-free constraints.