争用友好型二叉搜索树的线性化分析
Linearizability Analysis of the Contention-Friendly Binary Search Tree
AI总结:
本文提出一个形式化框架,用于证明基于二叉搜索树和链表的并发集合实现的正确性,并应用于争用友好型算法,结合TLA+验证与手动证明,最终给出完整正确性证明。
摘要:
我们提出了一个形式化框架,用于证明由二叉搜索树(BST)和链表支持的集合实现的正确性,这类实现通常难以使用自动化工具证明其正确性。这是因为许多并发集合实现的 `contains` 过程承认非局部线性化点。我们通过将该框架应用于Crain等人的争用友好型二叉搜索树算法来展示此框架。\n我们精心设计了框架的结构,使其易于转换为TLA+等模型检查工具的输入,目的是使用计算机验证我们后来手动证明的声明的有界版本。尽管这种方法不提供完整证明(即不构成完全验证),但它允许在花费精力构建完整证明之前检查声明的合理性。这类似于测试驱动开发方法论,该方法论在软件工程社区已被证明非常有益。\n我们使用了这种方法,并使用TLA+验证了争用友好型算法的许多不变量和性质。事实证明这很有益,因为它帮助我们避免浪费时间试图证明不正确的声明。在一个例子中,TLA+标记出我们核心定义中的一个根本性错误。我们根据TLA+提供的作为反例的问题场景修正了该定义(以及相关的证明)。\n最后,我们基于两层框架的定义和证明,提供了争用友好型算法正确性的完整手动证明。
英文摘要:
We present a formal framework for proving the correctness of set implementations backed by binary-search-tree (BST) and linked lists, which are often difficult to prove correct using automation. This is because many concurrent set implementations admit non-local linearization points for their `contains' procedure. We demonstrate this framework by applying it to the Contention-Friendly Binary-Search Tree algorithm of Crain et al. We took care to structure our framework in a way that can be easily translated into input for model-checking tools such as TLA+, with the aim of using a computer to verify bounded versions of claims that we later proved manually. Although this approach does not provide complete proof (i.e., does not constitute full verification), it allows checking the reasonableness of the claims before spending effort constructing a complete proof. This is similar to the test-driven development methodology, that has proven very beneficial in the software engineering community. We used this approach and validated many of the invariants and properties of the Contention-Friendly algorithm using TLA+. It proved beneficial, as it helped us avoid spending time trying to prove incorrect claims. In one example, TLA+ flagged a fundamental error in one of our core definitions. We corrected the definition (and the dependant proofs), based on the problematic scenario TLA+ provided as a counter-example. Finally, we provide a complete, manual, proof of the correctness of the Contention-Friendly algorithm, based on the definitions and proofs of our two-tiered framework.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。