arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0403011cs.PL
收藏

基于需求缩窄的函数式逻辑程序的特殊化

Specialization of Functional Logic Programs Based on Needed Narrowing

Maria Alpuente, Michael Hanus, Salvador Lucas, German Vidal

摘要:

许多函数式逻辑语言都基于窄化,这是一种基于统一的目标求解机制,它包含了函数式语言的归约机制和逻辑语言的解析原理。Needed narrowing是一种最优的求值策略,它构成了现代(基于narrowing的)惰性函数逻辑语言的基础。在这项工作中,我们提出了部分评估在这样的语言的基础。我们提供的部分评估的基础上所需的缩小正确性结果,并表明这种策略的良好性能是必不可少的专业化过程。特别地,原始程序的结构通过部分评估被保留,因此,相同的评估策略可以应用于专门程序的执行。这与惰性函数逻辑程序的其他部分求值方案形成对比,惰性函数逻辑程序可能以负面方式改变程序结构。最近提出的声明式多范式程序的部分评估使用(某种形式的)需要缩小在部分评估时执行计算。因此,我们的结果构成了这样的部分评估器的正确性的基础。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑