6533b85efe1ef96bd12c06ed

RESEARCH PRODUCT

Fast narrowing-driven partial evaluation for inductively sequential programs

Josep SilvaGermán VidalJ. Guadalupe Ramos Díaz

subject

Scheme (programming language)Class (computer programming)Functional programmingTheoretical computer scienceComputer scienceComputationProgram transformationcomputer.software_genreSymbolic computationComputer Graphics and Computer-Aided DesignPartial evaluationProgram analysisLogical programmingSpecialization (logic)Automatic programmingcomputerSoftwareInterpretercomputer.programming_language

description

Narrowing-driven partial evaluation is a powerful technique for the specialization of (first-order) functional and functional logic programs. However, although it gives good results on small programs, it does not scale up well to realistic problems (e.g., interpreter specialization). In this work, we introduce a faster partial evaluation scheme by ensuring the termination of the process offline . For this purpose, we first characterize a class of programs which are quasi-terminating , i.e., the computations performed with needed narrowing—the symbolic computation mechanism of narrowing-driven partial evaluation—only contain finitely many different terms (and, thus, partial evaluation terminates). Since this class is quite restrictive, we also introduce an annotation algorithm for a broader class of programs so that they behave like quasi-terminating programs w.r.t. an extension of needed narrowing. Preliminary experiments are encouraging and demonstrate the usefulness of our approach.

https://doi.org/10.1145/1086365.1086394