Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor)

The technique of Abstract Interpretation has allowed the development of very sophisticated global program analyses which are at the same time provably correct and practical. We present in a tutorial fashion a novel program development framework which uses abstract interpretation as a fundamental tool. The framework uses modular, incremental abstract interpretation to obtain information about the program. This information is used to validate programs, to detect bugs with respect to partial specifications written using assertions (in the program itself and/or in system libraries), to generate and simplify run-time tests, and to perform high-level program transformations such as multiple abstract specialization, parallelization, and resource usage control, all in a provably correct way. In the case of validation and debugging, the assertions can refer to a variety of program points such as procedure entry, procedure exit, points within procedures, or global computations. The system can reason with much richer information than, for example, traditional types. This includes data structure shape (including pointer sharing), bounds on data structure sizes, and other operational variable instantiation properties, as well as procedure-level properties such as determinacy, termination, nonfailure, and bounds on resource consumption (time or space cost). CiaoPP, the preprocessor of the Ciao multi-paradigm programming system, which implements the described functionality, will be used to illustrate the fundamental ideas.

[1]  Manuel V. Hermenegildo,et al.  Combined Static and Dynamic Assertion-Based Debugging of Constraint Logic Programs , 1999, LOPSTR.

[2]  Saumya K. Debray,et al.  Non-Failure Analysis for Logic Programs , 1997, ICLP.

[3]  Giorgio Levi,et al.  Declarative Diagnosis Revisited , 1995, ILPS.

[4]  Fosca Giannotti,et al.  A Technique for Recursive Invariance Detection and Selective Program Specification , 1991, PLILP.

[5]  Manuel V. Hermenegildo,et al.  Efficient Term Size Computation for Granularity Control , 1995, ICLP.

[6]  Peter J. Stuckey,et al.  Incremental analysis of constraint logic programs , 2000, TOPL.

[7]  Giorgio Levi,et al.  Abstract Diagnosis , 1999, J. Log. Program..

[8]  Justin Zobel,et al.  A Regular Type Language for Logic Programs , 1992, Types in Logic Programming.

[9]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[10]  Michael Leuschel,et al.  Program Specialisation and Abstract Interpretation Reconciled , 1998, IJCSLP.

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

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

[13]  Manuel V. Hermenegildo,et al.  The CIAO Multi-Dialect Compiler and System: An Experimentation Workbench for Future (C)LP Systems , 1995, APPIA-GULP-PRODE.

[14]  Francisco Bueno,et al.  More Precise Yet Efficient Type Inference for Logic Programs , 2002, SAS.

[15]  François Bourdoncle,et al.  Abstract debugging of higher-order imperative languages , 1993, PLDI '93.

[16]  Jan Maluszynski,et al.  Analysis and Visualization Tools for Constraint Programming , 2000, Lecture Notes in Computer Science.

[17]  Saumya K. Debray,et al.  Estimating the Computational Cost of Logic Programs , 1994, SAS.

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

[19]  Peter J. Stuckey,et al.  Optimization of Logic Programs with Dynamic Scheduling , 1997, ICLP.

[20]  Manuel V. Hermenegildo,et al.  A Documentation Generator for (C)LP Systems , 2000, Computational Logic.

[21]  Ehud Shapiro,et al.  Abstract Algorithmic Debugging , 1988, ICLP/SLP.

[22]  Gerda Janssens,et al.  Global analysis of constraint logic programs , 1996, TOPL.

[23]  Manuel V. Hermenegildo,et al.  Some Techniques for Automated, Resource-Aware Distributed and Mobile Computing in a Multi-paradigm Programming System , 2004, Euro-Par.

[24]  John P. Gallagher,et al.  Abstract Interpretation over Non-deterministic Finite Tree Automata for Set-Based Analysis of Logic Programs , 2002, PADL.

[25]  Wlodzimierz Drabent,et al.  On the Role of Semantic Approximations on Validation and Diagnosis of Contraint Logic Programs , 1997, AADEBUG.

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

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

[28]  Victor W. Marek,et al.  The Logic Programming Paradigm: A 25-Year Perspective , 2011 .

[29]  Jan Maluszy¿ski,et al.  Lower Bound Cost Estimation for Logic Programs , 1997 .

[30]  Patrick Cousot,et al.  Systematic design of program transformation frameworks by abstract interpretation , 2002, POPL '02.

[31]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[32]  Ehud Shapiro,et al.  Third International Conference on Logic Programming , 1986 .

[33]  Pascal Van Hentenryck,et al.  Experimental evaluation of a generic abstract interpretation algorithm for Prolog , 1992, ICCL.

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

[35]  Manuel V. Hermenegildo,et al.  Determinacy Analysis for Logic Programs Using Mode and Type Information , 2004, LOPSTR.

[36]  Manuel V. Hermenegildo,et al.  An Assertion Language for Constraint Logic Programs , 2000, Analysis and Visualization Tools for Constraint Programming.

[37]  Martin R. Woodward,et al.  On Program Analysis , 1976, Inf. Process. Lett..

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

[39]  Kim Marriott,et al.  Independence in CLP languages , 2000, TOPL.

[40]  Ehud Shapiro,et al.  A Type System for Logic Programs , 1988, J. Log. Program..

[41]  Danny De Schreye Program Analysis, Debugging, and Optimization Using the Ciao System Preprocessor , 1999 .

[42]  Manuel V. Hermenegildo,et al.  Parallelism and implementation of logic and constraint logic programming , 1999 .

[43]  Manuel V. Hermenegildo,et al.  An Abstract Interpretation-based Approach to Mobile Code Safety , 2005, COCV@ETAPS.

[44]  John P. Gallagher,et al.  Fast and Precise Regular Approximations of Logic Programs , 1994, ICLP.

[45]  John P. Gallagher,et al.  An Integration of Partial Evaluation in a Generic Abstract Interpretation Framework , 1999, PEPM.

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

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

[48]  Kim Marriott,et al.  Analyzing logic programs with dynamic scheduling , 1994, POPL '94.

[49]  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.

[50]  Patrick Cousot Automatic verification by abstract interpretation (invited tutorial) , 2003 .

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

[52]  Saumya K. Debray,et al.  A Methodology for Granularity-Based Control of Parallelism in Logic Programs , 1996, J. Symb. Comput..

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

[54]  Manuel V. Hermenegildo,et al.  Multivariant Non-failure Analysis via Standard Abstract Interpretation , 2004, FLOPS.

[55]  Frank Pfenning,et al.  Types in Logic Programming , 1992, ICLP.

[56]  Peter J. Stuckey,et al.  A model for inter-module analysis and optimizing compilation , 2000, LOPSTR.

[57]  Manuel V. Hermenegildo,et al.  Abstract Specialization and Its Application to Program Parallelization , 1996, LOPSTR.

[58]  Manuel V. Hermenegildo,et al.  Extracting Non-Strict Independent And-Parallelism Using Sharing and Freeness Information , 1994, SAS.

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

[60]  Patrick Cousot,et al.  Automatic Verification by Abstract Interpretation , 2002, VMCAI.

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