Abstraction-Based Interprocedural Software Verification. Somorjai, M. 2024. Master's Thesis, Budapest University of Technology and Economics
Abstraction-Based Interprocedural Software Verification [pdf]Pdf  Abstraction-Based Interprocedural Software Verification [link]Link  abstract   bibtex   
Software is becoming more and more prevalent in our lives. We use it to send messages and execute payments, but nowadays software also drives cars and operates nuclear power plants. In such systems, failure can lead to significant financial loss, environmental damage or even the loss of life, therefore, ensuring the correctness of software in these system is critical. Formal methods can give a mathematically precise proof of correctness or a refutation to the safety properties of a system. There are various approaches to formal verification, each with its own set of challenges. Deductive methods aim to prove that software conforms to its specification, by transforming the program and its specification to a collection of mathematical proof obligations, which are then passed on to theorem proving tools. The main disadvantage of the approach is that writing the specification as contracts requires significant engineering effort, limiting the scalability of deductive verification. Another method, model checking, explores the state space of a mathematical model of software, in order to decide whether or not certain safety properties of the program are satisfied. While model checking can be automatic, it can often be infeasible as the size of a program's state space grows exponentially with the number of variables in the program. The state-space is further blown up by procedures, which extend the state of the program with the call stack that can stretch infinitely deep in recursive programs, leading to an infinitely large state-space. In this work, I propose abstraction-based approaches for combating the challenges of the aforementioned formal methods. Abstraction-based methods reduce the state-space into an abstract state-space by overapproximating the data state of the program. First, I present the extension of abstraction to the call stack in the abstraction-based model checking algorithm, Counterexample-Guided Abstraction Refinement (CEGAR). With parts of the call stack abstracted away, similarities between states with different stacks can be detected and the size of the abstract state-space can further be reduced, improving the efficiency of interprocedural verification. Then, I propose to combine model checking and deductive verification in a way that makes verification both automatic and more efficient. The abstract state-space explored by model checking is used to synthesize contracts for procedures, which are then utilized by deductive methods to verify properties of the program. This eliminates the necessity of the developers having to manually provide contracts, allowing verification to be more scalable. The novel contribution of the latter work is that the synthesis is context-aware, that is, the generated contracts only consider conditions that can actually occur in each procedure of the program, instead of generating the most general formulas. I implement the proposed techniques in the model checking framework Theta and evaluate their performance on synthetic and industrial examples.

Downloads: 0