Reasoning About Vectors using an SMT Theory of Sequences
Ying Sheng, Andres N\"otzli, Andrew Reynolds, Yoni Zohar, David Dill,, Wolfgang Grieskamp, Junkil Park, Shaz Qadeer, Clark Barrett, and Cesare, Tinelli

TL;DR
This paper introduces a new theory of sequences for reasoning about vectors, providing a more flexible alternative to array theories, with a calculus implementation that improves verification tasks involving vectors.
Contribution
It proposes a novel theory of sequences for vectors, extending string-based calculus, and demonstrates its practical effectiveness in verification scenarios.
Findings
Effective reasoning about vectors using the new theory
Implementation in cvc5 shows improved verification performance
Successfully applied to smart contract verification and array benchmarks
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Advanced Software Engineering Methodologies · Formal Methods in Verification
