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

异步会话子类型的一种可靠算法及其实现

A Sound Algorithm for Asynchronous Session Subtyping and its Implementation

Mario Bravetti, Marco Carbone, Julien Lange, Nobuko Yoshida, Gianluigi Zavattaro

AI总结:

针对异步会话子类型不可判定问题,提出一种基于余归纳树表示的可靠但不完备的检查算法,并实现工具进行实证评估。

摘要:

会话类型是用于为分布式系统中端点之间的通信进行结构化的类型,最近正被集成到主流编程语言中。在实践中,处理此类类型的一个非常重要的概念是子类型,因为它允许对更大类的系统进行类型化,其中程序并非具有精确的预期行为,而是具有相似的行为。不幸的是,最近的研究表明,在异步环境下,会话类型的子类型是不可判定的。为了应对这一负面结果,我们所知的唯一方法要么限制会话类型的语法,要么通过考虑有界异步的形式来限制通信。这两种方法在实践中都过于严格,因此我们采取不同的方式,提出了一种用于检查子类型的算法,该算法是可靠的,但不完备(在某些情况下,它会终止而不返回决定性的判定)。该算法基于异步子类型的余归纳定义的树表示;这棵树可能是无限的,而算法会检查无限成功子树是否存在有限见证。此外,我们提供了一个实现我们算法的工具。我们使用该工具在许多无法用先前方法处理的示例上测试我们的算法,并对算法的时间和空间成本进行了实证评估。

英文摘要:

Session types, types for structuring communication between endpoints in distributed systems, are recently being integrated into mainstream programming languages. In practice, a very important notion for dealing with such types is that of subtyping, since it allows for typing larger classes of system, where a program has not precisely the expected behaviour but a similar one. Unfortunately, recent work has shown that subtyping for session types in an asynchronous setting is undecidable. To cope with this negative result, the only approaches we are aware of either restrict the syntax of session types or limit communication (by considering forms of bounded asynchrony). Both approaches are too restrictive in practice, hence we proceed differently by presenting an algorithm for checking subtyping which is sound, but not complete (in some cases it terminates without returning a decisive verdict). The algorithm is based on a tree representation of the coinductive definition of asynchronous subtyping; this tree could be infinite, and the algorithm checks for the presence of finite witnesses of infinite successful subtrees. Furthermore, we provide a tool that implements our algorithm. We use this tool to test our algorithm on many examples that cannot be managed with the previous approaches, and to provide an empirical evaluation of the time and space cost of the algorithm.

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

↑