分离的度:一种用于防止数据竞争的灵活类型系统
Degrees of Separation: A Flexible Type System for Data Race Prevention
AI总结:
提出捕获分离演算(System CSC),通过允许一般别名但在必要时跟踪控制别名,实现非侵入性的静态数据竞争防止,并验证其类型安全与合流性。
摘要:
数据竞争是并行编程中一个臭名昭著的问题。静态防止数据竞争的类型系统一直备受研究关注。尽管这些系统在安全性和可用性方面取得了进展,但许多现有方法为了防止数据竞争而强制执行严格的反别名原则。采用这些方法往往具有侵入性,即它会破坏常见的编程模式并要求范式转变。我们提出了捕获分离演算(System CSC),这是一种基于捕获演算(System CC<:box)的演算,它能在实现静态数据竞争自由的同时保持非侵入性。它通常允许别名以支持常见的编程模式,但在防止数据竞争所必需时会跟踪并控制别名。我们通过确立 System CSC 的类型安全性和数据竞争自由性来研究其形式化属性。值得注意的是,我们通过证明其归约语义的合流性来确立数据竞争自由属性。为了验证该演算的可用性,我们将其实现为 Scala 3 编译器的扩展,并使用它对论文中的示例进行类型检查。
英文摘要:
Data races are a notorious problem in parallel programming. There has been great research interest in type systems that statically prevent data races. Despite the progress in the safety and usability of these systems, lots of existing approaches enforce strict anti-aliasing principles to prevent data races. The adoption of them is often intrusive, in the sense that it invalidates common programming patterns and requires paradigm shifts. We propose Capture Separation Calculus (System CSC), a calculus based on Capture Calculus (System CC<:box), that achieves static data race freedom while being non-intrusive. It allows aliasing in general to permit common programming patterns, but tracks aliasing and controls them when that is necessary to prevent data races. We study the formal properties of System CSC by establishing its type safety and data race freedom. Notably, we establish the data race freedom property by proving the confluence of its reduction semantics. To validate the usability of the calculus, we implement it as an extension to the Scala 3 compiler, and use it to type-check the examples in the paper.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。