Specialization of lazy functional logic programs

Author:

Alpuente M.1,Falaschi M.2,Julián P.3,Vidal G.1

Affiliation:

1. DSIC, UPV, Camino de Vera s/n, 46071 Valencia, Spain

2. Dip. Matematica e Informatica, Via delle Scienze 206, 33100 Udine, Italy

3. Dep. de Informática, Ronda de Calatrava s/n, 13.071 Ciudad Real, Spain

Abstract

Partial evaluation is a method for program specialization based on fold/unfold transformations [8, 25]. Partial evaluation of pure functional programs uses mainly static values of given data to specialize the program [15, 44]. In logic programming, the so-called static/dynamic distinction is hardly present, whereas considerations of determinacy and choice points are far more important for control [12]. We discuss these issues in the context of a (lazy) functional logic language. We formalize a two-phase specialization method for a non-strict, first order, integrated language which makes use of lazy narrowing to specialize the program w.r. t. a goal. The basic algorithm (first phase) is formalized as an instance of the framework for the partial evaluation of functional logic programs of [2, 3], using lazy narrowing. However, the results inherited by [2, 3] mainly regard the termination of the PE method, while the (strong) soundness and completeness results must be restated for the lazy strategy. A post-processing renaming scheme (second phase) is necessary which we describe and illustrate on the well-known matching example. This phase is essential also for other non-lazy narrowing strategies, like innermost narrowing, and our method can be easily extended to these strategies. We show that our method preserves the lazy narrowing semantics and that the inclusion of simplification steps in narrowing derivations can improve control during specialization.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference45 articles.

Cited by 15 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. A partial evaluation framework for order-sorted equational programs modulo axioms;Journal of Logical and Algebraic Methods in Programming;2020-01

5. On-demand strategy annotations revisited: An improved on-demand evaluation strategy;Theoretical Computer Science;2010-01

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3