Generic abstract interpretation algorithms for Prolog: Two optimization techniques and their experimental evaluation

Vincent Englebert, Baudouin Le Charlier, Didier Roland, Pascal Van Hentenryck
1993 Software, Practice & Experience  
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
more » ... ts 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 in 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. key words: Abstract interpretation PROLOG Fixpoint algorithm Experimentation Languages Performance * Of course, other (less demanding) abstract semantics can be imagined.
doi:10.1002/spe.4380230406 fatcat:77tfxbmuoveoreexmrtkyhiqje