Multiple specialization of logic programs with run-time tests
Dean Jacobs, Anno Langen, Will Winsborough · OSTI OAI (U.S. Department of Energy Office of Scientific and Technical Information) · 1990
This paper presents a framework for multiple specialization of logic programs that incorporates run-time testing. This framework supports specialization on the basis of a compiler-generated wish list'' of requirements that enable useful optimizations. In addition, entry mode declarations are used to restrict the class of reachable activations. Our goal is to generate code containing tests at outer levels of the call tree that guard high-performance specialized procedures that are likely to be called. The starting point for this work is the multiple specialization technique of Winsborough, which introduced the notion of a call-path automation. The transition function for a call-path automation specifies which version of a procedure should be invoked by each call in each version of each procedure. As a first step, we extend such automata to include test arcs'' that select different versions. We then show how to construct an automation containing a given set of tests at given test sites. Finally, we discuss techniques for abductively deriving a test at a given site that, upon success, ensures some property at a requirement site. 13 refs.