1 Partial Evaluation of Lazy Functional Logic Programs * Pascual Juli´ an Iranzo Dep. Inform´ atica, UCLM, Paseo de la Universidad, 4 E-13071 Ciudad Real, Spain. E-mail: Pascual.Julian@uclm.es This paper abstracts the contents of a Ph.D. disser- tation entitled ”Partial Evaluation of Lazy Functional Logic Programs” which has been defended at the Tech- nical University of Valencia, promoted by Prof. Mar´ ıa Alpuente. Partial evaluation is an automatic program transformation technique that aims the specialization of programs, with regard to parts of their input, while preserving program semantics. Partial evaluation has been first applied to functional logic languages in [6] where it is shown that the correctness of the transfor- mation is dependent of the narrowing strategy used by the specialization algorithm. This thesis studies how to solve the problems arisen when lazy narrowing (a valuable strategy for Functional Logic Programming) is used as the basic operational mechanism during the partial evaluation process. Also, we develop some methods that improve the efficiency of the specializa- tion. Keywords: Program Transformation, Partial Evalua- tion, Narrowing Strategies, Functional Logic Program- ming 1. Introduction Partial Evaluation (PE) [12] is an automatic transformation technique for program optimiza- tion which preseves program semantics. The idea is to specialize the original program w.r.t. parts of its input data. Hence, this technique is also known as program specialization . A partial evaluator is a mapping that takes a program P and (possibly * This work has been partially supported by the Spanish Research Funding Agency (CICYT) TIC 2001-2705-C03- 01, Acci´on Integrada Hispano-Italiana HI2000-0161, Acci´on Integrada Hispano-Alemana HA2001-0059, and the Valen- cian Research Council under grant GV01-424. part of) its input in to derive a partial evaluated program P in . We wish the new program P in to be more efficient than the original program P for the ‘class’ of inputs used during the specialization pro- cess. From the theoretical point of view, the most important problem is to establish the correctness of the PE method. A partial evaluator is (strongly ) sound if every computed answer produced by the specialized program P in is also a computer answer for the original program P. On the other hand, a partial evaluator is said to be (strongly ) complete if the reverse property is held. Since declarative lan- guages present clear semantical foundations, they offer advantages for the design of correct trans- formers. The aim of functional logic languages [10] is to integrate the best features of classical declarative languages. The standard operational semantics of functional logic languages is based on narrowing, an inference rule which combines the reduction principle of functional languages and the resolu- tion principle of logic languages. Recently, Mar´ ıa Alpuente et. al. [6] introduced a generic framework for the PE of functional logic languages and they shown that, generally, common PE techniques cannot be easily transferred to func- tional logic languages. Also they shown that the correctness of the transformation is highly depen- dent of the narrowing strategy used by the special- ization process. Since the new PE method is based on the use of narrowing as the basic mechanism to drive the PE process, it is called Narrowing– driven PE (NPE) method. In this thesis, we in- vestigate techniques and requisites to improve the NPE method. Following this aim, we introduce: 1. Improvements of the PE interpreter strategy. Regarding this matter, our goal is to improve the basic operational mechanisms used dur- ing the PE process. We start working with lazy narrowing [16], an expressive and effi- cient evaluation strategy for Functional Logic AI Communications ISSN 0921-7126, IOS Press. All rights reserved