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

嵌入式多方会话类型(技术报告)

Multiparty Session Typing, Embedded (Technical Report)

Sung-Shik Jongmans

AI总结:

本文提出mpst.embedded库,利用Scala的match types将多方会话类型(MPST)作为内部DSL直接嵌入,从而避免了外部DSL方法的编程阻力与抽象泄漏问题。

摘要:

多方会话类型(MPST)是一种简化并发编程的方法。其核心思想是利用类型检查,自动检测实现相对于规范的安全性与活性违规。在实践中,在缺乏原生支持的情况下,将MPST与主流语言相结合的首要方法依赖于外部DSL及其相关工具链。相比之下,我们研究了如何通过内部DSL来支持MPST。针对该问题,本文给出了肯定回答,并提出mpst.embedded库:它利用Scala的轻量级依赖类型形式(即match types),将MPST直接嵌入Scala中。我们基于内部DSL的方法,避免了基于外部DSL的MPST方法所存在的编程阻力与抽象泄漏问题。

英文摘要:

Multiparty session typing (MPST) is a method to make concurrent programming simpler. The idea is to use type checking to automatically detect safety and liveness violations of implementations relative to specifications. In practice, the premier approach to combine MPST with mainstream languages -- in the absence of native support -- is based on external DSLs and associated tooling. In contrast, we study the question of how to support MPST by using internal DSLs. Answering this question positively, this paper presents the mpst.embedded library: it leverages Scala's lightweight form of dependent typing, called match types, to embed MPST directly into Scala. Our internal-DSL-based approach avoids programming friction and leaky abstractions of the external-DSL-based approach for MPST.

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

↑