Ownership, Pointer Arithmetic and Memory Separation
Romain Bardou INRIA Saclay, France FTfJP2008
Ownership, Pointer Arithmetic, and Memory Separation 1 / 32
Ownership, Pointer Arithmetic and Memory Separation Romain Bardou - - PowerPoint PPT Presentation
Ownership, Pointer Arithmetic and Memory Separation Romain Bardou INRIA Saclay, France FTfJP2008 Ownership, Pointer Arithmetic, and Memory Separation 1 / 32 Introduction Jessie Ownership and Invariants Problems Our Approach Core Language
Ownership, Pointer Arithmetic, and Memory Separation 1 / 32
Ownership, Pointer Arithmetic, and Memory Separation Introduction 2 / 32
Ownership, Pointer Arithmetic, and Memory Separation Introduction Jessie 3 / 32
Ownership, Pointer Arithmetic, and Memory Separation Introduction Jessie 4 / 32
Ownership, Pointer Arithmetic, and Memory Separation Introduction Ownership and Invariants 5 / 32
Ownership, Pointer Arithmetic, and Memory Separation Introduction Ownership and Invariants 6 / 32
◮ Used to encode arrays ◮ A single pointer may be shifted to access several others
◮ Memory is split into several maps from pointers to values ◮ Simplifies pointer aliasing problems ◮ Global properties of the ownership system are harder to express Ownership, Pointer Arithmetic, and Memory Separation Introduction Problems 7 / 32
◮ Captures the core ideas of ownership ◮ Simple formalization usable in proofs ◮ Easy to extend ◮ Pointer arithmetic
Ownership, Pointer Arithmetic, and Memory Separation Introduction Our Approach 8 / 32
Ownership, Pointer Arithmetic, and Memory Separation Core Language 9 / 32
Ownership, Pointer Arithmetic, and Memory Separation Core Language Syntax 10 / 32
Ownership, Pointer Arithmetic, and Memory Separation Core Language Semantics 11 / 32
Ownership, Pointer Arithmetic, and Memory Separation Core Language Semantics 12 / 32
Ownership, Pointer Arithmetic, and Memory Separation Core Language Semantics 13 / 32
Ownership, Pointer Arithmetic, and Memory Separation Core Language Semantics 14 / 32
Ownership, Pointer Arithmetic, and Memory Separation Core Language Example 15 / 32
Ownership, Pointer Arithmetic, and Memory Separation Core Language Example 16 / 32
Ownership, Pointer Arithmetic, and Memory Separation Pointer Arithmetic 17 / 32
Ownership, Pointer Arithmetic, and Memory Separation Pointer Arithmetic Pointer Shifting 18 / 32
Ownership, Pointer Arithmetic, and Memory Separation Pointer Arithmetic Extending Allocation 19 / 32
Ownership, Pointer Arithmetic, and Memory Separation Pointer Arithmetic Examples 20 / 32
Ownership, Pointer Arithmetic, and Memory Separation Pointer Arithmetic Examples 21 / 32
Ownership, Pointer Arithmetic, and Memory Separation Pointer Arithmetic Examples 22 / 32
Ownership, Pointer Arithmetic, and Memory Separation Memory Separation 23 / 32
Ownership, Pointer Arithmetic, and Memory Separation Memory Separation With One Heap 24 / 32
Ownership, Pointer Arithmetic, and Memory Separation Memory Separation With One Heap 25 / 32
Ownership, Pointer Arithmetic, and Memory Separation Memory Separation With One Heap 26 / 32
Ownership, Pointer Arithmetic, and Memory Separation Memory Separation With Multiple Memories 27 / 32
Ownership, Pointer Arithmetic, and Memory Separation Memory Separation Linking Memories 28 / 32
Ownership, Pointer Arithmetic, and Memory Separation Memory Separation Linking Memories 29 / 32
Ownership, Pointer Arithmetic, and Memory Separation Memory Separation Example 30 / 32
Ownership, Pointer Arithmetic, and Memory Separation Conclusion 31 / 32
Ownership, Pointer Arithmetic, and Memory Separation Conclusion 32 / 32