An iterative approach to precondition inference using constrained Horn clauses

04/17/2018
by   Bishoksan Kafle, et al.
0

We present a method for automatic inference of conditions on the initial states of a program that guarantee that the safety assertions in the program are not violated. Constrained Horn clauses (CHCs) are used to model the program and assertions in a uniform way, and we use standard abstract interpretations to derive an over-approximation of the set of unsafe initial states. The precondition then is the constraint corresponding to the complement of that set, under-approximating the set of safe initial states. This idea of complementation is not new, but previous attempts to exploit it have suffered from the loss of precision. Here we develop an iterative specialisation algorithm to give more precise, and in some cases optimal safety conditions. The algorithm combines existing transformations, namely constraint specialisation, partial evaluation and a trace elimination transformation. The last two of these transformations perform polyvariant specialisation, leading to disjunctive constraints which improve precision. The algorithm is implemented and tested on a benchmark suite of programs from the literature in precondition inference and software verification competitions.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/06/2021

Transformation-Enabled Precondition Inference

Precondition inference is a non-trivial problem with important applicati...
research
11/16/2018

Precondition Inference via Partitioning of Initial States

Precondition inference is a non-trivial task with several applications i...
research
04/11/2018

Permission Inference for Array Programs

Information about the memory locations accessed by a program is, for ins...
research
09/05/2022

Inferring Region Types via an Abstract Notion of Environment Transformation

Region-based type systems are a powerful tool for various kinds of progr...
research
03/06/2016

Composing inference algorithms as program transformations

Probabilistic inference procedures are usually coded painstakingly from ...
research
01/12/2021

Programming and Reasoning with Partial Observability

Computer programs are increasingly being deployed in partially-observabl...
research
02/20/2020

From Stateless to Stateful Priorities: Technical Report

We present the notion of stateful priorities for imposing precise restri...

Please sign up or login with your details

Forgot password? Click here to reset