 
Summary: Measuring the Eectiveness of Partial
Evaluation in Functional Logic Languages
Elvira Albert 1 , Sergio Antoy 2 , and German Vidal 1
1 DSIC, Technical University of Valencia, fealbert,gvidalg@dsic.upv.es
2 Department of Computer Science, Portland State University, antoy@cs.pdx.edu
Abstract. We introduce a framework for assessing the eectiveness of
partial evaluators in functional logic languages. Our framework is based
on properties of the rewrite system that models a functional logic pro
gram. Consequently, our assessment is independent of any specic lan
guage implementation or computing environment. We dene several cri
teria for measuring the cost of a computation: number of steps, number of
function applications, and pattern matching eort. Most importantly, we
express the cost of each criterion by means of recurrence equations over
algebraic data types, which can be automatically inferred from the par
tial evaluation process itself. In some cases, the equations can be solved
by transforming their arguments from arbitrary data types to natural
numbers. In other cases, it is possible to estimate the improvement of a
partial evaluation by analyzing the associated cost recurrence equations.
1 Introduction
Partial evaluation is a sourcetosource program transformation technique for
