In computer science, separation logic is an extension of Hoare logic, a way of reasoning about programs. It was developed by John C. Reynolds, Peter O'Hearn, Samin Ishtiaq and Hongseok Yang, drawing upon early work by Rod Burstall. The assertion language of separation logic is a special case of the logic of bunched implications (BI). A CACM review article by O'Hearn charts developments in the subject to early 2019.
Overview Separation logic facilitates reasoning about:
programs that manipulate pointer data structures—including information hiding in the presence of pointers; "transfer of ownership" (avoidance of semantic frame axioms); and virtual separation (modular reasoning) between concurrent modules. Separation logic supports the developing field of research described by Peter O'Hearn and others as local reasoning, whereby specifications and proofs of a program component mention only the portion of memory used by the component, and not the entire global state of the system. Applications include automated program verification (where an algorithm checks the validity of another algorithm) and automated parallelization of software.
Assertions: operators and semantics Separation logic assertions describe "states" consisting of a store and a heap, roughly corresponding to the state of local (or stack-allocated) variables and dynamically-allocated objects in common programming languages such as C and Java. A store s {\displaystyle s} is a function mapping variables to values. A heap h {\displaystyle h} is a partial function mapping memory addresses to values. Two heaps h {\displaystyle h} and h ′ {\displaystyle h'} are disjoint (denoted h ⊥ h ′ {\displaystyle h\,\bot \,h'} ) if their domains do not overlap (i.e., for every memory address ℓ {\displaystyle \ell } , at least one of h ( ℓ ) {\displaystyle h(\ell )} and h ′ ( ℓ ) {\displaystyle h'(\ell )} is undefined). The logic allows to prove judgements of the form s , h ⊨ P {\displaystyle s,h\models P} , where s {\displaystyle s} is a store, h {\displaystyle h} is a heap, and P {\displaystyle P} is an assertion over the given store and heap. Separation logic assertions (denoted as P {\displaystyle P} , Q {\displaystyle Q} , R {\displaystyle R} ) contain the standard Boolean connectives and, in addition, e m p {\displaystyle \mathbf {e} \mathbf {m} \mathbf {p} } , e ↦ e ′ {\displaystyle e\mapsto e'} , P ∗ Q {\displaystyle P\ast Q} , and P − ∗ Q {\displaystyle P{-\!\!\ast }\,Q} , where e {\displaystyle e} and e ′ {\displaystyle e'} are expressions.
… excerpt ends here. Continue reading the full article.
