An Iterative Approach to Precondition Inference Using Constrained Horn Clauses. Kafle, B., Gallagher, J., Gange, G., Schachte, P., Søndergaard, H., & Stuckey, P. J. Theory and Practice of Logic Programming, 18:553–570, 2018. doi abstract bibtex 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 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.
@article{Kaf-Gal-Gan-Sch-Son-Stu_TPLP18,
author = {Bishoksan Kafle and
John Gallagher and
Graeme Gange and
Peter Schachte and
Harald S{\o}ndergaard and
Peter J. Stuckey},
title = {An Iterative Approach to Precondition Inference Using
Constrained {Horn} Clauses},
journal = {Theory and Practice of Logic Programming},
volume = {18},
pages = {553--570},
year = {2018},
doi = {10.1017/S1471068418000091},
abstract = {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 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.},
keywords = {Program verification, Horn clauses, Program transformation, Partial evaluation},
}
Downloads: 0
{"_id":"oBZqiPE9iDuSjEdfE","bibbaseid":"kafle-gallagher-gange-schachte-sndergaard-stuckey-aniterativeapproachtopreconditioninferenceusingconstrainedhornclauses-2018","author_short":["Kafle, B.","Gallagher, J.","Gange, G.","Schachte, P.","Søndergaard, H.","Stuckey, P. J."],"bibdata":{"bibtype":"article","type":"article","author":[{"firstnames":["Bishoksan"],"propositions":[],"lastnames":["Kafle"],"suffixes":[]},{"firstnames":["John"],"propositions":[],"lastnames":["Gallagher"],"suffixes":[]},{"firstnames":["Graeme"],"propositions":[],"lastnames":["Gange"],"suffixes":[]},{"firstnames":["Peter"],"propositions":[],"lastnames":["Schachte"],"suffixes":[]},{"firstnames":["Harald"],"propositions":[],"lastnames":["Søndergaard"],"suffixes":[]},{"firstnames":["Peter","J."],"propositions":[],"lastnames":["Stuckey"],"suffixes":[]}],"title":"An Iterative Approach to Precondition Inference Using Constrained Horn Clauses","journal":"Theory and Practice of Logic Programming","volume":"18","pages":"553–570","year":"2018","doi":"10.1017/S1471068418000091","abstract":"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 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.","keywords":"Program verification, Horn clauses, Program transformation, Partial evaluation","bibtex":"@article{Kaf-Gal-Gan-Sch-Son-Stu_TPLP18,\n author = {Bishoksan Kafle and \n\t\tJohn Gallagher and \n\t\tGraeme Gange and \n\t\tPeter Schachte and \n\t\tHarald S{\\o}ndergaard and \n\t\tPeter J. Stuckey},\n title = {An Iterative Approach to Precondition Inference Using\n Constrained {Horn} Clauses},\n journal = {Theory and Practice of Logic Programming},\n volume = {18},\n pages = {553--570},\n year = {2018},\n doi = {10.1017/S1471068418000091},\n abstract = {We present a method for automatic inference of conditions on \n\t\tthe initial states of a program that guarantee that the safety \n\t\tassertions in the program are not violated. Constrained Horn \n\t\tclauses (CHCs) are used to model the program and assertions in \n\t\ta uniform way, and we use standard abstract interpretations to \n\t\tderive an over-approximation of the set of unsafe initial states.\n\t\tThe precondition then is the constraint corresponding to the \n\t\tcomplement of that set, under-approximating the set of safe \n\t\tinitial states. This idea of complementation is not new, but \n\t\tprevious attempts to exploit it have suffered from loss of \n\t\tprecision. Here we develop an iterative specialisation algorithm\n\t\tto give more precise, and in some cases optimal safety \n\t\tconditions. The algorithm combines existing transformations, \n\t\tnamely constraint specialisation, partial evaluation and a \n\t\ttrace elimination transformation. The last two of these \n\t\ttransformations perform polyvariant specialisation, leading \n\t\tto disjunctive constraints which improve precision. The \n\t\talgorithm is implemented and tested on a benchmark suite of \n\t\tprograms from the literature in precondition inference and \n\t\tsoftware verification competitions.},\n keywords = {Program verification, Horn clauses, Program transformation, Partial evaluation},\n}\n\n","author_short":["Kafle, B.","Gallagher, J.","Gange, G.","Schachte, P.","Søndergaard, H.","Stuckey, P. J."],"key":"Kaf-Gal-Gan-Sch-Son-Stu_TPLP18","id":"Kaf-Gal-Gan-Sch-Son-Stu_TPLP18","bibbaseid":"kafle-gallagher-gange-schachte-sndergaard-stuckey-aniterativeapproachtopreconditioninferenceusingconstrainedhornclauses-2018","role":"author","urls":{},"keyword":["Program verification","Horn clauses","Program transformation","Partial evaluation"],"metadata":{"authorlinks":{}},"html":""},"bibtype":"article","biburl":"https://people.eng.unimelb.edu.au/harald/bibbase.bib","dataSources":["yWvm3kzg5vKQAPLm7","9aC4cxLD8D6oJ3FLN","wpkuJrZJJtqra3FbL","ofmsZryxNDBSpE7j5","W7ih7WyQivP4EDh83","BNGFBQQncqevukxoe","q5pWX4XZgAS4TQBof","yb3uN577XrYa7qf57","9jmvjAEoFta6emcgS","XqcrNTrCCBr9mSd37"],"keywords":["program verification","horn clauses","program transformation","partial evaluation"],"search_terms":["iterative","approach","precondition","inference","using","constrained","horn","clauses","kafle","gallagher","gange","schachte","søndergaard","stuckey"],"title":"An Iterative Approach to Precondition Inference Using Constrained Horn Clauses","year":2018}