Generic abstract interpretation algorithms for Prolog: Two optimization techniques and their experimental evaluation
- 1 April 1993
- journal article
- Published by Wiley in Software: Practice and Experience
- Vol. 23 (4) , 419-459
- https://doi.org/10.1002/spe.4380230406
Abstract
The efficient implementation of generic abstract interpretation algorithms for Prolog is reconsidered after References 1 and 2. Two new optimization techniques are proposed and applied to the original algorithm of Reference 1: dependency on clause prefixes and caching of operations. The first improvement avoids re‐evaluating a clause prefix when no abstract value which it depends on has been updated. The second improvement consists of caching all operations on substitutions and reusing the results whenever possible. The algorithm and the two optimization techniques have been implemented in C (about 8000 lines of code each), tested on a large number of Prolog programs, and compared with the original implementation on an abstract domain containing modes, types and sharing. In conjunction with refinements of the domain algorithms, they produce an average reduction of more than 58 per cent is computation time. Extensive experimental results on the programs are given, including computation times, memory consumption, hit ratios for the caches, the number of operations performed, and the time distribution. As a main result, the improved algorithms exhibit the same efficiency as the specific tools of References 3 and 4, despite the fact that our abstract domain is more sophisticated and accurate. The abstract operations also take 90 per cent of the computation time, indicating that the overhead of the control is very limited. Results on a simpler domain are also given and show that even extremely basic domains can benefit from the optimizations. The general‐purpose character of the optimizations is also discussed.Keywords
This publication has 8 references indexed in Scilit:
- Global flow analysis as a practical compilation toolThe Journal of Logic Programming, 1992
- Multiple specialization using minimal-function graph semanticsThe Journal of Logic Programming, 1992
- A practical framework for theabstract interpretation of logic programsThe Journal of Logic Programming, 1991
- Prop revisited: propositional formula as abstract domain for groundness analysisPublished by Institute of Electrical and Electronics Engineers (IEEE) ,1991
- Solving large combinatorial problems in logic programmingThe Journal of Logic Programming, 1990
- Denotational and operational semantics for prologThe Journal of Logic Programming, 1988
- An application of abstract interpretation of logic programs: Occur check reductionPublished by Springer Nature ,1986
- Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpointsPublished by Association for Computing Machinery (ACM) ,1977