Polynomial-Time Verification and Testing of Implementations of the Snapshot Data Structure

Gal Amram, Avi Hayoun, Lior Mizrahi, Gera Weiss
{"title":"Polynomial-Time Verification and Testing of Implementations of the Snapshot Data Structure","authors":"Gal Amram, Avi Hayoun, Lior Mizrahi, Gera Weiss","doi":"10.4230/LIPIcs.DISC.2022.5","DOIUrl":null,"url":null,"abstract":"We analyze correctness of implementations of the snapshot data structure in terms of linearizability. We show that such implementations can be verified in polynomial time. Additionally, we identify a set of representative executions for testing and show that the correctness of each of these executions can be validated in linear time. These results present a significant speedup considering that verifying linearizability of implementations of concurrent data structures, in general, is EXPSPACE-complete in the number of program-states, and testing linearizability is NP-complete in the length of the tested execution. The crux of our approach is identifying a class of executions, which we call simple , such that a snapshot implementation is linearizable if and only if all of its simple executions are linearizable. We then divide all possible non-linearizable simple executions into three categories and construct a small automaton that recognizes each category. We describe two implementations (one for verification and one for testing) of an automata-based approach that we develop based on this result and an evaluation that demonstrates significant improvements over existing tools. For verification, we show that restricting a state-of-the-art tool to analyzing only simple executions saves resources and allows the analysis of more complex cases. Specifically, restricting attention to simple executions finds bugs in 27 instances, whereas, without this restriction, we were only able to find 14 of the 30 bugs in the instances we examined. We also show that our technique accelerates testing performance significantly. Specifically, our implementation solves the complete set of 900 problems we generated, whereas the state-of-the-art linearizability testing tool solves only 554 problems.","PeriodicalId":89463,"journal":{"name":"Proceedings of the ... International Symposium on High Performance Distributed Computing","volume":"85 1","pages":"5:1-5:20"},"PeriodicalIF":0.0000,"publicationDate":"2022-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the ... International Symposium on High Performance Distributed Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.DISC.2022.5","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

We analyze correctness of implementations of the snapshot data structure in terms of linearizability. We show that such implementations can be verified in polynomial time. Additionally, we identify a set of representative executions for testing and show that the correctness of each of these executions can be validated in linear time. These results present a significant speedup considering that verifying linearizability of implementations of concurrent data structures, in general, is EXPSPACE-complete in the number of program-states, and testing linearizability is NP-complete in the length of the tested execution. The crux of our approach is identifying a class of executions, which we call simple , such that a snapshot implementation is linearizable if and only if all of its simple executions are linearizable. We then divide all possible non-linearizable simple executions into three categories and construct a small automaton that recognizes each category. We describe two implementations (one for verification and one for testing) of an automata-based approach that we develop based on this result and an evaluation that demonstrates significant improvements over existing tools. For verification, we show that restricting a state-of-the-art tool to analyzing only simple executions saves resources and allows the analysis of more complex cases. Specifically, restricting attention to simple executions finds bugs in 27 instances, whereas, without this restriction, we were only able to find 14 of the 30 bugs in the instances we examined. We also show that our technique accelerates testing performance significantly. Specifically, our implementation solves the complete set of 900 problems we generated, whereas the state-of-the-art linearizability testing tool solves only 554 problems.
快照数据结构实现的多项式时间验证与测试
我们从线性化的角度分析了快照数据结构实现的正确性。我们证明这样的实现可以在多项式时间内验证。此外,我们还确定了一组用于测试的有代表性的执行,并表明可以在线性时间内验证每个执行的正确性。考虑到验证并发数据结构实现的线性性通常在程序状态的数量上是expspace完备的,而测试线性性在测试执行的长度上是np完备的,这些结果显示了显著的加速。我们方法的关键是识别一类执行,我们称之为简单执行,这样当且仅当快照的所有简单执行都是线性执行时,快照实现才是线性的。然后,我们将所有可能的非线性简单执行分为三类,并构建一个识别每一类的小型自动机。我们描述了基于自动机的方法的两种实现(一种用于验证,另一种用于测试),我们基于此结果开发了基于自动机的方法,并进行了评估,该评估显示了对现有工具的重大改进。为了验证,我们展示了将最先进的工具限制为仅分析简单的执行可以节省资源并允许分析更复杂的情况。具体来说,将注意力限制在简单的执行上可以在27个实例中找到bug,而如果没有这个限制,我们只能在检查的实例中找到30个bug中的14个。我们还表明,我们的技术显著地提高了测试性能。具体来说,我们的实现解决了我们生成的全部900个问题,而最先进的线性性测试工具只解决了554个问题。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信