65 research outputs found

    An iterative approach to precondition inference using constrained Horn clauses

    Get PDF
    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.Comment: Paper presented at the 34nd International Conference on Logic Programming (ICLP 2018), Oxford, UK, July 14 to July 17, 2018 18 pages, LaTe

    The Boolean Logic of Set Sharing Analysis

    No full text
    We show that Jacobs and Langen's domain for set-sharing analysis is isomorphic to the domain of positive Boolean functions, introduced by Marriott and Søndergaard for groundness dependency analysis. Viewing a set-sharing description as a minterm representation of a Boolean function leads to re-casting sharing analysis as an instantiation dependency analysis. The key idea is to view the sets of variables in a sharing domain element as the models of a Boolean function. In this way, sharing sets are precisely dual negated positive Boolean functions. This new view improves our understanding of sharing analysis considerably and opens up new avenues for the efficient implementation of this kind of analysis, for example using ROBDDs. To this end we express Jacobs and Langen's abstract operations for set sharing in logical form
    corecore