The University of Arizona
banner image

  A Simple Code Improvement Scheme for Prolog

Saumya Debray
Department of Computer Science
University of Arizona
Tucson, AZ 85721, U.S.A.
 

Abstract
The generation of efficient code for Prolog programs requires sophisticated code transformation and optimization systems. Much of the recent work in this area has focussed on high level transformations, typically at the source level. Unfortunately, such high level transformations suffer from the deficiency of being unable to address low level implementational details. This paper presents a simple code improvement scheme that can be used for a variety of low level optimizations. Applications of this scheme are illustrated using low level optimizations that reduce tag manipulation, dereferencing, trail testing, environment allocation, and redundant bounds checks. The transformation scheme serves as a unified framework for reasoning about a variety of low level optimizations that have, to date, been dealt with in a more or less ad hoc manner.