E. Albert, M. Alpuente, M. Falaschi, P. Julián, G. Vidal

"Improving Control in Functional Logic Program Specialization"

Abstract

We have recently defined a framework for Narrowing-driven Partial Evaluation (NPE) of functional logic programs. This method is as powerful as partial deduction of logic programs and positive supercompilation of functional programs. Although it is possible to treat complex terms containing primitive functions (e.g. conjunctions or equations) in the NPE framework, its basic control mechanisms do not allow for effective polygenetic specialization of these complex expressions. We introduce a sophisticated unfolding rule endowed with a dynamic narrowing strategy which permits flexible scheduling of the elements (in conjunctions) which are reduced during specialization. We also present a novel abstraction operator which carefully considers primitive functions and is the key to achieving accurate polygenetic specialization. The abstraction operator adapts and extends some recent partitioning techniques defined in the framework of conjunctive partial deduction. We provide experimental results obtained from an implementation using the INDY system which demonstrate that the control refinements are efficient and provide better specialization.