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

作为通用进程类型的会话类型

Session Types as Generic Process Types

Simon J. Gay, Nils Gesbert, António Ravara

摘要:

行为型系统比通常的静态分析更安全。它们基于“类型即进程”的思想,为特定的属性提供专用的类型代数,从协议兼容性到竞争自由、锁自由甚至响应性。有两种成功的方法,尽管它们有很大的不同,它们是会话类型和进程类型。前者允许使用特定类型(证明)系统来指定和验证(分布式)通信协议;后者允许从系统规范中推断出一个过程抽象,使用通用类型(证明)系统可以更简单地验证属性。这些方法之间的关系是什么?一般的一个可以substantially具体的一个?代价是什么?前者可以作为后者的编译器吗?本文介绍的工作是朝着回答这些问题迈出的一步。具体地说,我们定义了一个逐步编码的pi演算会话和会话类型(系统的盖伊和孔)到一个pi演算的进程类型(通用类型系统的五十岚和小林)。我们对会话类型环境、极性(区分会话通道端点)和标记总和进行编码。我们展示了编码的正向和反向操作对应,以及类型对应。为了在进程类型子类型中忠实地编码会话子类型,需要向目标语言添加记录构造函数和新的子类型规则。总之,作为协议抽象的会话类型的编程便利性可以与pi演算的简单性和功能相结合,特别是利用通用类型系统提供的框架。

英文摘要:

Behavioural type systems ensure more than the usual safety guarantees of static analysis. They are based on the idea of "types-as-processes", providing dedicated type algebras for particular properties, ranging from protocol compatibility to race-freedom, lock-freedom, or even responsiveness. Two successful, although rather different, approaches, are session types and process types. The former allows to specify and verify (distributed) communication protocols using specific type (proof) systems; the latter allows to infer from a system specification a process abstraction on which it is simpler to verify properties, using a generic type (proof) system. What is the relationship between these approaches? Can the generic one subsume the specific one? At what price? And can the former be used as a compiler for the latter? The work presented herein is a step towards answers to such questions. Concretely, we define a stepwise encoding of a pi-calculus with sessions and session types (the system of Gay and Hole) into a pi-calculus with process types (the Generic Type System of Igarashi and Kobayashi). We encode session type environments, polarities (which distinguish session channels end-points), and labelled sums. We show forward and reverse operational correspondences for the encodings, as well as typing correspondences. To faithfully encode session subtyping in process types subtyping, one needs to add to the target language record constructors and new subtyping rules. In conclusion, the programming convenience of session types as protocol abstractions can be combined with the simplicity and power of the pi-calculus, taking advantage in particular of the framework provided by the Generic Type System.

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

↑