Reasoning About Vectors using an SMT Theory of Sequences

Ying Sheng, Andres Nötzli, Andrew Reynolds, Yoni Zohar, D. Dill, W. Grieskamp, Junkil Park, S. Qadeer, Clark W. Barrett, C. Tinelli
{"title":"Reasoning About Vectors using an SMT Theory of Sequences","authors":"Ying Sheng, Andres Nötzli, Andrew Reynolds, Yoni Zohar, D. Dill, W. Grieskamp, Junkil Park, S. Qadeer, Clark W. Barrett, C. Tinelli","doi":"10.48550/arXiv.2205.08095","DOIUrl":null,"url":null,"abstract":". Dynamic arrays, also referred to as vectors, are fundamental data structures used in many programs. Modeling their semantics efficiently is crucial when reasoning about such programs. The theory of arrays is widely supported but is not ideal, because the number of elements is fixed (determined by its index sort) and cannot be adjusted, which is a problem, given that the length of vectors often plays an important role when reasoning about vector programs. In this paper, we propose reasoning about vectors using a theory of sequences. We introduce the theory, propose a basic calculus adapted from one for the theory of strings, and extend it to efficiently handle common vector operations. We prove that our calculus is sound and show how to construct a model when it terminates with a saturated configuration. Finally, we describe an implementation of the calculus in cvc5 and demonstrate its efficacy by evaluating it on verification conditions for smart contracts and benchmarks derived from existing array benchmarks.","PeriodicalId":448502,"journal":{"name":"International Joint Conference on Automated Reasoning","volume":"150 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-05-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Joint Conference on Automated Reasoning","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.48550/arXiv.2205.08095","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

. Dynamic arrays, also referred to as vectors, are fundamental data structures used in many programs. Modeling their semantics efficiently is crucial when reasoning about such programs. The theory of arrays is widely supported but is not ideal, because the number of elements is fixed (determined by its index sort) and cannot be adjusted, which is a problem, given that the length of vectors often plays an important role when reasoning about vector programs. In this paper, we propose reasoning about vectors using a theory of sequences. We introduce the theory, propose a basic calculus adapted from one for the theory of strings, and extend it to efficiently handle common vector operations. We prove that our calculus is sound and show how to construct a model when it terminates with a saturated configuration. Finally, we describe an implementation of the calculus in cvc5 and demonstrate its efficacy by evaluating it on verification conditions for smart contracts and benchmarks derived from existing array benchmarks.
用序列的SMT理论推理向量
. 动态数组,也称为向量,是许多程序中使用的基本数据结构。在对这类程序进行推理时,有效地对其语义建模是至关重要的。数组理论得到了广泛的支持,但并不理想,因为元素的数量是固定的(由其索引排序决定),不能调整,这是一个问题,因为在对向量程序进行推理时,向量的长度通常起着重要作用。在本文中,我们利用序列理论提出了关于向量的推理。我们介绍了这一理论,提出了一种基于弦理论的基本演算,并将其扩展到有效地处理常见的向量运算。我们证明了我们的演算是合理的,并展示了如何构建一个模型,当它终止于一个饱和构型。最后,我们描述了cvc5中微积分的实现,并通过评估智能合约的验证条件和源自现有数组基准的基准来证明其有效性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:481959085
Book学术官方微信