On Extending Incorrectness Logic with Backwards Reasoning
This paper studies an extension of O’Hearns’ incorrectness logic (IL) that allows backwards reasoning. IL in its current form does not generically permit backwards reasoning. We show that this can be mitigated by extending IL with underspecification. The resulting logic thus combines underspecification (a result only needs to formulate constraints over relevant variables) with underapproximation (it allows to focus on fewer than all the paths). We prove soundness of the proof system, as well as completeness for a defined subset of presumptions. We discuss proof strategies that allow one to derive a presumption from a given result. Most notably, we show that the existing concept of loop summaries – closed-form symbolic representations that summarize the effects of executing an entire loop at once – is highly useful. The logic, the proof system and all theorems have been formalized in the Isabelle/HOL theorem prover.