Incremental analysis of constraint logic programs

Global analyzers traditionally read and analyze the entire program at once, in a nonincremental way. However, there are many situations which are not well suited to this simple model and which instead require reanalysis of certain parts of a program which has already been analyzed. In these cases, it appears inefficient to perform the analysis of the program again from scratch, as needs to be done with current systems. We describe how the fixed-point algorithms used in current generic analysis engines for (constraint) logic programming languages can be extended to support incremental analysis. The possible changes to a program are classified into three types: addition, deletion, and arbitrary change. For each one of these, we provide one or more algorithms for identifying the parts of the analysis that must be recomputed and for performing the actual recomputation. The potential benefits and drawbacks of these algorithms are discussed. Finally, we present some experimental results obtained with an implementation of the algorithms in the PLAI generic abstract interpretation framework. The results show significant benefits when using the proposed incremental analysis algorithms.

[1]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

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

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

[4]  Barry K. Rosen Linear cost is sometimes quadratic , 1981, POPL '81.

[5]  Dennis F. Kibler,et al.  Parallel interpretation of logic programs , 1981, FPCA '81.

[6]  Ken Kennedy,et al.  Efficient computation of flow insensitive interprocedural summary information , 1984, SIGPLAN '84.

[7]  Barbara G. Ryder,et al.  Incremental data flow analysis via dominator and attribute update , 1988, POPL '88.

[8]  Barbara G. Ryder,et al.  Conditions for incremental iteration: Examples and counterexamples , 1988, Sci. Comput. Program..

[9]  Barbara G. Ryder,et al.  Incremental data-flow analysis algorithms , 1988, TOPL.

[10]  Mary Lou Soffa,et al.  An Incremental Version of Iterative Data Flow Analysis , 1989, IEEE Trans. Software Eng..

[11]  Saumya K. Debray,et al.  A Simple Code Improvement Scheme for Prolog , 1992, J. Log. Program..

[12]  Saumya K. Debray,et al.  Static inference of modes and data dependencies in logic programs , 1989, TOPL.

[13]  Barbara G. Ryder,et al.  An efficient hybrid algorithm for incremental data flow analysis , 1989, POPL '90.

[14]  M. Hermenegildo,et al.  Deriving a fixpoint computation algorithm for top-down abstract interpretation of logic programs , 1990 .

[15]  Michael G. Burke An interval-based approach to exhaustive and incremental interprocedural data-flow analysis , 1990, TOPL.

[16]  Maurizio Gabbrielli,et al.  A Compositional Semantics for Logic Programs , 1994, Theor. Comput. Sci..

[17]  Rong Yang,et al.  The Andorra-I Preprocessor: Supporting Full Prolog on the Basic Andorra Model , 1991, ICLP.

[18]  Maurice Bruynooghe,et al.  A Practical Framework for the Abstract Interpretation of Logic Programs , 1991, J. Log. Program..

[19]  Manuel V. Hermenegildo,et al.  Combined Determination of Sharing and Freeness of Program Variables through Abstract Interpretation , 1991, ICLP.

[20]  William H. Winsborough,et al.  Multiple Specialization using Minimal-Function Graph Semantics , 1992, J. Log. Program..

[21]  Manuel V. Hermenegildo,et al.  Compile-Time Derivation of Variable Dependency Using Abstract Interpretation , 1992, J. Log. Program..

[22]  Peter Van Roy,et al.  High-performance logic programming with the Aquarius Prolog compiler , 1992, Computer.

[23]  Saumya K. Debray,et al.  Global Flow Analysis as a Practical Compilation Tool , 1992, J. Log. Program..

[24]  Thomas W. Reps,et al.  A categorized bibliography on incremental computation , 1993, POPL '93.

[25]  Pascal Van Hentenryck,et al.  Optimization Techniques for General Purpose Fixpoint Algorithms - Practical Efficiency for the Abstract Interpretation of Prolog , 1993, WSA.

[26]  Roberto Giacobazzi,et al.  Compositional analysis of modular logic programs , 1993, POPL '93.

[27]  Pascal Van Hentenryck,et al.  Generic abstract interpretation algorithms for Prolog: Two optimization techniques and their experimental evaluation , 1993, Softw. Pract. Exp..

[28]  Manuel V. Hermenegildo,et al.  Effectiveness of Global Analysis in Strict Independence-Based Automatic Parallelization , 1994, ILPS.

[29]  Pascal Van Hentenryck,et al.  Experimental Evaluation of a Generic Abstract Interpretation Algorithm for PROLOG , 1992, ACM Trans. Program. Lang. Syst..

[30]  Kim Marriott,et al.  Denotational abstract interpretation of logic programs , 1994, TOPL.

[31]  Kim Marriott,et al.  Boolean Functions for Dependency Analysis: Algebraic Properties and Efficient Representation , 1994, SAS.

[32]  Pascal Van Hentenryck,et al.  An Abstract Interpretation Framework which Accurately Handles Prolog Search-Rule and the Cut , 1994, ILPS.

[33]  Peter J. Stuckey,et al.  Incremental Analysis of Logic Programs , 1995, ICLP.

[34]  Francesca Rossi,et al.  Strict and Nonstrict Independent And-Parallelism in Logic Programs: Correctness, Efficiency, and Compile-Time Conditions , 1995, J. Log. Program..

[35]  Andreas Krall,et al.  The VAMAI-an abstract machine for incremental global data ow analysis of Prolog , 1995 .

[36]  Andreas Krall,et al.  Incremental Global Compilation of Prolog with the Vienna Abstract Machine , 1995, ICLP.

[37]  Manuel V. Hermenegildo,et al.  Implementation of multiple specialization in logic programs , 1995, PEPM '95.

[38]  Manuel V. Hermenegildo,et al.  Global Analysis of Standard Prolog Programs , 1996, ESOP.

[39]  Manuel V. Hermenegildo,et al.  Optimized Algorithms for Incremental Analysis of Logic Programs , 1996, SAS.

[40]  Roland H. C. Yap,et al.  Optimizing compilation of CLP( R ) , 1998, TOPL.

[41]  Peter J. Stuckey,et al.  A Practical Object-Oriented Analysis Engine for CLP , 1998, Softw. Pract. Exp..

[42]  Peter J. Stuckey,et al.  Differential Methods in Logic Program Analysis , 1998, J. Log. Program..

[43]  Peter J. Stuckey,et al.  A practical object‐oriented analysis engine for CLP , 1998 .

[44]  Peter J. Stuckey,et al.  Programming with Constraints: An Introduction , 1998 .

[45]  Manuel V. Hermenegildo,et al.  Using Global Analysis, Partial Specifications, and an Extensible Assertion Language for Program Validation and Debugging , 1999, The Logic Programming Paradigm.

[46]  Manuel V. Hermenegildo,et al.  Program Analysis, Debugging, and Optimization Using the Ciao System Preprocessor , 1999, ICLP.

[47]  Manuel V. Hermenegildo,et al.  Some Issues in Analysis and Specialization of Modular Ciao-Prolog Programs , 1999, WOID@ICLP.

[48]  Manuel V. Hermenegildo,et al.  Automatic Compile-Time Parallelization of Logic Programs for Restricted, Goal Level, Independent and Parallelism , 1999, J. Log. Program..

[49]  Manuel V. Hermenegildo,et al.  Effectivness of abstract interpretation in automatic parallelization: a case study in logic programming , 1999, TOPL.

[50]  Manuel V. Hermenegildo,et al.  Abstract Multiple Specialization and Its Application to Program Parallelization , 1999, J. Log. Program..

[51]  Manuel V. Hermenegildo,et al.  A Generic Processor for Program Validation and Debugging , 2000, Analysis and Visualization Tools for Constraint Programming.

[52]  Manuel V. Hermenegildo,et al.  The ciao prolog system , 2002 .