
Separation Logic Tutorial by Armando Solar-Lezama
Learn about Separation Logic Tutorial by Armando Solar-Lezama, focusing on local reasoning about programs that alter data structures. Explore concepts like heap notation, formalizing notation, algebra of heap predicates, and more.
Uploaded on | 0 Views
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Separation Logic Tutorial Armando Solar-Lezama
Separation logic See: Local Reasoning about Programs that Alter Data Structures By O Hearn, Reynolds and Yang Key idea: Break the heap into disjoint pieces Focus on a few small pieces at a time Statements affect one piece at a time
The language Imp + extensions Stmt : ? = ? ? = ? ? = ????(?1, ,??) | ???????(?) Operational Semantics ? ? ?? ??? ? ??? ??? ? :? ? ? ? ? ? ??? ? = ? ? = ? ? ? ? ? = ? ? = ? ? ? ? ? = ? ? = ? ? ? s x ? = ????(?0 ??) ? = ? ? ? ? ?0 ?, ,? + ? ?? ? ? ??? ? = (max??? ) + 1 ???????(?) ? = ? { ? ? }
Separation Logic: Notation Heaps are described by predicates in the following language: emp := The heap is empty There are no cells in this heap ? ? := The heap has exactly one cell. This cell is at location x This cell stores the value y A * B := Heap can be partitioned into two disjoint regions, one region where A is true, one region where B is true
Formalizing the notation Copied from the paper by O Hearn, Reynolds and Yang 0# 1 Domains of 0 and 1 are disjoint 0 1 Union of disjoint heaps
A few more definitions ? 10 ? 10 * ? 11 Some useful rules:
Some additional shorthand Copied from the paper by O Hearn, Reynolds and Yang An interesting property
Algebra of heap predicates Which assertions are valid? Copied from the paper by O Hearn, Reynolds and Yang
Algebra of heap predicates Which assertions are valid?
Describing data-structures What does this heap describe? ? ?,? (? + ? ?, ?) b -o ... a o x+o x+o+1 x x+1
Proofs Rules for Separation Logic Copied from the paper by O Hearn, Reynolds and Yang Small Axioms
Proof Rules for Separation Logic Copied from the paper by O Hearn, Reynolds and Yang ? ? ? ?.? ?{ ?.?} ? ????(?)
More Cycle Free Data- structures Copied from the paper by O Hearn, Reynolds and Yang
Concurrency Resources, Concurrency and Local Reasoning By Peter O Hearn