论会话类型的可扩展性,理论与实践(扩展版)
On the Monitorability of Session Types, in Theory and Practice (Extended Version)
摘要:
在并发和分布式系统中,软件组件应该根据预定的协议和API进行通信,如果组件不遵守这些协议和API,系统的可靠性就会受到影响。此外,隔离和修复协议/API错误可能非常困难。已经提出了许多方法来检查通信系统的正确性,从编译时到运行时验证;在这些方法中,会话类型已被应用于静态类型检查和运行时监控。这项工作需要一个新的眼光在运行时验证的通信系统使用会话类型,在理论和实践中。在理论方面,我们开发了一种新的会话监控过程的形式化模型;通过它,我们制定并证明了会话类型的可监控性的新结果,连接它们的运行时和静态验证-在可靠性方面(即,监视器是否仅标记病态类型的进程)和完整性(即,是否所有类型不正确的进程都可以被监视器标记)。在实践方面,我们表明,我们的监控理论确实是可实现的:建立在我们的正式模型,我们开发了一个Scala工具包自动生成会话监视器。我们的可执行监视器可用于仪器黑盒过程中编写的任何程序设计语言,我们评估我们的方法的可行性与一系列的基准。
英文摘要:
In concurrent and distributed systems, software components are expected to communicate according to predetermined protocols and APIs - and if a component does not observe them, the system's reliability is compromised. Furthermore, isolating and fixing protocol/API errors can be very difficult. Many methods have been proposed to check the correctness of communicating systems, ranging from compile-time to run-time verification; among such methods, session types have been applied for both static type-checking, and run-time monitoring. This work takes a fresh look at the run-time verification of communicating systems using session types, in theory and in practice. On the theoretical side, we develop a novel formal model of session-monitored processes; with it, we formulate and prove new results on the monitorability of session types, connecting their run-time and static verification - in terms of soundness (i.e., whether monitors only flag ill-typed processes) and completeness (i.e., whether all ill-typed processes can be flagged by a monitor). On the practical side, we show that our monitoring theory is indeed realisable: building upon our formal model, we develop a Scala toolkit for the automatic generation of session monitors. Our executable monitors can be used to instrument black-box processes written in any programming language; we assess the viability of our approach with a series of benchmarks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。