Static Analysis

For concurrent and parallel languages, the may-happen-inparallel (MHP) decision problem asks, given two actions in the program, if there is an execution in which they can execute in parallel. Closely related, the MHP computation problem asks, given a program, which pairs of statements may happen in parallel. MHP analysis is the basis for many program analysis problems, such as data race detection and determinism checking, and researchers have devised MHP analyses for a variety of programming models. We present algorithms for static MHP analysis of a storeless abstraction of X10-like languages that have async-finish parallelism and procedures. For a program of size n, our first algorithm solves the MHP decision problem in O(n) time, via a reduction to constrained dynamic pushdown networks (CDPNs). Our second algorithm solves the MHP computation problem in O(n · max(n, k)) time, where k is a statically determined upper bound on the number of pairs that may happen in parallel. The second algorithm first runs a type-based analysis that produces a set of candidate pairs, and then it runs the decision procedure on each of those pairs. For programs without recursion, the type-based analysis is exact and gives an output-sensitive algorithm for the MHP computation problem, while for recursive programs, the type-based analysis may produce spurious pairs that the decision procedure will then remove. Our experiments on a large suite of X10 benchmarks suggest that our approach scales well. Our experiments also show that while k is O(n) in the worst case, k is often O(n) in practice.

[1]  Roberto Giacobazzi,et al.  Semantic-Based Code Obfuscation by Abstract Interpretation , 2005, ICALP.

[2]  Roberto Giacobazzi,et al.  Hiding Information in Completeness Holes: New Perspectives in Code Obfuscation and Watermarking , 2008, 2008 Sixth IEEE International Conference on Software Engineering and Formal Methods.

[3]  Morgan Ward,et al.  The Closure Operators of a Lattice , 1942 .

[4]  Gilberto Filé,et al.  A unifying view of abstract domain design , 1996, CSUR.

[5]  Christian S. Collberg,et al.  Watermarking, Tamper-Proofing, and Obfuscation-Tools for Software Protection , 2002, IEEE Trans. Software Eng..

[6]  Roberto Giacobazzi,et al.  Uniform Closures: Order-Theoretically Reconstructing Logic Program Semantics and Abstract Domain Refinements , 1998, Inf. Comput..

[7]  Daniel Kroening,et al.  Loop Summarization and Termination Analysis , 2011, TACAS.

[8]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[9]  Clark Thomborson,et al.  Manufacturing cheap, resilient, and stealthy opaque constructs , 1998, POPL '98.

[10]  Kedar S. Namjoshi,et al.  Symmetry and Completeness in the Analysis of Parameterized Systems , 2007, VMCAI.

[11]  Keith Brian Gallagher,et al.  Using Program Slicing in Software Maintenance , 1991, IEEE Trans. Software Eng..

[12]  Patrick Cousot,et al.  Comparing the Galois Connection and Widening/Narrowing Approaches to Abstract Interpretation , 1992, PLILP.

[13]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[14]  Stephen Drape,et al.  Specifying Imperative Data Obfuscations , 2007, ISC.

[15]  Stephen Drape,et al.  Slicing obfuscations: design, correctness, and evaluation , 2007, DRM '07.

[16]  Roberto Giacobazzi,et al.  Obfuscation by partial evaluation of distorted interpreters , 2012, PEPM '12.

[17]  Damiano Zanardini,et al.  Data dependencies and program slicing: from syntax to abstract semantics , 2008, PEPM '08.

[18]  Amir Pnueli,et al.  Automatic Deductive Verification with Invisible Invariants , 2001, TACAS.

[19]  Patrick Cousot,et al.  Static determination of dynamic properties of programs , 1976 .

[20]  Thomas W. Reps,et al.  Program Specialization via Program Slicing , 1996, Dagstuhl Seminar on Partial Evaluation.

[21]  Reinhard Wilhelm,et al.  Solving shape-analysis problems in languages with destructive updating , 1998, TOPL.

[22]  Antoine Miné,et al.  Static Analysis of Run-Time Errors in Embedded Critical Parallel C Programs , 2011, ESOP.

[23]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1988, SIGP.

[24]  Christian S. Collberg,et al.  Surreptitious Software - Obfuscation, Watermarking, and Tamperproofing for Software Protection , 2009, Addison-Wesley Software Security Series.

[25]  Roberto Giacobazzi,et al.  Transforming Abstract Interpretations by Abstract Interpretation , 2008, SAS.

[26]  Roberto Giacobazzi,et al.  Making abstract interpretations complete , 2000, JACM.

[27]  Roberto Giacobazzi,et al.  Refining and Compressing Abstract Domains , 1997, ICALP.

[28]  Roberto Giacobazzi,et al.  Incompleteness, Counterexamples, and Refinements in Abstract Model-Checking , 2001, SAS.

[29]  Gilberto Filé,et al.  Complementation of Abstract Domains made Easy , 1996, JICSLP.

[30]  César Sánchez,et al.  Invariant Generation for Parametrized Systems Using Self-reflection - (Extended Version) , 2012, SAS.