T118 : Inference of Loop Invariants
|
Supervision:
|
||||||
|
Research group:
Distributed Software & Software Security
|
||||||
|
Context:
Software development and maintenance is usually very costly and it is oftentimes due to errors. It is very well known that the sooner (preferably during development and testing) an error is detected, the less the cost of fixing it. One of the most prominent and studied techniques to ensure program correctness is static program analysis. In static program analysis, in opposed to dynamic program analysis, the source code of the program is analyzed rather than it being run. In some static program analysis tools (e.g., VeriFast), the source code of a program augmented with annotations is analyzed and verified. The annotations used to augment and prepare a program for these tools, express assertions concerning the state of the program at specific points in the program during execution. As an instance, in any state that the program can be in after execution of the assignment ‘a = 0;’, we know that the value of variable a is 0. One of the most important annotations in these settings are loop invariants. Loop invariants are the constraints that should always hold before entering the body of the loop. In other words, any state that the program can be in before entering the body of the loop should satisfy the loop invariant. Consider the following example: int j = 0; int i; j += i; } In this example, the loop invariant is the constraint 0 ≤ i ≤ 9 and j is the sum of 0 to (i-1) if i > 0 and 0 if i = 0. Although not all examples are so straightforward; consider a loop that goes through all natural numbers between 0 and n that have a remainder r modulo k. Writing annotations in general and loop invariants in particular can be a quite tedious task and is usually not easy. Consequently, there have been techniques developed that given the source code of a program try to find loop invariants for the loops in the given source code. The aim of this thesis is to study existing approaches to automatic loop invariant inference and implement some of these approaches in Verifast software verification tool. |
||||||
|
Aim:
The aim of this thesis is to study existing approaches to loop invariant inference, get a comparison of them and have (some of) them implemented and integrated in VeriFast software verification tool. |
||||||
|
Possible research questions:
For which form of loops, each approach is applicable and how results compare? How can we integrate loop invariant inference in VeriFast? |
||||||
|
Approach:
The objective of this master thesis is to study existing approaches to loop invariant inference techniques and formalizing them into a single formal framework. Furthermore, the candidate is expected to implement (one or more of) these approaches or a combination of them (that is formalized) in OCaml and integrate this implementation into VeriFast verification tool. |
||||||
|
Relevant literature:
|
||||||
|
Student profile:
The student undertaking this master thesis must have a good background in foundations of computer science. Furthermore, the student must be interested in and acquainted with theory of programming languages and formal verification. This topic is for student(s). This topic can be selected by
|
||||||
|
Clusters, in which this topic appears:
|

