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

再论按需调用的λ演算

The Call-by-need Lambda Calculus, Revisited

Stephen Chang, Matthias Felleisen

摘要:

现有的按需调用lambda演算通过等式逻辑描述了惰性求值。程序员可以使用这些逻辑来安全地确定一个术语是否在行为上等同于另一个术语,或者确定懒惰程序的值。然而,现有的演算模型都没有以匹配惰性实现的方式进行评估。两种结石都有同样的两个问题。首先,演算从不丢弃函数调用,即使在它们被完全解析之后。第二,演算包括重关联公理,即使这些公理仅仅是管理步骤,在任何实现中都没有对应的。在本文中,我们提出了一个替代公理化的懒惰评价使用一个单一的公理。它消除了函数调用保留问题和无关的重新关联公理。我们的公理使用上下文语法来描述所需计算的确切概念。像它的前辈一样,我们的新演算满足一致性和标准化属性,因此适合于推理行为等价性。此外,我们建立了我们的语义和Launchbury的自然语义之间的对应关系。

英文摘要:

The existing call-by-need lambda calculi describe lazy evaluation via equational logics. A programmer can use these logics to safely ascertain whether one term is behaviorally equivalent to another or to determine the value of a lazy program. However, neither of the existing calculi models evaluation in a way that matches lazy implementations. Both calculi suffer from the same two problems. First, the calculi never discard function calls, even after they are completely resolved. Second, the calculi include re-association axioms even though these axioms are merely administrative steps with no counterpart in any implementation. In this paper, we present an alternative axiomatization of lazy evaluation using a single axiom. It eliminates both the function call retention problem and the extraneous re-association axioms. Our axiom uses a grammar of contexts to describe the exact notion of a needed computation. Like its predecessors, our new calculus satisfies consistency and standardization properties and is thus suitable for reasoning about behavioral equivalence. In addition, we establish a correspondence between our semantics and Launchbury's natural semantics.

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

↑