Hostname: page-component-74656f9884-2dmjx Total loading time: 0 Render date: 2026-11-10T08:56:11.451Z Has data issue: false hasContentIssue false

Proving correctness of imperative programs by linearizing constrained Horn clauses

Published online by Cambridge University Press:  03 September 2015

EMANUELE DE ANGELIS
Affiliation:
DEC, University ‘G. d'Annunzio’, Pescara, Italy (e-mail: emanuele.deangelis@unich.it, fabio.fioravanti@unich.it)
FABIO FIORAVANTI
Affiliation:
DEC, University ‘G. d'Annunzio’, Pescara, Italy (e-mail: emanuele.deangelis@unich.it, fabio.fioravanti@unich.it)
ALBERTO PETTOROSSI
Affiliation:
DICII, Università di Roma Tor Vergata, Roma, Italy (e-mail: pettorossi@disp.uniroma2.it)
MAURIZIO PROIETTI
Affiliation:
CNR-IASI, Roma, Italy (e-mail: maurizio.proietti@iasi.cnr.it)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

We present a method for verifying the correctness of imperative programs which is based on the automated transformation of their specifications. Given a program prog, we consider a partial correctness specification of the form {ϕ}, prog {ψ}, where the assertions ϕ and ψ are predicates defined by a set Spec of possibly recursive Horn clauses with linear arithmetic (LA) constraints in their premise (also called constrained Horn clauses). The verification method consists in constructing a set PC of constrained Horn clauses whose satisfiability implies that {ϕ}, prog, {ψ} is valid. We highlight some limitations of state-of-the-art constrained Horn clause solving methods, here called LA-solving methods, which prove the satisfiability of the clauses by looking for linear arithmetic interpretations of the predicates. In particular, we prove that there exist some specifications that cannot be proved valid by any of those LA-solving methods. These specifications require the proof of satisfiability of a set PC of constrained Horn clauses that contain nonlinear clauses (that is, clauses with more than one atom in their premise). Then, we present a transformation, called linearization, that converts PC into a set of linear clauses (that is, clauses with at most one atom in their premise). We show that several specifications that could not be proved valid by LA-solving methods, can be proved valid after linearization. We also present a strategy for performing linearization in an automatic way and we report on some experimental results obtained by using a preliminary implementation of our method.

Information

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2015 
Supplementary material: PDF

De Angelis supplementary material

Online Appendix

Download De Angelis supplementary material(PDF)
PDF 113.2 KB