Download presentation
Presentation is loading. Please wait.
Published byHandoko Budiaman Modified over 6 years ago
1
Proof-Transforming Compilation of Programs with Abrupt Termination
Peter Müller and Martin Nordio Microsoft Research (USA) ETH Zurich
2
Proof-Carrying Code VC Generator Certifying compiler VC Generator
Source Prog VC Generator Certifying compiler code Annotations VC Generator VC VC Proof Proof Generator Proof Checker CPU Code Producer Code Consumer 2
3
Develop the proof for the Bytecode
Logics for intermediate languages such as Java Bytecode and CIL were developed (Müller and Bannwart) Pro: It can produce the certificate needed Con: It is difficult and expensive 3
4
Proof-Transforming Compilers (PTC)
Source prog. + contracts Prover Source prog. + proof Bytecode + proof PTC Proof Checker CPU Code Producer Code Consumer 4
5
PTC Elements Source Language: Java Logic: Hoare-Style
structured control flow variables Logic: Hoare-Style translation functions Bytecode Language: Java Bytecode unstructured control flow operand stack Bytecode Logic 5
6
The bytecode Language 6
7
The bytecode Logic We use the bytecode logic developed by F. Bannwart and P. Müller Instruction specification 7
8
The Source Language Similar to a Java subset 8
9
Logic for Java subset The logic is based on the programming logic developed by A. Poetzsch-Heffter and N. Rauch. Properties of method bodies are expressed by Hoare triples of the form normal break exception 9
10
Example: try-finally statements
b= Normal b= ? Normal or Exception? 10
11
Compilation: try-finally statements
11
12
Example: try-finally statements
12
13
Logic for try-finally statements
B E2 E1 13
14
Example 2: Exception Table
14
15
Example 2: Exception Table (cont.)
any Exception 15
16
Example 2: Exception Table (cont.)
any Exception any 16
17
Translation Function 17
18
PTC Compositional statement While try-finally Break
Translate the finally blocks dividing the exception table Add a goto end-while 18
19
Summary Source Language: Soundness proof Subset of Java while, break,
try-catch, try-finally, throw Soundness proof 19
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.