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

相交类型与(正)几乎必然终止

Intersection Types and (Positive) Almost-Sure Termination

Ugo Dal Lago, Claudia Faggian, Simona Ronchi Della Rocca

摘要:

随机化高阶计算可以被看作是被赋予了单个代数运算的λ演算捕获的,即二元概率选择的构造。这种计算的重要性在于获得任何给定结果的概率,而不是获得它的可能性或必要性,就像在(非)确定性计算中一样。终止,可以说是最简单的可达性问题,至少可以用两种方式来解释,这取决于它是谈论收敛的概率还是期望的评估时间,第二个提供了更强的保证。在本文中,我们证明了交集类型能够精确地描述单个类型系统内的两个终止概念:任何λ项的收敛概率都可能被其类型低估,而底层推导的权重给出了项的期望值的下限。步骤到范式。值得注意的是,这两个近似都是紧的--不仅是可靠性,而且是完整性。关键的成分是非幂等性,没有它就不可能推理出完全评估任何项所需的约简步骤的预期数量。此外,我们还从理论上证明了所得到的近似是最优递归:没有递归可逼近的形式系统能比它做得更好。

英文摘要:

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.

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

↑