Download PDFOpen PDF in browser

Verification of Imperative Programs through Transformation of Constraint Logic Programs

12 pagesPublished: July 25, 2013

Abstract

We present a method for verifying partial correctness properties of imperative programs by using techniques based on the transformation of constraint logic programs (CLP). We consider: (i) imperative programs that manipulate integers and arrays, and (ii) first order logic properties that define <i>configurations</i> of program executions. We use CLP as a metalanguage for representing imperative programs, their executions, and their properties. First, we encode the correctness of an imperative program, say Prog, as the negation of a predicate 'incorrect' defined by a CLP program T. By construction, 'incorrect' holds in the least model of T if and only if the execution of Prog from an initial configuration eventually halts in an error configuration. Then, we apply to program T a sequence of transformations that preserve its least model semantics. These transformations are based on well-known transformation rules, such as unfolding and folding, guided by suitable transformation strategies, such as specialization and generalization. The objective of the transformations is to derive a new CLP program TransfT where the predicate 'incorrect' is defined either by (i) the fact `incorrect.' (and in this case Prog is incorrect), or by (ii) the empty set of clauses (and in this case Prog is correct). In the case where we derive a CLP program such that neither (i) nor (ii) holds, we iterate the transformation. Since the problem is undecidable, this process may not terminate. We show through examples that our method can be applied in a rather systematic way, and is amenable to automation by transferring to the field of program verification many techniques developed in the field of program transformation.

Keyphrases: constraint logic programming, program transformation, program verification, unfold/fold transformations

In: Alexei Lisitsa and Andrei Nemytykh (editors). VPT 2013. First International Workshop on Verification and Program Transformation, vol 16, pages 30-41.

BibTeX entry
@inproceedings{VPT2013:Verification_Imperative_Programs_through,
  author    = {Emanuele De Angelis and Fabio Fioravanti and Alberto Pettorossi and Maurizio Proietti},
  title     = {Verification of Imperative Programs through Transformation of Constraint Logic Programs},
  booktitle = {VPT 2013. First International Workshop on Verification and Program Transformation},
  editor    = {Alexei Lisitsa and Andrei Nemytykh},
  series    = {EPiC Series in Computing},
  volume    = {16},
  publisher = {EasyChair},
  bibsource = {EasyChair, https://easychair.org},
  issn      = {2398-7340},
  url       = {/publications/paper/RKS},
  doi       = {10.29007/163x},
  pages     = {30-41},
  year      = {2013}}
Download PDFOpen PDF in browser