The Relationship Between Separation Logic and Implicit Dynamic Frames

Slides:



Advertisements
Similar presentations
Joint work with Mike Barnett, Robert DeLine, Manuel Fahndrich, and Wolfram Schulte Verifying invariants in object-oriented programs K. Rustan M. Leino.
Advertisements

Technologies for finding errors in object-oriented software K. Rustan M. Leino Microsoft Research, Redmond, WA Lecture 1 Summer school on Formal Models.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Abstraction of Source Code (from Bandera lectures and talks)
Semantics Static semantics Dynamic semantics attribute grammars
Verifying Executable Object-Oriented Specifications with Separation Logic Stephan van Staden, Cristiano Calcagno, Bertrand Meyer.
Constraint Semantics for Abstract Read Permissions 28 th July 2014, FTfJP, Uppsala John Tang Boyland (UW-Milwaukee/ETH Zurich) Peter Müller, Malte Schwerhoff,
Reduction, abstraction, and atomicity: How much can we prove about concurrent programs using them? Serdar Tasiran Koç University Istanbul, Turkey Tayfun.
Automated Software Verification with a Permission-Based Logic 20 th June 2014, Zürich Malte Schwerhoff, ETH Zürich.
Kripke: Outline …(1975) First improtant decision: the theory is about sentences, not about propositions. Like Tarski, not like Barwise & Etchemendy. ***
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 19: Minding Ps & Qs: Axiomatic.
ISBN Chapter 3 Describing Syntax and Semantics.
CS 355 – Programming Languages
Changing perspective can be useful Relating alternative logics for automatic software verification Alex Summers (ETH Zurich) partly based on joint work.
Fractional Permissions without the Fractions Alex Summers ETH Zurich Joint work with: Stefan Heule, Rustan Leino, Peter Müller ETH Zurich MSR Redmond ETH.
Lecture 2 Towards a Verifying Compiler: Logic of Object oriented Programs Wolfram Schulte Microsoft Research Formal Methods 2006 Objects, references, heaps,
ESC Java. Static Analysis Spectrum Power Cost Type checking Data-flow analysis Model checking Program verification AutomatedManual ESC.
ECI 2007: Specification and Verification of Object- Oriented Programs Lecture 1.
ESC Java. Static Analysis Spectrum Power Cost Type checking Data-flow analysis Model checking Program verification AutomatedManual ESC.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Describing Syntax and Semantics
K. Rustan M. Leino RiSE, Microsoft Research, Redmond joint work with Peter Müller and Jan Smans Lecture 0 1 September 2009 FOSAD 2009, Bertinoro, Italy.
K. Rustan M. Leino RiSE, Joint work with: Peter Müller (ETH Zurich) Jan Smans (KU Leuven) Special thanks to Mike Barnett VMCAI, Madrid, Spain, 18 January.
Crowfoot: a verifier for higher order store programs Billiejoe (Nathaniel) Charlton Ben Horsfall Bernhard Reus University of Sussex VMCAI 2012.
Pre/Post Condition Logic 03/06/2013. Agenda Hoare’s Logic Overview Application to Pre/Post Conditions.
Aquinas Hobor and Cristian Gherghina (National University of Singapore) TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
Automated Software Verification with Implicit Dynamic Frames 5 th December 2013, Leuven Malte Schwerhoff, ETH Zürich/KU Leuven.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Viper A Verification Infrastructure for Permission-Based Reasoning 1 st March 2015, ECOOP’15 PC Meeting, Zurich Uri Juhasz, Ioannis Kassios, Peter Müller,
Viper A Verification Infrastructure for Permission-Based Reasoning 24 th March 2015, JML Workshop, Leiden Uri Juhasz, Ioannis Kassios, Peter Müller, Milos.
ISBN Chapter 3 Describing Semantics.
Chapter 3 Part II Describing Syntax and Semantics.
Semantics In Text: Chapter 3.
COP4020 Programming Languages Introduction to Axiomatic Semantics Prof. Robert van Engelen.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Lightweight Support for Magic Wands in an Automatic Verifier Malte Schwerhoff and Alexander J. Summers 10 th July 2015, ECOOP, Prague.
An Introduction to Automated Program Verification with Permission Logics 15 th May 2015, Systems Group, ETH Zurich Uri Juhasz, Ioannis Kassios, Peter Müller,
CSSE501 Object-Oriented Development. Chapter 10: Subclasses and Subtypes  In this chapter we will explore the relationships between the two concepts.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
/ PSWLAB Thread Modular Model Checking by Cormac Flanagan and Shaz Qadeer (published in Spin’03) Hong,Shin Thread Modular Model.
Faithful mapping of model classes to mathematical structures Ádám Darvas ETH Zürich Switzerland Peter Müller Microsoft Research Redmond, WA, USA SAVCBS.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
DBC NOTES. Design By Contract l A contract carries mutual obligations and benefits. l The client should only call a routine when the routine’s pre-condition.
Towards a Semantic Model for Java Wildcards Sophia Drossopoulou Mariangiola Dezani-Ciancaglini Imperial College London Università di Torino Italy Nicholas.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Chapter 3 of Programming Languages by Ravi Sethi
Weakest Precondition of Unstructured Programs
Opeoluwa Matthews, Jesse Bingham, Daniel Sorin
Further with Hoare Logic Sections 6.12, 6.10, 6.13
A Verification Infrastructure for Permission-based Reasoning
Sparkle a functional theorem prover
The Relationship Between Separation Logic and Implicit Dynamic Frames
Introduction to Parsing (adapted from CS 164 at Berkeley)
Matching Logic An Alternative to Hoare/Floyd Logic
Reasoning About Code.
Modular Verification of Message Passing Programs
IS 2935: Developing Secure Systems
Over-Approximating Boolean Programs with Unbounded Thread Creation
A Verification Infrastructure for Permission-Based Reasoning
Semantics In Text: Chapter 3.
Resolution Proofs for Combinational Equivalence
CSCI1600: Embedded and Real Time Software
Predicate Transformers
Assertions References: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 4/25/2019.
COP4020 Programming Languages
A Considerate Specification of the Composite Pattern
Presentation transcript:

The Relationship Between Separation Logic and Implicit Dynamic Frames Alex Summers (ETH Zurich) based on joint work with Matthew Parkinson (MSR-Cambridge)

Introduction Alex: a postdoc in Peter Müller’s Programming Methodology group at ETH Zurich Area: modular verification of (usually) concurrent, (usually) object-oriented software The group’s interests include developing new formalisms which can be implemented in automatic verification tools This talk is concerned with specification logics for concurrent heap-based programs

Baking your own automatic verifier Ingredients: void m() requires P ensures Q { Q3 this.x := 2; Q2 call n(); Q1 this.x += 1; Q } 1 Assertion Logic 1 Language semantics (weakest preconditions) Annotated code: Method: Work backwards from the post-condition Check entailment: (ask SMT solver) P ⇒ Q3 ?

Main problems Framing Concurrency Encoding to prover P ⇒ Q3 ? how do we preserve heap information across method calls? Concurrency how do we reason about heap values if other threads could interfere? Encoding to prover how do we check entailments with a first-order SMT solver? void m() requires P ensures Q { Q3 this.x := 2; Q2 call n(); Q1 this.x += 1; Q } P ⇒ Q3 ?

Permissions to the Rescue (mostly) Idea: use specifications to explicitly allow/forbid certain heap accesses by program Assign a permission to each heap location, and only allow a thread to access with permission Similarly, heap values can only be preserved if permission is held on to (framing is easier) Distribute permissions between threads to avoid interference (concurrency is easier) We need a logic (or two) with these features...

⊂ ⊃ ... ? ... ? Overview Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) ⊂ ⊃ Kripke semantics over partial heaps ... ? ... ? Weakest pre-condition definitions Chalice : verification condition generation

⊂ ⊃ ? Overview Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) ⊂ ⊃ Kripke semantics over partial heaps Kripke semantics over total heaps ? Weakest pre-condition definitions Chalice : verification condition generation

⊂ ⊃ ≡ ≡ Overview Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) ⊂ ⊃ Kripke semantics over partial heaps Kripke semantics over total heaps Kripke semantics over total heaps ≡ ≡ Weakest pre-condition definitions Chalice : verification condition generation

⊂ ⊃ ≡ ≡ ≡ Overview Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) ⊂ ⊃ Kripke semantics over partial heaps Kripke semantics over total heaps Kripke semantics over total heaps ≡ ≡ Weakest pre-condition definitions Chalice : verification condition generation ≡

Kripke semantics over partial heaps Weakest pre-condition definitions Overview Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) Kripke semantics over partial heaps Kripke semantics over total heaps Kripke semantics over total heaps ≡ ≡ Weakest pre-condition definitions Chalice : verification condition generation ≡

What is separation logic? A specification logic with explicit connectives for accessing heap locations and dividing the heap Assertion semantics is based on partial heaps A * B : Splitting of heap into disjoint parts { P } C { Q } : Frame rule { R * P } C { Q * R } (if vars in R unmodified) x.f ↦ v (“points-to predicate”) Permission to access location x.f Specifies value v currently stored at the location A -̶ B : Hypothetical addition of disjoint part

Intuitionistic separation logic For garbage collected languages, we want to be able to “forget” parts of our heap e.g., intentionally leave certain heap locations out of a method post-condition. This can be reflected in the logic by ensuring that truth is closed under heap extension i.e., h ⊨ A ⇒ h ⊎ h’ ⊨ A this way, we can choose to check a weaker assertion than actually holds in our current heap This is easy to do for most of the connectives...

Intuitionistic separation logic For implication, it is a little tricky: h ⊨ A⇒B iff ( h ⊨ A ⇒ h ⊨ B ) doesn’t give a semantics closed under heap extension For example, take the assertion (x.f ↦ 2 ⇒ false). This would be true in the empty heap (no access to x.f). But it is false in an extension of the empty heap, in which x.f = 2. Instead, one builds in checking all extensions of the state: h ⊨ A⇒B iff ∀h’( h ⊎ h’ ⊨ A ⇒ h ⊎ h’ ⊨ B) i.e., an implication A⇒B holds iff, in all extensions of the current state, if A is true then B is true. More on this later...

Weakest preconditions in SL First-order logic weakest pre-condition world: wp(assume A, B) = A ⇒ B wp(assert A, B) = A ∧ B Other verification features can be “compiled” to assume/assert statements (e.g., method calls) In SL, there are two analogous commands wp(assume* A, B) = A -̶ B (add A) wp(assert* A, B) = A * B (remove A)

Chalice : verification condition generation Overview Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) Kripke semantics over partial heaps Kripke semantics over total heaps Kripke semantics over total heaps ≡ ≡ Weakest pre-condition definitions Chalice : verification condition generation ≡

Implicit Dynamic Frames Extend first-order assertions to additionally include “accessibility predicates”: acc(x.f) is an assertion; we have permission to x.f Assertions can also include heap-dependent expressions: e.g., x.f > 3 Existing tool support is based on total heaps every thread sees a value for every heap location but these values are only guaranteed meaningful if the thread also holds permission to the location

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g)

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g) x.f

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g) x.f

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g) x.f 4

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g) x.f x.g 4

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g) Expressions include heap dereferences x.f x.g 4

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g) Expressions include heap dereferences Permissions need not match “read footprint” x.f x.g 4

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g) * y.f == 3 Expressions include heap dereferences Permissions need not match “read footprint” x.f x.g 4

Implicit Dynamic Frames For example acc(x.f) * x.f == 4 * acc(x.g) * y.f == 3 Expressions include heap dereferences Permissions might not match “read footprint” y.f x.f x.g 3 4

Inhale and Exhale “inhale p” and “exhale p” are used in Chalice to encode transfers between threads/calls “inhale p” means: assume heap properties in p gain permissions in p havoc newly-readable locations “exhale p” means: assert heap properties in p check and give up permissions void m() requires p ensures q { // inhale p ... // exhale p call m() // inhale q // exhale q }

Inhale and Exhale “inhale p” and “exhale p” are used in Chalice to encode transfers between threads/calls “inhale p” means: assume heap properties in p gain permissions in p havoc newly-readable locations “exhale p” means: assert heap properties in p check and give up permissions void m() requires p ensures q { // inhale p ... // exhale p call m() // inhale q // exhale q }

Inhale and Exhale “inhale p” and “exhale p” are used in Chalice to encode transfers between threads/calls “inhale p” means: assume heap properties in p gain permissions in p havoc newly-readable locations “exhale p” means: assert heap properties in p check and give up permissions void m() requires p ensures q { // inhale p ... // exhale p call m() // inhale q // exhale q }

Inhale and Exhale “inhale p” and “exhale p” are used in Chalice to encode transfers between threads/calls “inhale p” means: assume heap properties in p gain permissions in p havoc newly-readable locations “exhale p” means: assert heap properties in p check and give up permissions void m() requires p ensures q { // inhale p ... // exhale p call m() // inhale q // exhale q }

Inhale and Exhale “inhale p” and “exhale p” are used in Chalice to encode transfers between threads/calls “inhale p” means: assume heap properties in p gain permissions in p havoc newly-readable locations “exhale p” means: assert heap properties in p check and give up permissions void m() requires p ensures q { // inhale p ... // exhale p call m() // inhale q // exhale q }

Inhale and Exhale “inhale p” and “exhale p” are used in Chalice to encode transfers between threads/calls “inhale p” means: assume heap properties in p gain permissions in p havoc newly-readable locations “exhale p” means: assert heap properties in p check and give up permissions void m() requires p ensures q { // inhale p ... // exhale p call m() // inhale q // exhale q }

Inhale and Exhale “inhale p” and “exhale p” are used in Chalice to encode transfers between threads/calls “inhale p” means: assume heap properties in p gain permissions in p havoc newly-readable locations “exhale p” means: assert heap properties in p check and give up permissions void m() requires p ensures q { // inhale p ... // exhale p call m() // inhale q // exhale q }

Self-framing Inhaled assertions model new information passed from another thread/method call etc. But, this information must be “framed” by suitable permissions, to be sound to assume Inhaled/exhaled assertions are required to be “self-framing”: essentially, they include enough permissions to preserve the truth of their heap assertions e.g., acc(x.f)*x.f==4 but not x.f==4 alone x.f==4 is meaningful only along with permission

? Overview Separation Logic (SL) Implicit Dynamic Frames (IDF) Kripke semantics over partial heaps ? Weakest pre-condition definitions Chalice : verification condition generation

How can we formally relate the two? A common semantics? Separation Logic Chalice Controls access to heap locations along with values Semantics defined in terms of partial heaps Key connectives defined by adding/removing heap fragments Controls permissions and values separately Semantics defined via translation, and total heaps Encoding defined by modification of global maps for heap and permissions How can we formally relate the two?

Total Heaps Permission Logic (TPL) Basically, a union of the syntaxes of SL and IDF Semantics defined over total heaps... Expressions (can access the heap, as in IDF) E ::= E.f | E + E | n | x | … Assertions (both acc and “points to” predicates) A,B ::= acc(x.f) | x.f ↦ v | E = E | A * B | … Intuition: x.f ↦ v ⇔ acc(x.f) * x.f = v

A*B Separation Logic partial heap IDF total heap A A B B

A*B Separation Logic partial heap IDF total heap A A B B

A*B A A B B Separation Logic partial heap IDF total heap 4 4 7 7 3 3 2 4 4 A A 7 7 B B 3 3 2 2 4 7 3 2

A*B A A B B Separation Logic partial heap IDF total heap 4 4 7 7 3 3 2 4 4 A A 7 7 B B 3 3 2 2 4 7 3 2

Heap agreement up to permissions IDF total heap IDF total heap IDF total heap 4 4 7 7 3 3 2 2 4 4 7 7 3 3 2 2

Heap agreement up to permissions IDF total heap IDF total heap 4 1 4 4 7 7 3 3 2 2 9 4 3 2 7 3 9 1 2

Self-framing revisited An assertion is self-framing if:

Self-framing revisited An assertion is self-framing if: For any heap and permission mask satisfying it, assertion remains true if we replace the heap with any that agrees on the permissions IDF total heap 4 7 3 2 4 7 3 2

Self-framing revisited An assertion is self-framing if: For any heap and permission mask satisfying it, assertion remains true if we replace the heap with any that agrees on the permissions IDF total heap 4 1 4 7 3 2 9 3 2 9 1

Self-framing revisited An assertion is self-framing if: For any heap and permission mask satisfying it, assertion remains true if we replace the heap with any that agrees on the permissions IDF total heap 6 2 4 7 3 2 2 1 4 5 8

Self-framing revisited An assertion is self-framing if: For any heap and permission mask satisfying it, assertion remains true if we replace the heap with any that agrees on the permissions IDF total heap 4 7 3 2 4 7 3 2

Self-framing revisited An assertion is self-framing if: For any heap and permission mask satisfying it, assertion remains true if we replace the heap with any that agrees on the permissions Separation Logic partial heap 4 7 3 2 In Separation Logic, there would be partial heap which canonically represents all the total ones in our semantics

P ̶ Q Separation Logic partial heap IDF total heap

P ̶ Q Separation Logic partial heap IDF total heap P

P ̶ Q Separation Logic partial heap IDF total heap P

P ̶ Q Separation Logic partial heap IDF total heap P Q

P ̶ Q Separation Logic partial heap IDF total heap P Q

P ̶ Q Separation Logic partial heap IDF total heap P P ? Q

How to model heap extension? Separation Logic IDF total heap The semantics of implication and magic wand connectives are defined in terms of partial heap extensions. h ⊨ A⇒B iff ∀h’( h ⊎ h’ ⊨ A ⇒ h ⊎ h’ ⊨ B) What should this mean for our total heaps model? P ?

How to model heap extension? Idea 1: IDF total heap Just add extra permissions to the original state Problem: We attach significance to the values that were previously stored in the heap, at the new locations P ?

How to model heap extension? Idea 2: IDF total heap Assign new (arbitrary) values to unreadable heap locations, and then add new permissions P ?

How to model heap extension? Idea 2: IDF total heap Assign new (arbitrary) values to unreadable heap locations, and then add new permissions P ?

How to model heap extension? Idea 2: IDF total heap Assign new (arbitrary) values to unreadable heap locations, and then add new permissions P ?

How to model heap extension? Idea 2: IDF total heap Assign new (arbitrary) values to unreadable heap locations, and then add new permissions P ?

How to model heap extension? Idea 2: IDF total heap Assign new (arbitrary) values to unreadable heap locations, and then add new permissions P ?

How to model heap extension? Idea 2: IDF total heap Assign new (arbitrary) values to unreadable heap locations, and then add new permissions P ?

How to model heap extension? Idea 2: IDF total heap Assign new (arbitrary) values to unreadable heap locations, and then add new permissions Problem: In IDF, P may involve heap-dependent expressions P ?

How to model heap extension? Idea 2: IDF total heap Assign new (arbitrary) values to unreadable heap locations, and then add new permissions Problem: In IDF, P may involve heap-dependent expressions For example, acc(x.f) * (x.f ≠ null ⇒ acc(x.f.g)) The intention is that the meaning of x.f is fixed by the permission “elsewhere” But, when we judge the implication, if we consider assigning arbitrary values to x.f, then we lose the meaning

Minimal Permission Extensions Idea: only consider “extending” the state by the smallest amount possible We modify the SL semantics: h ⊨ A⇒B iff ∀h’( h ⊎ h’ ⊨ A ⇒ h ⊎ h’ ⊨ B)

Minimal Permission Extensions Idea: only consider “extending” the state by the smallest amount possible We modify the SL semantics to be: h ⊨ A⇒B iff ∀h’( h ⊎ h’ ⊨ A ∧ ∀h’’(h’’⊂ h’ ⇒ h ⊎ h’ ⊨ A) ⇒ h ⊎ h’ ⊨ B) We only consider adding the minimal extensions For (intuitionistic) SL, this makes no difference But this adapts well to our total heaps model... /

Faithfully represents separation logic Definition: the restriction of a total heap H to permissions P, is a partial heap H↾P defined by: (H↾P)(x,f) = H(x,f) provided P(x,f) > 0, (H↾P)(x,f) is undefined otherwise. Theorem If A is a separation logic assertion, then: H,P ⊧ A in TPL ⇔ H↾P ⊧ A in SL

≡ ≡ ? Overview Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) Kripke semantics over partial heaps Kripke semantics over total heaps Kripke semantics over total heaps ≡ ≡ Weakest pre-condition definitions ? Chalice : verification condition generation

Chalice Weakest Pre-conditions Encoded using two global map variables H : represents the values in the heap P : represents the permissions to access heap For example, wpch(inhale(acc(E.f)), A) = wpch(P[E,f] += 1, A) wpch(inhale(a*b), A) = wpch(inhale(a);inhale(b), A)

Translating TPL to many sorted FOL Expressions ⌊⌊x⌋⌋ = x ⌊⌊ E.f ⌋⌋ = H [ ⌊⌊E⌋⌋ , f ] Formulae ⌊⌊acc(E.f)⌋⌋ = P [⌊⌊E⌋⌋,f] == 1 ⌊⌊A*B⌋⌋ = ∃P1,P2. ⌊⌊A⌋⌋ [P1/P] ∧ ⌊⌊B⌋⌋[P2/P] ∧ P1 * P2 = P P1 * P2 = P ⇔ ∀i. P1[i] + P2[i] = P[i] ∧ P[i] ≤ 1

Key points of the proof All existentials of array type introduced by ⌊⌊ ⌋⌋ are witnessed in Chalice VCs. Self-framing is checked in Chalice by a syntactic (left-to-right) criterion, which is stronger than the semantic notion. Note: asymmetry (left-to-right checking) of self-framing is essential for Chalice VC for inhale.

Faithfully representing Chalice Theorem wpch (exhale p, ⌊⌊ A ⌋⌋) ⇔ ⌊⌊wpsl(assert* p, A)⌋⌋ If p is (syntactically) self-framing, then wpch(inhale p, ⌊⌊ A ⌋⌋) ⇔ ⌊⌊wpsl(assume* p, A)⌋⌋

⊂ ⊃ ≡ ≡ ≡ Summary Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) ⊂ ⊃ Kripke semantics over partial heaps Kripke semantics over total heaps Kripke semantics over total heaps ≡ ≡ Weakest pre-condition definitions Chalice : verification condition generation ≡

Summary We defined the first direct semantics for IDF We defined a total heaps semantics for SL We have formally connected the two logics We can encode SL assertions as IDF assertions We have defined a novel semantics for SL implication and magic wand connectives We have proven equivalence between weakest pre-conditions in SL and IDF

Advantages for Separation Logic We can use our work to provide a new way of verifying separation logic specifications Apply our encoding to convert specification to IDF, then feed it to e.g., Chalice Allows the verification of separation logic directly with an SMT solver Requires (ongoing) extension to handle abstract predicates New semantics with minimal extensions may be more easily implementable in automatic tools.

Advantages for Implicit Dynamic Frames The existence of a formal semantics helps with evaluating potential extensions to the logic Also facilitates soundness proofs for the methodology and (ultimately) the tools We’ve defined a compatible semantics for many previously-unsupported connectives Useful connectives such as the magic wand and logical disjunction could be added to tools

Future/Ongoing work Improving the encoding of abstract predicates (and heap functions) in Chalice Formalisation of the extended logic, and soundness proof based on this semantics Extending Chalice with more connectives – aided by our new formal semantics Mapping separation logic examples to implicit dynamic frames, for automatic verification

Thank you for listening.. Separation Logic (SL) Total Permissions Logic (TPL) Implicit Dynamic Frames (IDF) ⊂ ⊃ Kripke semantics over partial heaps Kripke semantics over total heaps Kripke semantics over total heaps ≡ ≡ Weakest pre-condition definitions Chalice : verification condition generation ≡