Heaps and Objects

Preconditions

Files: [Slides] [Code examples]

Postconditions

Files: [Slides with solutions] [Code examples with solutions]

What you should have learned after completing chapter 7:

  • Challenges arising from reasoning about heap-manipulating programs, particularly aliasing and framing.
  • How the heap is modeled
  • Rules for reasoning about heap updates
  • Permissions and the separating conjunction; two concepts that enable efficient reasoning about memory safety, allow concise specifications that there are no aliases, and enable framing in the presence of a heap.
  • Working with permissions using the permission-aware analogues of assume and assert statements: inhale and exhale
  • Encodings of the above concepts