一句话:提出 C4 形式验证框架,统一证明事务对象与 STM 库的线性化与可串行化,并在 Coq 中机器化。
事务对象兼具传统并发对象的性能与事务内存的编程便利,但其正确性验证需同时处理两类保证:并发对象方法的线性化,以及 STM 库对用户调用序列的可串行化。论文提出 C4 框架,从线性化及其组合性质出发,统一支持这两类库的证明,并可组合两类定理来验证应用或更高层库。作者以事务谓词化技术实现的事务集合对象为案例,将事务与非事务组件分开模块化验证。核心方法是对交互树施加语法变换器,以事务库形式转换客户端代码,强制特定同步规则。C4 及案例均在 Coq 中机器化。
Transactional objects combine the performance of classical concurrent objects with the high-level programmability of transactional memory. However, verifying the correctness of transactional objects is tricky, requiring reasoning simultaneously about classical concurrent objects, which guarantee the atomicity of individual methods—the property known as linearizability—and about software-transactional-memory libraries, which guarantee the atomicity of user-defined sequences of method calls—or serializability. We present a formal-verification framework called C4, built up from the familiar notion of linearizability and its compositional properties, that allows proof of both kinds of libraries, along with composition of theorems from both styles to prove correctness of applications or further libraries. We apply the framework in a significant case study, verifying a transactional set object built out of both classical and transactional components following the technique of transactional predication ; the proof is modular, reasoning separately about the transactional and nontransactional parts of the implementation. Central to our approach is the use of syntactic transformers on interaction trees —i.e., transactional libraries that transform client code to enforce particular synchronization disciplines. Our framework and case studies are mechanized in Coq.
@article{paperbot1523,
title = {C4: verified transactional objects},
author = {Mohsen Lesani and Li-yao Xia and Anders Kaseorg and Christian J. Bell and Adam Chlipala and Benjamin C. Pierce and Steve Zdancewic},
journal = {Proceedings of the ACM on Programming Languages},
volume = {6},
number = {OOPSLA1},
year = {2022},
doi = {10.1145/3527324}
}