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

有用的求值:语法与语义(技术报告)

Useful Evaluation: Syntax and Semantics (Technical Report)

Pablo Barenbaum, Delia Kesner, Mariana Milicich

AI总结:

本工作首次归纳定义有用CBV求值的UCBV策略,证明其为LCBV的可靠完备优化实现,通过系统U提供首个语义模型并刻画终止性,还关联GLAMoUr抽象机确立时间不变性。

摘要:

本工作首次给出了有用的传值调用(CBV)求值的归纳定义。为此,我们首先将值替换演算中的替换操作限制为线性的,得到LCBV策略。随后,我们进一步限制LCBV中的替换,使替换能促进计算的进展。这一优化即为UCBV策略,其替换概念对周围的求值上下文敏感,因此难以归纳地捕获。此外,我们证明UCBV是LCBV的可靠且完备的实现,经优化以实现有用求值。作为进一步贡献,我们表明现有文献中的有用性概念(即GLAMoUr抽象机)能以多项式时间开销实现UCBV策略,这确立了UCBV的时间不变性,即UCBV中归约至范式的步数可作为时间复杂度的度量。定义UCBV使我们通过系统U(一种非幂等交类型系统)得到了首个有用CBV求值的语义模型。我们的主要结果是通过系统U刻画有用CBV求值的终止性:一个项在系统U中可类型化当且仅当它在UCBV中终止。此外,系统U为UCBV提供了定量解释,能给出程序求值的精确步数信息。尽管UCBV操作语义的规范极为复杂,系统U却显著简单。据我们所知,系统U是少数能精确捕获传值调用策略替换步数的定量类型系统之一。

英文摘要:

This work provides the first inductive definition of useful CBV evaluation. For that, we first restrict the substitution operation in the Value Substitution Calculus to be linear, yielding the LCBV strategy. We then further restrict substitution in LCBV, so that substitution contributes to the progress of the computation. This optimisation is the UCBV strategy, and its notion of substitution is sensitive to the surrounding evaluation context, so it is non-trivial to capture it inductively. Moreover, we show that UCBV is a sound and complete implementation of LCBV, optimised to implement useful evaluation. As a further contribution, we show that an existing notion of usefulness in the literature, namely the GLAMoUr abstract machine, implements the UCBV strategy with polynomial overhead in time. This establishes that UCBV is time-invariant, i.e., that the number of reduction steps to normal form in UCBV can be used as a measure of time complexity. Defining UCBV leads us to the first semantic model of useful CBV evaluation through system U, a non-idempotent intersection type system. Our main result is a characterisation of termination for useful CBV evaluation via system U: a term is typable in system U if and only if it terminates in UCBV. Additionally, system U provides a quantitative interpretation for UCBV, offering exact step-count information for program evaluation. Even though the specification of the operational semantics of UCBV is highly complex, system U is notably simple. As far as we know, system U is one of the scarce quantitative type systems capturing exactly the substitution step-count for a call-by-value strategy.

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

↑