A Generic Annotation Inference Algorithm for the Safety Certification of Automatically Generated Code
A Generic Annotation Inference Algorithm for the Safety Certification of Automatically Generated Code
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.
automated code generation, program verification, software certification, Hoare calculus, logical annotations, automated theorem proving
1-59593-237-2
121-130
Denney, Ewen
cce9ba14-a1fd-4a7b-8e90-fcb234b53e1d
Fischer, Bernd
fbb16019-6df8-4d30-ae88-e8ad8ff74ddc
Jarzabek, Stan
bcf1179a-fe38-4e87-b796-ba379012a34d
Schmidt, Douglas C.
050baa57-6ea9-43bd-887e-7e14aa13ade5
Veldhuizen, Todd L.
76e60116-fa41-4ac9-baa8-dd048849b494
2006
Denney, Ewen
cce9ba14-a1fd-4a7b-8e90-fcb234b53e1d
Fischer, Bernd
fbb16019-6df8-4d30-ae88-e8ad8ff74ddc
Jarzabek, Stan
bcf1179a-fe38-4e87-b796-ba379012a34d
Schmidt, Douglas C.
050baa57-6ea9-43bd-887e-7e14aa13ade5
Veldhuizen, Todd L.
76e60116-fa41-4ac9-baa8-dd048849b494
Denney, Ewen and Fischer, Bernd
(2006)
A Generic Annotation Inference Algorithm for the Safety Certification of Automatically Generated Code.
Jarzabek, Stan, Schmidt, Douglas C. and Veldhuizen, Todd L.
(eds.)
Generative Programming and Component Engineering, 5th International Conference, GPCE 2006, Portland, Oregon, United States.
22 - 26 Oct 2006.
.
Record type:
Conference or Workshop Item
(Paper)
Abstract
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.
Text
gpce21-denney.pdf
- Other
More information
Published date: 2006
Additional Information:
Event Dates: October 22-26, 2006
Venue - Dates:
Generative Programming and Component Engineering, 5th International Conference, GPCE 2006, Portland, Oregon, United States, 2006-10-22 - 2006-10-26
Keywords:
automated code generation, program verification, software certification, Hoare calculus, logical annotations, automated theorem proving
Organisations:
Electronics & Computer Science
Identifiers
Local EPrints ID: 263485
URI: http://eprints.soton.ac.uk/id/eprint/263485
ISBN: 1-59593-237-2
PURE UUID: 4494ba9f-5ec2-465f-8950-74f5ff92ed89
Catalogue record
Date deposited: 18 Feb 2007
Last modified: 14 Mar 2024 07:33
Export record
Contributors
Author:
Ewen Denney
Author:
Bernd Fischer
Editor:
Stan Jarzabek
Editor:
Douglas C. Schmidt
Editor:
Todd L. Veldhuizen
Download statistics
Downloads from ePrints over the past year. Other digital versions may also be available to download e.g. from the publisher's website.
View more statistics