Efficient Bottom-up Abstract Interpretation of Prolog by Means of Constraint Solving over Symbolic Finite Domains

The subject of this paper is Abstract Interpretation of logic programs, based on Constraint Solving over Finite Domains. More specifically, we use Toupie, a Constraint language based on the μ-calculus. Fixpoint computation is the basic execution mechanism of this language. Therefore it is very convenient and efficient for Abstract Interpretation of logic programs. The following topics are covered in this paper. 1) The semantics and implementation of Toupie are described. 2) A class of abstract domains for logic programs is defined. This class can be viewed as an extension of the domain Prop ([9]) to a limited class of first order formulas with equality. It happens that the elements of this domain coincide with the objects manipulated by Toupie, i.e. 0+ formulas. 3) Transformation rules which allow the transformation of flat logic programs into Toupie programs are given. Execution of the Toupie programs on this abstract domains provides a correct bottom-up abstract interpretation of the corresponding logic programs, i.e. a complete description of the success patterns for the program. 4) An experimental evaluation of the resulting analysis tool was performed and is thoroughly described. The system was used to analyse the benchmark programs used for the same purpose in [13, 14]. Four different instances of the generic domain were evaluated: two variants of Prop and two domains for simple (but useful) type analyses. The results show that the system is very efficient and accurate on the benchmark programs. This seems to demonstrate that the proposed approach to abstract interpretation provides a versatile alternative to previous proposals for a significant class of analyses.

[1]  Randal E. Bryant,et al.  Efficient implementation of a BDD package , 1991, DAC '90.

[2]  Giorgio Levi,et al.  Declarative Modeling of the Operational Behavior of Logic Languages , 1989, Theor. Comput. Sci..

[3]  Kim Marriott,et al.  Notes for a Tutorial on Abstract Interpretation of Logic Programs , 1989 .

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

[5]  Randal E. Bryant,et al.  Graph-Based Algorithms for Boolean Function Manipulation , 1986, IEEE Transactions on Computers.

[6]  Kim Marriott,et al.  Bottom-up Abstract Interpretation of Logic Programs , 1988, ICLP/SLP.

[7]  Kim Marriott,et al.  Suspension analyses for concurrent logic programs , 1994, TOPL.

[8]  Edmund M. Clarke,et al.  Symbolic Model Checking: 10^20 States and Beyond , 1990, Inf. Comput..

[9]  David Maier,et al.  Magic sets and other strange ways to implement logic programs (extended abstract) , 1985, PODS '86.

[10]  Pascal Van Hentenryck,et al.  A Universal Top-Down Fixpoint Algorithm , 1992 .

[11]  Ulf Nilsson Abstract Interpretation: A Kind of Magic , 1991, PLILP.

[12]  Pascal Van Hentenryck,et al.  A Generic Abstract Interpretation Algorithm and its Complexity Analysis , 1991, ICLP.

[13]  A. Cortesi,et al.  Prop revisited: propositional formula as abstract domain for groundness analysis , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[14]  Chris Mellish,et al.  Abstract Interpretation of Prolog Programs , 1986, ICLP.

[15]  Pascal Van Hentenryck,et al.  Groundness analysis for Prolog: implementation and evaluation of domain prop , 1993, PEPM '93.