A Parallel Worklist Algorithm for Modular Analyses

One way to speed up static program analysis is to make use of today’s multi-core CPUs by parallelising the analysis. Existing work on parallel analysis usually targets traditional data-flow analyses for static, first-order languages such as C. Less attention has been given so far to the parallelisation of more general analyses that can also target dynamic, higher-order languages such as JavaScript. These are significantly more challenging to parallelise, as dependencies between analysis results are only discovered during the analysis itself. State-of the-art parallel analyses for such languages are therefore usually limited, both in their applicability and performance gains. In this work, we propose the parallelisation of modular analyses. Modular analyses compute different parts of the analysis in isolation of one another, and therefore offer inherent opportunities for parallelisation that have not been explored so far. In addition, they can be used to develop a general class of analysers for dynamic, higher-order languages. We present a parallel variant of the worklist algorithm that is used to drive such modular analyses. To further speed up its convergence, we show how this algorithm can exploit the monotonicity of the analysis. Existing modular analyses can be parallelised without additional effort by instead employing this parallel worklist algorithm. We demonstrate this for ModF, an inter-procedural modular analysis, and for ModConc, an inter-process modular analysis. For ModConc, we reveal an additional opportunity to exploit even more parallelism in the analysis. Our parallel worklist algorithm is implemented and integrated into MAF, a framework for modular program analysis. Using a set of Scheme benchmarks for ModF, we usually observe speedups between $3\times$ and $8\times$ when using 4 workers, and speedups between $8\times$ and $32\times$ when using 16 workers. For ModConc, we achieve a maximum speedup of $15\times$.

[1]  Keshav Pingali,et al.  A GPU implementation of inclusion-based points-to analysis , 2012, PPoPP '12.

[2]  Barbara G. Ryder,et al.  A comprehensive approach to parallel data flow analysis , 1992, ICS '92.

[3]  Coen De Roover,et al.  Mailbox Abstractions for Static Analysis of Actor Programs , 2017, ECOOP.

[4]  Ben Hardekopf,et al.  A parallel abstract interpreter for JavaScript , 2015, 2015 IEEE/ACM International Symposium on Code Generation and Optimization (CGO).

[5]  Richard P. Gabriel,et al.  Performance and evaluation of Lisp systems , 1985 .

[6]  François Bourdoncle,et al.  Efficient chaotic iteration strategies with widenings , 1993, Formal Methods in Programming and Their Applications.

[7]  Ciera Jaspan,et al.  Lessons from building static analysis tools at Google , 2018, Commun. ACM.

[8]  Patrick Cousot,et al.  Modular Static Program Analysis , 2002, CC.

[9]  Murali Krishna Ramanathan,et al.  Scalable and incremental software bug detection , 2013, ESEC/FSE 2013.

[10]  Suresh Jagannathan,et al.  A concurrent abstract interpreter , 1994, LISP Symb. Comput..

[11]  Aws Albarghouthi,et al.  Parallelizing top-down interprocedural analyses , 2012, PLDI '12.

[12]  Guillaume Brat,et al.  Precise and efficient static array bound checking for large embedded C programs , 2004, PLDI '04.

[13]  Patrick Cousot,et al.  Why does Astrée scale up? , 2009, Formal Methods Syst. Des..

[14]  Christian Bird,et al.  What developers want and need from program analysis: An empirical study , 2016, 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE).

[15]  Rajiv Gupta,et al.  The combining DAG: a technique for parallel data flow analysis , 1992, Proceedings Sixth International Parallel Processing Symposium.

[16]  Ondrej Lhoták,et al.  Actor-Based Parallel Dataflow Analysis , 2011, CC.

[17]  Matthew Might,et al.  Optimizing abstract abstract machines , 2012, ICFP.

[18]  Thomas W. Reps,et al.  Precise interprocedural dataflow analysis via graph reachability , 1995, POPL '95.

[19]  Olin Shivers,et al.  Control-flow analysis of higher-order languages of taming lambda , 1991 .

[20]  Gerald J. Sussman,et al.  Structure and Interpretation of Computer Programs, Second Edition , 1996 .

[21]  Aditya V. Thakur,et al.  Deterministic parallel fixpoint computation , 2020, Proc. ACM Program. Lang..

[22]  Michael F. P. O'Boyle,et al.  High Performance Embedded Architectures and Compilers , 2008 .

[23]  Claes Wohlin,et al.  Experimentation in software engineering: an introduction , 2000 .

[24]  Coen De Roover,et al.  Effect-Driven Flow Analysis , 2019, VMCAI.

[25]  Keshav Pingali,et al.  Parallel inclusion-based points-to analysis , 2010, OOPSLA.

[26]  Michael Eichberg,et al.  A programming model for semi-implicit parallelization of static analyses , 2020, ISSTA.

[27]  Welf Löwe,et al.  Parallel points-to analysis for multi-core machines , 2011, HiPEAC.

[28]  Coen De Roover,et al.  MAF: A Framework for Modular Static Analysis of Higher-Order Languages , 2020, 2020 IEEE 20th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[29]  Patrick Cousot,et al.  The ASTREÉ Analyzer , 2005, ESOP.

[30]  Coen De Roover,et al.  A general method for rendering static analyses for diverse concurrency models modular , 2019, J. Syst. Softw..

[31]  David Monniaux,et al.  The Parallel Implementation of the Astrée Static Analyzer , 2005, APLAS.

[32]  Robert W. Bowdidge,et al.  Why don't software developers use static analysis tools to find bugs? , 2013, 2013 35th International Conference on Software Engineering (ICSE).

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

[34]  Matthew Might,et al.  EigenCFA: accelerating flow analysis with GPUs , 2011, POPL '11.

[35]  Alexander Aiken,et al.  Saturn: A scalable framework for error detection using Boolean satisfiability , 2007, TOPL.

[36]  Matthew Might,et al.  Abstract allocation as a unified approach to polyvariance in control-flow analyses , 2018, J. Funct. Program..

[37]  Ondrej Lhoták,et al.  Pick your contexts well: understanding object-sensitivity , 2011, POPL '11.