## SLFPreface

## SLFBasic

- Chapter in a rush, nested with exercises as additional contents
- The increment function
- A function with a return value
- Exercise: function quadruple
- Exercise: function inplace_double
- Increment of two references
- Aliased arguments
- A function that takes two references, and increments one
- Exercise: transfer from one reference to another
- Specification of allocation
- Exercise: allocate a reference with greater contents
- Deallocation in Separation Logic
- Axiomatization of the mathematical factorial function
- A partial recursive function, without state
- A recursive function with state
- Trying to prove incorrect specifications
- A recursive function involving two references
- Formalization of the list representation predicate
- In-place concatenation of two mutable lists

- Additional contents
- Bonus contents (optional reading)

## SLFHprop

## SLFHimpl

## SLFRules

## SLFWPsem

## SLFWPgen

## SLFWand

- Chapter in a rush
- Intuition for the magic wand
- Definition of the magic wand
- Characteristic property of the magic wand
- Magic wand for postconditions
- Frame expressed with hwand: the ramified frame rule
- Ramified frame rule in weakest-precondition style
- Automation with xsimpl for hwand expressions
- Evaluation of wpgen recursively in locally-defined functions

- Additional contents
- Bonus contents (optional reading)
- Equivalence between alternative definitions of the magic wand
- Operator hforall
- Alternative definition of qwand
- Equivalence between alternative definitions of the magic wand
- Simplified definition of mkstruct
- Texan triples
- Direct proof of wp_ramified directly from Hoare triples
- Conjunction and disjunction operators on hprop
- Summary of all Separation Logic operators

## SLFAffine

- Chapter in a rush
- Motivation for the discard rule
- Statement of the discard rule
- Fine-grained control on collectable predicates
- Definition of heap_affine and of haffine
- Definition of the "affine top" heap predicates
- Properties of the \GC predicate
- Instantiation of heap_affine for a fully-affine logic
- Instantiation of heap_affine for a fully-linear logic
- Refined definition of Separation Logic triples
- Soundness of the existing rules
- Soundness of the discard rules
- Discard rules in WP style
- Exploiting the discard rule in proofs
- Example proof involving discarded heap predicates

- Additional contents
- Bonus contents (optional reading)

## SLFStruct

- Chapter in a rush
- Representation of a set of consecutive cells
- Representation of an array with a block header
- Specification of allocation
- Specification of the deallocation
- Specification of array operations
- Representation of individual records fields
- Representation of records
- Example with mutable linked lists
- Reading in record fields
- Writing in record fields
- Allocation of records
- Deallocation of records
- Combined record allocation and initialization

- Additional contents
- Bonus contents (optional reading)
- Refined source language
- Realization of hheader
- Introduction and elimination lemmas for hcells and harray
- Proving the specification of allocation and deallocation
- Splitting lemmas for hcells
- Specification of pointer arithmetic
- Specification of the length operation to read the header
- Encoding of array operations using pointer arithmetic
- Encoding of record operations using pointer arithmetic
- Specification of record operations w.r.t. hfields and hrecord
- Specification of record allocation and deallocation

## SLFRich

- Chapter in a rush
- Additional contents
- Treatment of generalized conditionals and loops in wpgen
- Notation and tactics for manipulating while-loops
- Example of the application of frame during loop iterations
- Reasoning rule for loops in an affine logic
- Curried functions of several arguments
- Primitive n-ary functions
- A coercion for parsing primitive n-ary applications

## SLFSummary

- Motivation for Separation Logic in a proof assistant
- Formalization of the syntax and semantics of the language
- Formalization of Separation Logic predicates
- Definition of triples, statements and proofs of reasoning rules
- Infrastructure for more concise proof scripts
- Notion of characteristic formula
- Oveview of the characteristic formula generator
- Definition of semantic weakest precondition
- Separation Logic in weakest precondition style
- Definition of the characteristic formula generator (1/5)
- Definition of the characteristic formula generator (2/5)
- Definition of the characteristic formula generator (3/5)
- Definition of the characteristic formula generator (4/5)
- Definition of the characteristic formula generator (5/5)
- Soundness of the characteristic formula generator

- Technical zoom: the magic wand
- Demo: proofs using the infrastructure
- Conclusion