Proof-Transforming Compilation of Programs with Abrupt Termination - PowerPoint PPT Presentation

About This Presentation
Title:

Proof-Transforming Compilation of Programs with Abrupt Termination

Description:

Java Bytecode and CIL were developed (M ller and Bannwart) ... The logic is based on the programming logic developed by A. Poetzsch-Heffter and N. Rauch. ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 20
Provided by: martinn151
Learn more at: https://www.cs.ucf.edu
Category:

less

Transcript and Presenter's Notes

Title: Proof-Transforming Compilation of Programs with Abrupt Termination


1
Proof-Transforming Compilation of Programs with
Abrupt Termination
  • Peter Müller and Martin Nordio

Microsoft Research (USA)
ETH Zurich
2
Proof-Carrying Code
Source Prog
VC Generator
Certifying compiler
code
Annotations
VC Generator
VC
VC
Proof
Proof Generator
Proof Checker
CPU
Code Producer
Code Consumer
3
Develop the proof for the Bytecode
  • Logics for intermediate languages such asJava
    Bytecode and CIL were developed
  • (Müller and Bannwart)
  • Pro It can produce the certificate needed
  • Con It is difficult and expensive

4
Proof-Transforming Compilers (PTC)
Source prog. contracts
Prover
Source prog. proof
Bytecode proof
PTC
Proof Checker
CPU
Code Producer
Code Consumer
5
PTC Elements
Source Language Java
Bytecode Language Java Bytecode
6
The bytecode Language
7
The bytecode Logic
  • We use the bytecode logic developed by F.
    Bannwart and P. Müller
  • Instruction specification

8
The Source Language
  • Similar to a Java subset

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
10
Example try-finally statements
b ? Normal or Exception?
b 4 Normal
11
Compilation try-finally statements
12
Example try-finally statements
13
Logic for try-finally statements
finally try N B E2
N N B E2
B B B E2
E1 E1 B E2
14
Example 2 Exception Table
15
Example 2 Exception Table (cont.)
Exception
any
Exception
16
Example 2 Exception Table (cont.)
Exception
any
Exception
any
17
Translation Function
18
PTC
  • Compositional statement
  • While
  • try-finally
  • Break
  • Translate the finally blocks dividing the
    exception table
  • Add a goto end-while

19
Summary
  • Source Language
  • Subset of Java
  • while, break,
  • try-catch, try-finally, throw
  • Soundness proof
Write a Comment
User Comments (0)
About PowerShow.com