Download presentation
Presentation is loading. Please wait.
1
Strength Through Typing: A more powerful dependently-typed assembly language Matt Harren George Necula OSQ 2004
2
Dependent Types for Assembly Code Goal: To reason about type safety in the compiled code generated from CCured and other languages. We need a typed assembly language that can handle destructive updates in dependent types. Later, we will generate formal proofs of type safety for PCC. With the OpenVerifier, of course.
3
CCured pointers are multiword structures Some CCured pointers have dynamic typing information or array bounds. In assembly language, updates are not atomic. How do we safely update these pointers? The Target: CCured pointer ( * SEQ *) baseend … pointer Tag for (void * RTTI *)
4
A separate typing rule for each pointer kind in CCured. We use a special type for pointers (to records) that is parameterized on the pointer itself, and on the memory state. For array types, we need quantifiers. The Types (pointer field) (tag field)
5
The Framework Use type inference over assembly code. Now we can use an off-the-shelf compiler/optimizer Goal: typecheck CCured’s output after running through gcc –O3 Minimal annotations required. Use symbolic execution Now we can reason about multiple memory writes that together maintain our type dependencies.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.