Conflict-free replicated data types (CRDTs) are a powerful tool for designing scalable, coordination-free distributed systems. However, constructing correct CRDTs is difficult, posing a challenge for even seasoned developers. As a result, CRDT development is still the domain of academics, with new designs often awaiting peer review and a manual proof of correctness. In this paper, we present a program synthesis-based system that can automatically synthesize verified CRDT designs from sequential data type implementations. Key to this process is a new formal definition of CRDT correctness that combines a reference sequential type with a lightweight ordering constraint that resolves conflicts between non-commutative operations. Our process follows the tradition of work in verified lifting, including an encoding of correctness into SMT logic using synthesized inductive invariants and hand-crafted grammars for the CRDT state and runtime. Our algorithm is able to automatically synthesize CRDTs for a wide variety of scenarios, from reproducing classic CRDTs to synthesizing novel designs based on specifications in existing literature. Crucially, our synthesized CRDTs are fully, automatically verified, eliminating entire classes of common errors and reducing the process of producing a new CRDT from a painstaking paper proof of correctness to a lightweight specification.
翻译:无冲突复制数据类型(CRDTs)是设计可缩放的、无协调的分布式系统的一个有力工具。然而,建立正确的CRDTs是困难的,对即使是老练的开发者也构成挑战。因此,CRDT的开发仍然是学术界的领域,新的设计经常等待同侪审查和人工校准。在本文中,我们提出了一个基于程序的综合系统,可以自动合成从按顺序数据类型实施经核实的CRDT设计。这一过程的关键是CRDT的正确性的新正式定义,它将参考的顺序类型与轻量级订单的制约结合起来,解决非调整性作业之间的冲突。我们的过程遵循了经过核查的提升工作的传统,包括将正确性编码纳入SMT逻辑,使用综合的变式变换和手写语法,供CRDT状态和运行时间使用。我们的算法能够自动合成CRDDTs,用于多种情景,从复制经典的CRDTs,到根据现有文献的规格合成新设计组合设计组合。重要的是,我们综合的CRDTDT是完全、自动校正、从新的CRDRDrregnicregrregrrrregnicrel 整个的整过程。