论文标题

使用SMT序列理论对向量的推理

Reasoning About Vectors using an SMT Theory of Sequences

论文作者

Sheng, Ying, Nötzli, Andres, Reynolds, Andrew, Zohar, Yoni, Dill, David, Grieskamp, Wolfgang, Park, Junkil, Qadeer, Shaz, Barrett, Clark, Tinelli, Cesare

论文摘要

动态阵列(也称为向量)是许多程序中使用的基本数据结构。在推理此类程序时,有效地对其语义进行建模至关重要。阵列的理论得到了广泛的支持,但不是理想的,因为元素的数量是固定的(由其索引排序确定),并且不能调整元素,这是一个问题,鉴于向量的长度在推理向量程序时通常起重要作用。在本文中,我们使用序列理论提出了有关向量的推理。我们介绍了该理论,提出了一个基本的微积分,该结石适用于字符串理论,并将其扩展到有效处理共同的向量操作。我们证明了我们的演算是声音的,并显示了如何用饱和配置终止模型时如何构建模型。最后,我们描述了CVC5中积分的实现,并通过对智能合约和从现有阵列基准得出的智能合约和基准测试条件进行评估来证明其功效。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源