Deductive Program Analysis with First-Order Theorem Provers

Sammanfattning: Software is ubiquitous in nearly all aspects of human life, including safety-critical activities. It is therefore crucial to analyze programs and provide strong guarantees that they perform as expected. Automated theorem provers are increasingly popular tools to assist in this task, as they can be used to automatically discover and prove some semantic properties of programs. This thesis explores new ways to use automated theorem provers for first-order logic in the context of program analysis and verification. Firstly, we present a first-order logic encoding of the semantics of imperative programs containing loops. This encoding can be used to express both functional and temporal properties of loops, and is particularly suited to program analysis with an automated theorem prover. We employ it to automate functional verification, termination analysis and invariant generation for iterative programs operating over arrays. Secondly, we describe how to extend theorems provers based on the superposition calculus to reason about datatypes and codatatypes, which are central to many programs. As the first-order theory of datatypes and codatatypes does not have a finite axiomatization, traditional means to perform theory reasoning in superposition-based provers cannot be used. We overcome this by introducing theory extensions as well as augmenting the superposition calculus with new rules.