Technical note
Polyvariant detection of uninitialized arguments of prolog predicates

https://doi.org/10.1016/0743-1066(96)00050-7Get rights and content
Under an Elsevier user license
open archive

Abstract

Uninitialized variables are important to high-performance Prolog implementations since they can be bound much more efficiently than standard variables and may reduce the size of environments. In this paper, we propose a straightforward program transformation that detects uninitialized arguments to calls and rewrites the program to make such arguments obvious to the compiler. Our algorithm detects more uninitialized arguments than previously proposed methods, is robust when declarations are lacking and calling modes vary, and never performs worse than the monovariant method previously described in the literature. On a substantial set of benchmarks, our algorithm always performs as well as previous methods, and sometimes considerably better. The transformation adds specialized predicates to the program, on the order of 20% of the original number of predicates.

Cited by (0)

This work was supported by grants from the Swedish National Board for Industrial and Technical Development.