在Rocq中通过多方会话类型形式化验证活性
Formally Verified Liveness with Multiparty Session Types in Rocq
AI总结:
本文在Rocq证明助手中首次机械化证明了同步多方会话类型的活性,利用共归纳树和子类型关系建立局部类型与全局类型的操作对应,从而保证会话的安全性和活性。
摘要:
多方会话类型(MPST)提供了一个框架,用于描述涉及多个参与者的基于通信的协议。在MPST的自顶向下方法中,会话的通信模式使用全局类型描述。然后,将全局类型投影到每个参与者的局部类型上,构成会话的各个进程根据这些投影进行类型检查。类型化会话具有某些理想属性,如安全性、无死锁和活性。在这项工作中,我们在Rocq证明助手中首次提出了同步多方会话类型的机械化活性证明。基于最近的工作,我们使用paco库将全局和局部类型表示为共归纳树。我们使用局部类型上的共归纳定义的子类型关系,以及另一个共归纳定义的plain-merge投影关系来关联局部和全局类型。然后,我们使用这种投影和子类型关系将局部类型集合(或局部类型上下文)与全局类型关联起来,并证明局部类型上下文与其关联的全局类型之间的操作对应。我们利用这种关联关系来证明关联的局部类型上下文的安全性及活性,从而证明由这些上下文类型化的多方会话的活性。除了澄清MPST文献中通常非正式的证明外,我们的Rocq机械化还使得通信协议的活性属性得以认证。我们的贡献约为14K行Rocq代码,可在https://github.com/omerskeskin/mpstlive获取。
英文摘要:
Multiparty session types (MPST) offer a framework for the description of communication-based protocols involving multiple participants. In the top-down approach to MPST, the communication pattern of the session is described using a global type. Then the global type is projected on to a local type for each participant, and the individual processes making up the session are type-checked against these projections. Typed sessions possess certain desirable properties such as safety, deadlock-freedom and liveness. In this work, we present the first mechanised proof of liveness for synchronous multiparty session types in the Rocq Proof Assistant. Building on recent work, we represent global and local types as coinductive trees using the paco library. We use a coinductively defined subtyping relation on local types together with another coinductively defined plain-merge projection relation relating local and global types. We then associate collections of local types, or local type contexts, with global types using this projection and subtyping relations, and prove an operational correspondence between a local type context and its associated global type. We utilise this association relation to prove the safety and liveness of associated local type contexts and, consequently, the multiparty sessions typed by these contexts. Besides clarifying the often informal proofs found in the MPST literature, our Rocq mechanisation also enables the certification of liveness properties of communication protocols. Our contribution amounts to around 14K lines of Rocq code, available at https://github.com/omerskeskin/mpstlive .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。