Specialization of functional logic programs based on needed narrowing
-
Published:2005-05
Issue:3
Volume:5
Page:273-303
-
ISSN:1471-0684
-
Container-title:Theory and Practice of Logic Programming
-
language:en
-
Short-container-title:Theory and Practice of Logic Programming
Author:
ALPUENTE MARÍA,LUCAS SALVADOR,VIDAL GERMÁN,HANUS MICHAEL
Abstract
Many functional logic languages are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction mechanism of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal evaluation strategy which constitutes the basis of modern (narrowing-based) lazy functional logic languages. In this work, we present the fundamentals of partial evaluation in such languages. We provide correctness results for partial evaluation based on needed narrowing and show that the nice properties of this strategy are essential for the specialization process. In particular, the structure of the original program is preserved by partial evaluation and, thus, the same evaluation strategy can be applied for the execution of specialized programs. This is in contrast to other partial evaluation schemes for lazy functional logic programs which may change the program structure in a negative way. Recent proposals for the partial evaluation of declarative multi-paradigm programs use (some form of) needed narrowing to perform computations at partial evaluation time. Therefore, our results constitute the basis for the correctness of such partial evaluators.
Publisher
Cambridge University Press (CUP)
Subject
Artificial Intelligence,Computational Theory and Mathematics,Hardware and Architecture,Theoretical Computer Science,Software
Cited by
13 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Optimizing Maude Programs via Program Specialization;Analysis, Verification and Transformation for Declarative Programming and Intelligent Systems;2023
2. Symbolic Specialization of Rewriting Logic Theories with Presto;Theory and Practice of Logic Programming;2022-02-11
3. Optimization of rewrite theories by equational partial evaluation;Journal of Logical and Algebraic Methods in Programming;2022-01
4. Functional Logic Programming: From Theory to Curry;Programming Logics;2013
5. Programming with narrowing: A tutorial;Journal of Symbolic Computation;2010-05