论文标题

交点类型和(正)几乎是终止

Intersection Types and (Positive) Almost-Sure Termination

论文作者

Lago, Ugo Dal, Faggian, Claudia, Della Rocca, Simona Ronchi

论文摘要

随机高阶计算可以看作是由具有单个代数操作的lambda微积分捕获的,即是二进制概率选择的构造。关于此类计算的重要性是获得任何给定结果的可能性,而不是(非)确定性计算中的可能性或必要性。可以说,终止是最简单的可及性问题,可以至少以两种方式阐明,具体取决于它是谈论收敛的可能性还是预期的评估时间,第二个提供了更强的保证。在本文中,我们表明相交类型能够精确地表征单个类型系统内部的两个终止概念:任何lambda-Term的收敛概率可能会被其类型所抑制,而基础衍生的重量则使得与正常形式的术语预期步骤数量较低。明显的是,这两个近似值都很紧 - 不仅是合理的,而且完整性的。至关重要的成分是非活力的,没有这些成分,就不可能根据预期的减少步骤进行理解,而这些步骤的预期数量是完全评估任何术语所必需的。此外,从理论上讲,我们获得的近似值被证明是最佳的递归:没有递归枚举的正式系统可以做得更好。

Randomized higher-order computation can be seen as being captured by a lambda calculus endowed with a single algebraic operation, namely a construct for binary probabilistic choice. What matters about such computations is the probability of obtaining any given result, rather than the possibility or the necessity of obtaining it, like in (non)deterministic computation. Termination, arguably the simplest kind of reachability problem, can be spelled out in at least two ways, depending on whether it talks about the probability of convergence or about the expected evaluation time, the second one providing a stronger guarantee. In this paper, we show that intersection types are capable of precisely characterizing both notions of termination inside a single system of types: the probability of convergence of any lambda-term can be underapproximated by its type, while the underlying derivation's weight gives a lower bound to the term's expected number of steps to normal form. Noticeably, both approximations are tight -- not only soundness but also completeness holds. The crucial ingredient is non-idempotency, without which it would be impossible to reason on the expected number of reduction steps which are necessary to completely evaluate any term. Besides, the kind of approximation we obtain is proved to be optimal recursion theoretically: no recursively enumerable formal system can do better than that.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源