TY - GEN
T1 - Reasoning About Vectors Using an SMT Theory of Sequences
AU - Sheng, Ying
AU - Nötzli, Andres
AU - Reynolds, Andrew
AU - Zohar, Yoni
AU - Dill, David
AU - Grieskamp, Wolfgang
AU - Park, Junkil
AU - Qadeer, Shaz
AU - Barrett, Clark
AU - Tinelli, Cesare
N1 - Publisher Copyright: © 2022, The Author(s).
PY - 2022
Y1 - 2022
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=85135860098&partnerID=8YFLogxK
U2 - 10.1007/978-3-031-10769-6_9
DO - 10.1007/978-3-031-10769-6_9
M3 - منشور من مؤتمر
SN - 9783031107689
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 125
EP - 143
BT - Automated Reasoning - 11th International Joint Conference, IJCAR 2022, Proceedings
A2 - Blanchette, Jasmin
A2 - Kovács, Laura
A2 - Pattinson, Dirk
PB - Springer Science and Business Media Deutschland GmbH
T2 - 11th International Joint Conference on Automated Reasoning, IJCAR 2022, part of the Federated Logic Conference, FLoC 2022
Y2 - 8 August 2022 through 10 August 2022
ER -