Separation logic
Builds on Hoare logicFunction
Definition
Fix a set of variables and a set of locations. A store is a function , and a heap is a function with finite domain . Two heaps are disjoint if their domains are disjoint, and then is the heap on that agrees with each. The assertions of separation logic extend first-order formulas over the store with the following, and their meaning is a relation .
- if is empty.
- if and , where is the value of the expression in .
- if for some disjoint heaps with and .
- if for every heap disjoint from with , also .
Separation logic is the Hoare logic for a language with heap commands, with triples over these assertions. Triples are read with fault avoidance. From any state satisfying , the command never accesses a location outside the heap, and if it terminates, the final state satisfies . Its central rule is the frame rule: from derive , provided assigns no variable that occurs free in .
Remarks
Example: let , and let have domain with and . Then : split into the heap , which satisfies , and the disjoint heap , which satisfies .
Non-example: holds in no state. Both parts would need the location in their domains, so they are not disjoint, and clause 3 fails. By contrast, the ordinary conjunction holds in the one-cell heap .
The frame rule is sound because of fault avoidance: a command that runs safely in a heap satisfying cannot touch the cells of a disjoint part satisfying . The connective is the separating implication, or magic wand, and it is the right adjoint of .
Reading path
To understand this page from the ground up, read these 14 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Binary relation concept
- Function concept
- Proposition concept
- Operational semantics concept
- Conjunction definition
- Disjunction definition
- Implication definition
- Negation definition
- Predicate definition
- Biconditional definition
- Propositional logic concept
- Predicate logic concept
- Hoare logic concept
- Separation logic definition
Further reading
About this page
| Tag | 4ANY45YJG8 |
|---|---|
| URI | m2://4ANY45YJG8 |
| Kind | definition |
| Writing | W0 stub |
| MSC | 68Q60, 03B70, 03B47 |
| Defines | Separation logic |
| Uses | Hoare logic, Function |
| Changed | 3 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.