arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.12078cs.LO
收藏

镜像按需调用,或值的愚蠢行为

Mirroring Call-by-Need, or Values Acting Silly

Inria & LIX, Ecole Polytechnique(法国国家信息与自动化研究所与巴黎综合理工学院LIX实验室);Université Paris Cité, CNRS, IRIF(巴黎西岱大学、法国国家科学研究中心与IRIF实验室)

Beniamino Accattoli, Adrienne Lancelot

AI总结:

设计一个对称于按需调用的退化演算(按傻调用),通过重写性质和多类型验证其设计,证明按傻调用与按值调用在上下文等价上一致,揭示按值调用上下文等价对效率的盲目性。

摘要:

Lambda演算的按需调用求值可以看作融合了按名调用和按值调用的优点,即前者明智的擦除行为和后者明智的复制行为。为了更好地理解复制和擦除如何结合,我们设计了一个退化的演算,称为按傻调用,它与按需调用对称,因为它融合了按名调用和按值调用的缺点,即按名的愚蠢复制和按值的愚蠢擦除。我们通过重写性质和多类型验证了按傻调用演算的设计。特别地,我们镜像了关于按需调用的主要定理——即它与按名调用的操作等价性——表明按傻调用和按值调用诱导相同的上下文等价性。这一事实揭示了按值调用上下文等价性对效率的盲目性。我们还定义了按傻调用策略和实现该策略的按傻调用抽象机。此外,我们通过紧多类型测量了策略所采取的步骤数。最后,我们证明了按傻调用策略计算了演算中最大长度的求值序列。

英文摘要:

Call-by-need evaluation for the lambda-calculus can be seen as merging the best of call-by-name and call-by-value, namely the wise erasing behaviour of the former and the wise duplicating behaviour of the latter. To better understand how duplication and erasure can be combined, we design a degenerated calculus, dubbed call-by-silly, that is symmetric to call-by-need in that it merges the worst of call-by-name and call-by-value, namely silly duplications by-name and silly erasures by-value. We validate the design of the call-by-silly calculus via rewriting properties and multi types. In particular, we mirror the main theorem about call-by-need -- that is, its operational equivalence with call-by-name -- showing that call-by-silly and call-by-value induce the same contextual equivalence. This fact shows the blindness with respect to efficiency of call-by-value contextual equivalence. We also define a call-by-silly strategy and a call-by-silly abstract machine implementing the strategy. Moreover, we measure the number of steps taken by the strategy via tight multi types. Lastly, we prove that the call-by-silly strategy computes evaluation sequences of maximal length in the calculus.

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

↑