A Practical Approach to the Global Analysis of CLP Programs

This paper presents and illustrates with an example a practical approach to the dataflow analysis of programs written in constraint logic programming (CLP) languages using abstract interpretation. It is first argued that, from the framework point of view, it sufnces to propose relatively simple extensions of traditional analysis methods which have already been proved useful and practical and for which efncient fixpoint algorithms have been developed. This is shown by proposing a simple but quite general extension of Bruynooghe's traditional framework to the analysis of CLP programs. In this extension constraints are viewed not as "suspended goals" but rather as new information in the store, following the traditional view of CLP. Using this approach, and as an example of its use, a complete, constraint system independent, abstract analysis is presented for approximating definiteness information. The analysis is in fact of quite general applicability. It has been implemented and used in the analysis of CLP(R) and Prolog-III applications. Results from the implementation of this analysis are also presented.

[1]  Gilberto Filé,et al.  Computations, abstractions and constraints in logic programs , 1992, Proceedings of the 1992 International Conference on Computer Languages.

[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]  Gerda Janssens,et al.  On the Implementation of Abstract Interpretation Systems for (Constraint) Logic Programs , 1994, CC.

[4]  Kim Marriott,et al.  Analysis of Constraint Logic Programs , 1990, NACLP.

[5]  Joxan Jaffar,et al.  Constraint logic programming , 1987, POPL '87.

[6]  Gerda Janssens,et al.  Freeness Analysis in the Presence of Numerical Constraints , 1993, ICLP.

[7]  Peter Van Roy,et al.  The Benefits of Global Dataflow Analysis for an Optimizing Prolog Compiler , 1990, NACLP.

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

[9]  Gerda Janssens,et al.  Deriving Descriptions of Possible Values of Program Variables by Means of Abstract Interpretation , 1990, J. Log. Program..

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

[11]  Michael Hanus,et al.  Analysis of Nonlinear Constraints in CLP(R) , 1993, ICLP.

[12]  Saumya K. Debray,et al.  On the Practicality of Global Flow Analysis of Logic Programs , 1988, ICLP/SLP.

[13]  Pascal Van Hentenryck,et al.  Experimental evaluation of a generic abstract interpretation algorithm for PROLOG , 1994, TOPL.

[14]  Kim Marriott,et al.  Semantics-Based Dataflow Analysis of Logic Programs , 1989, IFIP Congress.

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