Last Change: January 19, 2001
The Postscript version of this document.
Diese Vorlesung habe ich für Studenten an der Chalmers University of Technology entwickelt und dort Im September 2000 gehalten. Alle Unterlagen, insbesondere die Folien, sind daher auf Englisch. Die Vorlesung selbst kann ich nach Wunsch auf Deutsch oder Englisch abhalten. Sie können natürlich auch alle Übungen auf Deutsch erledigen.
Sie sollten Grundkenntnisse in einer objekt-orientierten Programmiersprache wie zum Beispiel C++ oder JAVA haben. Sie brauchen ebenfalls Grundkenntnisse in der formalen Logik.
Sie benötigen keine Spezialkenntnisse. Als Vorbereitung für die Vorlesung empfehle ich Ihnen die Lektüre des Übersichtsartikels [1].
Alle weiteren Informationen finden Sie weiter unten.
In this course I would like to introduce you into a new and emerging research area, which can perhaps be paraphrased as Integrated Logic-Based Tools in Object-Oriented Software Design. There really is no established term to describe it, because software developers and logicians traditionally used to live on different planets.
So, what I am trying to do is, in a nutshell, to make the wealth of existing logic-based methods for formal software specification and verification accessible to designers and implementors of object-oriented programs who do not have much training in theory. In Section 2 below I give some more details and spell out reasons why I think this is a great idea.
Hence, the topics of my lectures span over a fairly broad range of topics: object-oriented modeling of software, specification languages, program verification and theorem proving. As a consequence, the course will be broad rather than deep.
At this point you may well wonder about a few things:
How can one guy pull off such an ambitious project single-handedly? Well, of course, he can't. I am doing this work in collaboration with colleagues in Germany and Sweden, the so-called KeY-project. It is described in Section 3.
Why should I spend one week learning about Reiner's hobbyhorse (if it were not for the credits)? I hope that you will learn, or at least hear about, a few interesting things that you find useful even if you don't buy into the rest. Among other things, I will talk about: CASE tools, the Unified Modeling Language (UML), Patterns for software design, JAVA and JAVA CARD. Then I will suggest ways how to link the software developer's world with tools and methods for logic-based verification. You will get a crash course on axiomatic semantics for programming languages (exemplified by JAVA) and automated proof search with tableau calculi.
What do I need to know to benefit from this course? I strive to make it self-contained, but, in particular if you have a math background, you might be unfamiliar with some things. First, I recommend you to read an overview article [1], which gives a good idea of the topics discussed in the course. If you understand everything in it, fine. Otherwise, I've put together a list of resources (many online) in Section 4.3 below. You can send me an email anytime, if you would like to discuss with me or if you have questions.
More questions? Links that don't work? Missing anything? Please let me know, right now!
While formal methods are by now well established in hardware and system design (the majority of producers of integrated circuits are routinely using BDD-based model checking packages for design and validation), usage of formal methods in software development is currently confined essentially to academic research projects. There are industrial applications of formal software development [6], but they are still exceptional [8].
The limits of applicability of formal methods in software design are not defined by the potential range and power of existing approaches. Several case studies clearly demonstrate that computer-aided specification and verification of realistic software is feasible [17]. The real problem lies in the excessive demand imposed by current tools on the skills of prospective users:
Successful specification and verification of larger projects, therefore, is done separately from software development by academic specialists with several years of training in formal methods, in many cases by the tool developers themselves.
While this is viable for projects with high safety and low secrecy demands, it is unlikely that formal software specification and verification will become a routine task in industry under these circumstances.
The future challenge for formal software specification and verification is to make the considerable potential of existing methods and tools feasible to use in an industrial environment. This leads to the requirements:
To be sure, the thought that full formal software verification might be possible without any background in formal methods is utopian. An industrial verification tool should, however, allow for gradual verification so that software engineers at any (including low) experience level with formal methods may benefit. In addition, an integrated tool with well-defined interfaces facilitates ``outsourcing'' those parts of the modeling process that require special skills.
Another important motivation to integrate design, development, and verification of software is provided by modern software development methodologies which are iterative and incremental. Post mortem verification would enforce the antiquated waterfall model. Even worse, in a linear model the extra effort needed for verification cannot be parallelized and thus compensated by greater work force. Therefore, delivery time increases considerably and would make formally verified software decisively less competitive.
Since November 1998 I work on a project addressing the goals outlined above. It is called the KeY project (read ``key'' and write ``KeY'', if you lack the special font). The project is carried out in close collaboration with University of Karlsruhe. Its aim is to integrate formal software specification and verification into the industrial software engineering processes.
In the principal use case of the KeY system there are actors who want to implement a software system that complies with given requirements and formally verify its correctness. The system is responsible for adding formal details to the analysis model, for creating conditions that ensure the correctness of refinement steps (called proof obligations), for finding proofs showing that these conditions are satisfied by the model, and for generating counter examples if they are not. Highlights of KeY are:
The KeY system consists of three main components:
Although consisting of different components, the KeY system is going to be fully integrated with a uniform user interface.
A first KeY system prototype has been implemented, integrating the CASE tool TOGETHER and the system IBIJa [12] as (interactive) deduction component (it has limited capabilities and lacks the verification manager). Work on the full KeY system is in progress.
The lectures will take place at:
Institut für Computersprachen 185.2
Favoritenstraße 9/Stiege 1/3. Stock (gelber Bereich)
Seminarraum der Abteilung
The first lecture is on Monday, 22 January 2001, 11:00. The course will be finished by Friday, 26 January 2001, 16:00. We can shift the times around a little, if there is a problem for you. This is perhaps best discussed at the first lecture.
| Mon | Tue | Wed | Thu | Fri | |
| 9-11 | -- | -- | -- | -- | -- |
| 11-13 | Lecture 1 | Lecture 2 | Lecture 3 | Lecture 4 | Lecture 5 |
| 14-15 | -- | -- | -- | -- | -- |
| 15-16 | -- | Exercise | Exercise | -- | Exercise |
| 16-18 | -- | -- | -- | -- | -- |
gzipped Postscript, ditto, 4 pages on 1
gzipped Postscript, ditto, 4 pages on 1
gzipped Postscript, ditto, 4 pages on 1
gzipped Postscript, ditto, 4 pages on 1
gzipped Postscript, ditto, 4 pages on 1
gzipped Postscript, ditto, 4 pages on 1
A good introduction to object-oriented analysis & software design (OOAD) and object-oriented modeling (OOM) is [21]. A brief and useful account is also in [9]. Another, very useful and comprehensive reference is [22].
A comprehensive collection of UML resources.
The final specification of the UML, version 1.3, is freely available from the OMG [23]. Don't print out the whole set -- it has close to 1,000 pages and is not useful of learning the UML!
Standard books on the UML are [5,25,18]; they are reviewed at Dr. Dobb's Electronic Review of Computer Books and Software Development Online's UML page. I ordered these books for our library and they are available from me.
An excellent introduction to the UML and my personal recommendation is [9]. The library has it and you can borrow my own copy.
A bibliography on the UML is maintained at University of Bremen.
The latest specification of the Object Constraint Language (OCL) [30], the language developed to express non-graphical constraints about an object model, is in [23, Chapter 7]. For your convenience, I put a gzipped Postscript file containing this chapter here.
OCL can be used, for example, to specify invariants on classes and types in the class model or to describe pre- and post conditions on operations and methods.
The standard book on OCL is [29],
briefly
reviewed at
Dr. Dobb's Electronic Review of Computer
Books.
A critical discussion of the OCL is in the paper [14]. A more partisan view is expressed in [19].
Free OCL parsers from IBM and University of Technology Dresden as well as a collection of OCL resources are available.
It is not too difficult to give a formal semantics to OCL (and I give several examples in the lecture). In the literature one can find a denotational [24] as well as model theoretic semantics [27].
The best and most important book on Design Patterns is [10]. It is available in the Hauptbibliothek as well as in the library of Abt.Progr.spr.u.Übers E185.
A brief and good introduction is [7]. Also very nice is the article at www.enteract.com/~bradapp/docs/patterns-intro.html.
Here and here are comprehensive collections of electronic resources on design patterns.
The application of design patterns to the generation of OCL constraints discussed in the lecture is described in the paper [3] (in German).
Dynamic logic goes back to Pratt and the mid seventies, but don't try to read the original papers. There is a lengthy (and mostly very technical) overview article [16]. More recent and digestable is [20]. A brief description of the Java version of DL we are using in KeY is [4].
I wrote a lengthy overview article that covers what I discuss in the lecture (and probably more than you ever want to know) [13]. A preprint is available here.
I will give you an assignment on Monday, Tuesday, and Thursday. You may work in pairs to solve it (if you prefer). The assignment can be found on the last one or two slides of the respective day's lecture.
The idea is that you hand in your solution on the following day in the afternoon, and then we discuss the solutions together. The nature of this course implies that there is usually no unique solution, and one can argue about advantages and disadvantages. Every participant should briefly present and defend one solution during the course. In addition, I will check your hand-ins.
In general, you are welcome to slightly modify my assignments, if you have something that interests you more, but please ask me beforehand.
The grade is based on the quality of your solutions and your actiuve contribution in the exercises. There is no separate written exam.