Sun 16 Jan 2022 15:05 - 15:35 at Salon I - Satisfiability Modulo Theories Chair(s): Natarajan Shankar

We present an approach for verification of programs with shared mutable references against specifications such as assertions, preconditions, postconditions, and read/write effects. We implement our tool in the Stainless verification system for Scala.

A novelty of our approach is a translation of imperative function contracts that encodes frame conditions using quantifier-free formulas in first-order logic, instead of relying on quantifiers or on dedicated separation logic reasoning. Our quantifier-free encoding enables SMT solvers to both prove safety and to report counterexamples relative to the semantics of procedure contracts. Our encoding is possible thanks to the expressive power of the extended array theory of de Moura and Bjørner, implemented in the SMT solver Z3, whose map operators allow us to project heaps before and after the call onto the declared reads and modifies clauses.

To support inductive proofs about the preservation of invariants, our approach permits capturing a projection of heap state as a history variable and evaluating imperative ghost code in the specified captured heap. This feature also allows us to explicitly state and prove hyperproperties such as independence on certain heap regions.

Another feature of our model is that we retain the efficiency of reasoning about purely functional layers of data structures, which need not be represented using heap references but often map directly to SMT-LIB algebraic data types and arrays. We thus obtain a combination of expressiveness for shared mutable data where needed, while retaining automation for purely functional program aspects. We illustrate our approach by proving detailed correctness properties of examples manipulating mutable linked structures.

Sun 16 Jan

Displayed time zone: Eastern Time (US & Canada) change

15:05 - 16:35
Satisfiability Modulo TheoriesVMCAI at Salon I
Chair(s): Natarajan Shankar SRI International, USA
15:05
30m
Paper
Generalized Arrays for Stainless FramesRemote
VMCAI
Georg Stefan Schmid EPFL, Switzerland, Viktor Kunčak EPFL, Switzerland
15:35
30m
Paper
NP Satisfiability for Arrays as PowersInPerson
VMCAI
Rodrigo Raya EPFL, Viktor Kunčak EPFL, Switzerland
16:05
30m
Paper
Bit-Precise Reasoning via Int-BlastingRemote
VMCAI
Yoni Zohar Bar Ilan University, Ahmed Irfan Stanford University, Makai Mann Stanford University, Aina Niemetz Stanford University, Andres Nötzli Stanford University, USA, Mathias Preiner Stanford University, Andrew Reynolds University of Iowa, Clark Barrett Stanford University, Cesare Tinelli University of Iowa