### Resumé

Originalsprog | Engelsk |
---|---|

Tidsskrift | Theory and Practice of Logic Programming |

Vol/bind | 18 |

Udgave nummer | 3-4 |

Sider (fra-til) | 553-570 |

ISSN | 1471-0684 |

DOI | |

Status | Udgivet - jul. 2018 |

Begivenhed | 34th International Conference on Logic Programming - Oxford, Storbritannien Varighed: 14 jul. 2018 → 17 jul. 2018 |

### Konference

Konference | 34th International Conference on Logic Programming |
---|---|

Land | Storbritannien |

By | Oxford |

Periode | 14/07/2018 → 17/07/2018 |

### Emneord

### Citer dette

*Theory and Practice of Logic Programming*,

*18*(3-4), 553-570. https://doi.org/10.1017/S1471068418000091

}

*Theory and Practice of Logic Programming*, bind 18, nr. 3-4, s. 553-570. https://doi.org/10.1017/S1471068418000091

**An iterative approach to precondition inference using constrained Horn clauses.** / Kafle, Bishoksan; Gallagher, John Patrick; Gange, Graeme; Schachte, Peter; Søndergaard, Harald; Stuckey, Peter J.

Publikation: Bidrag til tidsskrift › Konferenceartikel › Forskning › peer review

TY - GEN

T1 - An iterative approach to precondition inference using constrained Horn clauses

AU - Kafle, Bishoksan

AU - Gallagher, John Patrick

AU - Gange, Graeme

AU - Schachte, Peter

AU - Søndergaard, Harald

AU - Stuckey, Peter J.

PY - 2018/7

Y1 - 2018/7

N2 - 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.

AB - 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.

KW - Logic programming

KW - program analysis

KW - program transformation

KW - Program verification

KW - precondition analysis

UR - https://arxiv.org/abs/1804.05989

U2 - 10.1017/S1471068418000091

DO - 10.1017/S1471068418000091

M3 - Conference article

VL - 18

SP - 553

EP - 570

JO - Theory and Practice of Logic Programming

JF - Theory and Practice of Logic Programming

SN - 1471-0684

IS - 3-4

ER -