Affiliation:
1. Northeastern University, Boston, MA
2. University of Wisconsin–Madison and GrammaTech Inc.
Abstract
A classical result by Ramalingam about synchronization-sensitive interprocedural program analysis implies that reachability for concurrent threads running recursive procedures is undecidable. A technique proposed by Qadeer and Rehof, to bound the number of context switches allowed between the threads, leads to an incomplete solution that is, however, believed to catch “most bugs” in practice, as errors tend to occur within few contexts. The question of whether the technique can also prove the absence of bugs at least in some cases has remained largely open.
Toward closing this gap, we introduce in this article the generic verification paradigm of
observation sequences
for resource-parameterized programs. Such a sequence observes how increasing the resource parameter affects the reachability of states satisfying a given property. The goal is to show that increases beyond some “cutoff” parameter value have no impact on the reachability—the sequence has
converged
. This allows us to conclude that the property holds for all parameter values.
We applied this paradigm to the context-
unbounded
program analysis problem, choosing the resource to be the number of permitted thread context switches. The result is a partially correct interprocedural reachability analysis technique for concurrent shared-memory programs. Our technique may not terminate but is able to both refute and prove context-unbounded safety for such programs. We demonstrate the effectiveness and efficiency of the technique using a variety of benchmark programs. The safe instances cannot be proved safe by earlier, context-bounded methods.
Funder
DARPA MUSE
Naval Research
U.S. National Science Foundation
DARPA STAC
Publisher
Association for Computing Machinery (ACM)