论文标题
在恐慌下保持安全:与多方会话类型的仿射生锈编程
Stay Safe under Panic: Affine Rust Programming with Multiparty Session Types
论文作者
论文摘要
通信系统包括跨网络的各种软件组件。为了确保其稳健性,现代的编程语言(例如Rust)提供了强烈键入的频道,它们的用法保证是仿射的(最多一次),并且可以通过二进制渠道取消操作。为了协调组件彼此正确通信和同步,我们使用多方会话类型的结构机制,将其扩展使用仿射通信通道和隐式/显式取消机制。这种新的打字学科,仿射多方会话类型(AMPST)确保取消多个,独立运行组件的终止,并确保由于错误或突然终止,通信不会被卡住。在AMPST的指导下,我们实施了与取消终止算法相关的Rust API的自动生成工具(多固体),Rust Compiler Auto-Dectect auts Auto-dectect dectect aust termo-dectect auts termo-tect算法不安全的程序。我们的评估表明,多固定提供了一种有效的机制,用于沟通,同步和传播取消任意过程的通知。我们已经实施了几种用途,包括流行的应用程序协议(OAUTH,SMTP)和具有例外处理模式的协议(断路器,分布式记录)。
Communicating systems comprise diverse software components across networks. To ensure their robustness, modern programming languages such as Rust provide both strongly typed channels, whose usage is guaranteed to be affine (at most once), and cancellation operations over binary channels. For coordinating components to correctly communicate and synchronise with each other, we use the structuring mechanism from multiparty session types, extending it with affine communication channels and implicit/explicit cancellation mechanisms. This new typing discipline, affine multiparty session types (AMPST), ensures cancellation termination of multiple, independently running components and guarantees that communication will not get stuck due to error or abrupt termination. Guided by AMPST, we implemented an automated generation tool (MultiCrusty) of Rust APIs associated with cancellation termination algorithms, by which the Rust compiler auto-detects unsafe programs. Our evaluation shows that MultiCrusty provides an efficient mechanism for communication, synchronisation and propagation of the notifications of cancellation for arbitrary processes. We have implemented several usecases, including popular application protocols (OAuth, SMTP), and protocols with exception handling patterns (circuit breaker, distributed logging).