Download PDF

Software Engineering and Formal Methods, Date: 2013/09/25 - 2013/09/27, Location: Madrid, Spain

Publication date: 2013-09-01
Volume: 8137 Pages: 122 - 136
ISSN: 978-3-642-40560-0
Publisher: Springer Berlin Heidelberg

Software Engineering and Formal Methods, 11th International Conference, SEFM 2013, Madrid, Spain, September 25-27, 2013. Proceedings

Author:

Vanspauwen, Gijs
Jacobs, Bart

Keywords:

modular verification, verification of C programs, C preprocessor, Science & Technology, Technology, Computer Science, Software Engineering, Computer Science, Theory & Methods, Computer Science, modular program verification

Abstract:

Formal verification enables developers to provide safety and security guarantees about their code. A modular verification approach supports the verification of different pieces of an application in separation. We propose symbolic linking as such a modular approach, since it allows to decide whether or not earlier verified source files can be safely linked together (i.e. earlier proven properties remain valid). If an annotation-based verifier for C source code supports both symbolic linking and preprocessing, care must be taken that symbolic linking does not become unsound. The problem is that the result of a header expansion depends upon the defined macros right before expansion. In this paper, we describe how symbolic linking affects the type checking process and why the interaction with preprocessing results in an unsoundness. Moreover, we define a preprocessing technique which ensures soundness by construction and show that the resulting semantics after type checking are equivalent to the standard C semantics. We implemented this preprocessing technique in VeriFast, an annotation-based verifier for C source code that supports symbolic linking, and initial experiments indicate that the modified preprocessor allows most common use cases. To the extent of our knowledge, we are the first to support both modular and sound verification of annotated C source code.