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

等递归多方会话及其自动化验证——技术报告

Iso-Recursive Multiparty Sessions and their Automated Verification -- Technical Report

Marco Giunti, Nobuko Yoshida

AI总结:

本文提出一种等递归GMST类型系统,通过名为合规性的终止函数计算环境行为属性,解决了传统等递归方法机械化复杂和依赖模型检查器的问题,并在OCaml中实现和自动化验证了无死锁与无不匹配特性。

摘要:

大多数关于会话类型的研究采用等递归方法,不区分递归类型及其展开。这在不需要全局类型的近期类型系统中变得更加重要,这种系统也称为广义多方会话类型(GMST)。在GMST中,为了确立无死锁等属性,假定类型化进程的环境满足在所有无限序列中成立的扩展属性。这是一个问题,因为:(1)在证明助手中对GMST和等递归的机械化极其复杂,最终需要余归纳;以及(2)在类型检查器中实现GMST依赖于用于环境验证的模型检查器,因此程序分析不是自包含的。在本文中,我们通过提供一个计算环境行为属性的等递归类型系统来克服这些限制。该类型系统依赖于一个名为合规性的终止函数,该函数计算环境的所有最终归约,并确定这些归约何时不包含不匹配或死锁:合规的环境不会出错。该函数在理论上通过引入环境确定性LTS和环境闭包的新颖概念来定义,并可在主流编程语言和编译器中实现。我们展示了在OCaml中的实现,通过使用异常处理来解决分支和选择类型同步的固有非确定性。我们通过借助依赖Why3的OCaml生态系统工具执行自动化演绎验证,评估了该实现提供了所需的属性,即环境中不存在不匹配和死锁。

英文摘要:

Most works on session types take an equi-recursive approach and do not distinguish among a recursive type and its unfolding. This becomes more important in recent type systems which do not require global types, also known as generalised multiparty session types (GMST). In GMST, in order to establish properties as deadlock-freedom, the environments which type processes are assumed to satisfy extensional properties holding in all infinite sequences. This is a problem because: (1) the mechanisation of GMST and equi-recursion in proof assistants is utterly complex and eventually requires co-induction; and (2) the implementation of GMST in type checkers relies on model checkers for environment verification, and thus the program analysis is not self-contained. In this paper, we overcome these limitations by providing an iso-recursive typing system that computes the behavioural properties of environments. The type system relies on a terminating function named compliance that computes all final redexes of an environment, and determines when these redexes do not contain mismatches or deadlocks: compliant environments cannot go wrong. The function is defined theoretically by introducing the novel notions of deterministic LTS of environments and of environment closure, and can be implemented in mainstream programming languages and compilers. We showcase an implementation in OCaml by using exception handling to tackle the inherent non-determinism of synchronisation of branching and selection types. We assess that the implementation provides the desired properties, namely absence of mismatches and of deadlocks in environments, by resorting to automated deductive verification performed in tools of the OCaml ecosystem relying on Why3.

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

↑