Denney, Ewen and Fischer, Bernd,
A Generic Annotation Inference Algorithm for the Safety Certification of Automatically Generated Code
Jarzabek, Stan, Schmidt, Douglas C. and Veldhuizen, Todd L. (eds.)
At Generative Programming and Component Engineering, 5th International Conference, GPCE 2006, United States.
22 - 26 Oct 2006.
Code generators for realistic application domains are not directly verifiable in practice. In the certifiable code generation approach the generator is extended to generate logical annotations (i.e., pre- and postconditions and loop invariants) along with the programs, allowing fully automated program proofs of different safety properties. However, this requires access to the generator sources, and remains difficult to implement and maintain because the annotations are cross-cutting concerns, both on the object-level (i.e., in the generated code) and on the meta-level (i.e., in the generator). Here we describe a new generic post-generation annotation inference algorithm that circumvents these problems. We exploit the fact that the output of a code generator is highly idiomatic, so that patterns can be used to describe all code constructs that require annotations. The patterns are specific to the idioms of the targeted code generator and to the safety property to be shown, but the algorithm itself remains generic. It is based on a pattern matcher used to identify instances of the idioms and build a property-specific abstracted control flow graph, and a graph traversal that follows the paths from the use nodes backwards to all corresponding definitions, annotating the statements along these paths. This core is instantiated for two generators and successfully applied to automatically certify initialization safety for a range of generated programs.
Conference or Workshop Item
||Event Dates: October 22-26, 2006
|Venue - Dates:
||Generative Programming and Component Engineering, 5th International Conference, GPCE 2006, United States, 2006-10-22 - 2006-10-26
||automated code generation, program verification, software certification, Hoare calculus, logical annotations, automated theorem proving
||Electronics & Computer Science
||18 Feb 2007
||17 Apr 2017 19:52
|Further Information:||Google Scholar|
Actions (login required)