Putting the Squeeze on Array Programs: Loop Verification via Inductive Rank Reduction

Oren Ish-Shalom, Shachar Itzhaky, Noam Rinetzky, Sharon Shoham

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

Abstract

Automatic verification of array manipulating programs is a challenging problem because it often amounts to the inference of inductive quantified loop invariants which, in some cases, may not even be first-order expressible. In this paper, we suggest a novel verification technique that is based on induction on user-defined rank of program states as an alternative to loop-invariants. Our technique, dubbed inductive rank reduction, works in two steps. Firstly, we simplify the verification problem and prove that the program is correct when the input state contains an input array of length or less, using the length of the array as the rank of the state. Secondly, we employ a squeezing function which converts a program state with an array of length to a state containing an array of length or less. We prove that when satisfies certain natural conditions then if the program violates its specification on then it does so also on. The correctness of the program on inputs with arrays of arbitrary lengths follows by induction. We make our technique automatic for array programs whose length of execution is proportional to the length of the input arrays by (i) performing the first step using symbolic execution, (ii) verifying the conditions required of using Z3, and (iii) providing a heuristic procedure for synthesizing. We implemented our technique and applied it successfully to several interesting array-manipulating programs, including a bidirectional summation program whose loop invariant cannot be expressed in first-order logic while its specification is quantifier-free.

Original languageEnglish
Title of host publicationVerification, Model Checking, and Abstract Interpretation - 21st International Conference, VMCAI 2020, Proceedings
EditorsDirk Beyer, Damien Zufferey
Pages112-135
Number of pages24
DOIs
StatePublished - 2020
Event21st International Conference on Verification, Model Checking, and Abstract Interpretation, VMCAI 2020 - New Orleans, United States
Duration: 16 Jan 202021 Jan 2020

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume11990 LNCS

Conference

Conference21st International Conference on Verification, Model Checking, and Abstract Interpretation, VMCAI 2020
Country/TerritoryUnited States
CityNew Orleans
Period16/01/2021/01/20

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Putting the Squeeze on Array Programs: Loop Verification via Inductive Rank Reduction'. Together they form a unique fingerprint.

Cite this