Beyond the Elementary Representations of Program Invariants over Algebraic Data Types

04/09/2021
by   Yurii Kostyukov, et al.
0

First-order logic is a natural way of expressing properties of computation. It is traditionally used in various program logics for expressing the correctness properties and certificates. Although such representations are expressive for some theories, they fail to express many interesting properties of algebraic data types (ADTs). In this paper, we explore three different approaches to represent program invariants of ADT-manipulating programs: tree automata, and first-order formulas with or without size constraints. We compare the expressive power of these representations and prove the negative definability of both first-order representations using the pumping lemmas. We present an approach to automatically infer program invariants of ADT-manipulating programs by a reduction to a finite model finder. The implementation called RInGen has been evaluated against state-of-the-art invariant synthesizers and has been experimentally shown to be competitive. In particular, program invariants represented by automata are capable of expressing more complex properties of computation and their automatic construction is often less expensive.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/31/2021

Solving Constrained Horn Clauses over ADTs by Finite Model Finding

First-order logic is a natural way of expressing the properties of compu...
research
06/26/2019

Ilinva: Using Abduction to Generate Loop Invariants

We describe a system to prove properties of programs. The key feature of...
research
03/05/2021

Algebra-based Synthesis of Loops and their Invariants (Invited Paper)

Provably correct software is one of the key challenges in our softwaredr...
research
12/23/2017

Presburger-Definable Parameterized Typestates

Typestates are good at capturing dynamic states of a program as compared...
research
01/05/2023

Builtin Types viewed as Inductive Families

State of the art optimisation passes for dependently typed languages can...
research
01/15/2019

Synthesising a Database of Parameterised Linear and Non-Linear Invariants for Time-Series Constraints

Many constraints restricting the result of some computations over an int...
research
10/31/2019

Data Abstraction and Relational Program Logic

In a paper published in 1972 Hoare articulated the fundamental notions o...

Please sign up or login with your details

Forgot password? Click here to reset