Reasoning About Vectors Using an SMT Theory of Sequences

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

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

2 Scopus citations

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.

Original languageEnglish
Title of host publicationAutomated Reasoning - 11th International Joint Conference, IJCAR 2022, Proceedings
EditorsJasmin Blanchette, Laura Kovács, Dirk Pattinson
PublisherSpringer Science and Business Media Deutschland GmbH
Pages125-143
Number of pages19
ISBN (Print)9783031107689
DOIs
StatePublished - 2022
Event11th International Joint Conference on Automated Reasoning, IJCAR 2022, part of the Federated Logic Conference, FLoC 2022 - Haifa, Israel
Duration: 8 Aug 202210 Aug 2022

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume13385 LNAI
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference11th International Joint Conference on Automated Reasoning, IJCAR 2022, part of the Federated Logic Conference, FLoC 2022
Country/TerritoryIsrael
CityHaifa
Period8/08/2210/08/22

Bibliographical note

Publisher Copyright:
© 2022, The Author(s).

Funding

This work was funded in part by the Stanford Center for Blockchain Research, NSF-BSF grant numbers 2110397 (NSF) and 2020704 (BSF), and Meta Novi. Part of the work was done when the first author was an intern at Meta Novi.

FundersFunder number
NSF-BSF2020704, 2110397
Stanford Center for Blockchain Research
Bloom's Syndrome Foundation

    Fingerprint

    Dive into the research topics of 'Reasoning About Vectors Using an SMT Theory of Sequences'. Together they form a unique fingerprint.

    Cite this