面向会话类型的多态类型状态
Polymorphic Typestate for Session Types
AI总结:
本文提出 PolyVGR,利用高阶多态与存在类型解除类型状态会话类型模型的既有表达限制,并证明保持与进展性质及原型实现。
摘要:
会话类型为类型化通信协议提供了一种有原则的方法,可保证类型安全和协议保真度。会话类型化通信的形式化通常基于进程演算、并发 lambda 演算或线性逻辑。一种基于上下文敏感类型与类型状态的替代模型,因其表面上的限制而未受到太多关注。然而,该模型颇具吸引力,因为它不会强迫程序员采用续体传递风格或通道传递风格等特定模式,而是使他们能够像处理可变变量一样处理通信通道。多态类型状态是实现会话类型化通信完整处理的关键。此前沿此方向的工作受限于其建立在简单类型 lambda 演算中的设定。我们表明,高阶多态和存在类型使我们能够解除先前工作所施加的限制,从而使基于类型状态的方法在表达能力上与同类竞争方法相当。在此基础上,我们定义了 PolyVGR,即面向会话类型的多态类型状态系统,建立了其基本元理论、类型保持和进展性质,并给出了一个原型实现。
英文摘要:
Session types provide a principled approach to typed communication protocols that guarantee type safety and protocol fidelity. Formalizations of session-typed communication are typically based on process calculi, concurrent lambda calculi, or linear logic. An alternative model based on context-sensitive typing and typestate has not received much attention due to its apparent restrictions. However, this model is attractive because it does not force programmers into particular patterns like continuation-passing style or channel-passing style, but rather enables them to treat communication channels like mutable variables. Polymorphic typestate is the key that enables a full treatment of session-typed communication. Previous work in this direction was hampered by its setting in a simply-typed lambda calculus. We show that higher-order polymorphism and existential types enable us to lift the restrictions imposed by the previous work, thus bringing the expressivity of the typestate-based approach on par with the competition. On this basis, we define PolyVGR, the system of polymorphic typestate for session types, establish its basic metatheory, type preservation and progress, and present a prototype implementation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。