You are here: Home Teaching Summer Term 2026 Program Verification (Lecture)

Program Verification (Lecture)

Course Type Lecture
 Instructors Frank Schüssele, Marcel Ebbinghaus, Lena Funk, Prof. Andreas Podelski
Lecture Monday 16:15 - 18:00, room SR 00-017/19, building 101
Exercise Tuesday 16:15 - 18:00, room SR 00-017/19, building 101
Language English
Exam TBA
 Course Catalog Program Verification (Lecture)

News

  • 2026-03-27: course website online

Motivation

Did you ever write a computer program that did not work correctly? Perhaps surprisingly for outsiders the response of every programmer will be "yes" because especially during the development of software, faulty programs are rather the rule than the exception.

How do we deal with the problem that we often have errors in our code? There are two typical approaches:

  1. We can write tests. We check for a given input if the program produces the expected output
  2. We can analyze our code very carefully.

 

Did you ever have a bug in you code even if you analyzed it very carefully and did some tests? Even to this question, the answer "yes" is no surprise, since tests cannot capture all behaviors of the program and an analysis of code is tedious and error-prone. From our everyday experience with electronic devices, we know that not only computer science students but also professional programmers regularly fail to write correct code. The fact that there is a long list of faulty software systems that were expensive or safety-critical hints that the problem is not just the sloppiness of programmers but that there is a need for new approaches that improve the reliability of software.

In this lecture we will learn an approach that is called software verification. First, we will formally state properties like e.g., if the program reaches line 42 then the variable x is positive, or if the input is different from 23 then there will be no overflow. We will then learn how to write mathematical proofs that show that a given program satisfies a given property.

Unfortunately, it can be tedious and difficult to find such a mathematical proof and humans also tend to make mistakes while giving mathematical proofs. Hence, we would like to let computers do this task.

In this lecture we will see algorithms that enable computers to find bugs in computer programs, or to find proofs that show the absence of bugs.

 

Contents

Although this lecture involves practical tools, it is primarily theoretical in nature, focusing on the fundamental concepts of program verification.

As a basis, we will use mathematical logic (So if you do not like mathematical logic, you probably do not want to take this lecture.). We will often reduce problems to the satisfiability problem of logical formulas. For example, a satisfying assignment for the following formula will show us how the assert statement in the depicted program can be violated.

  x_0 >= 0 /\ y_0 >=0 /\ x_0<=4294967296 /\ y_0<=4294967296 /\ x_0 + y_0 <= 42 /\ y_0 >= 100 /\ x_1 = (2*x_0-y_0)%4294967296 /\ x+y < 100

 

In order to get familiar with logical reasoning, the course will start with an introduction to propositional logic and first-order logic. We will then formally introduce the Hoare calculus which will allow us to state the correctness of a program and to give a mathematical proof that the program is correct.

Throughout this lecture, we will use tool like the Z3 SMT solver or the Ultimate Automizer software verifier in order to see the effect of our algorithms on practical examples. For example, if we want to find out if the following C program is correct, we can ask Ultimate Automizer.

Lecture

Each Monday, there will be an in-presence lecture.

The main course material are slides and exercises. The lecture slides are very similar to a lecture script, and consist of two kinds of slides. First, there are slides that I would show in a presentation. Second, some of these slides are accompanied by additional slides (the slides with violet text) with more detailed information. We will update the slides throughout the semester.

We are very happy to improve the course material. If you have questions and you think something should be explained in more detail then please let us know.

Exercises

Each Tuesday, an exercise sheet is published on ILIAS. You have one week to solve the exercises, and the solutions will then be discussed in the exercise session the following Tuesday.

You can submit your solutions to the exercises electronically via ILIAS. Your submissions will be marked and you will receive individual feedback.

You are allowed (and we encourage you) to discuss the exercises and possible approaches to solutions with your fellow students. However, please write down and submit your solution by yourself.

To pass the "Studienleistung" for this lecture, you must obtain at least 50% of the exercise points (summed up over all exercise sheets), and you must present at least one exercise in the exercise sessions. The idea is that you train yourself to write down things in a formally correct way, and practice speaking about the concepts of the lecture. Your solutions to the exercises will help us to evaluate your knowledge and adapt the lecture accordingly.

Exam

There will be an exam at the end of the semester, which will be either oral or written depending on the number of participants. Further details will be announced at a later point.

Literature