Undecidability of propositional separation logic and its neighbours - - PowerPoint PPT Presentation

undecidability of propositional separation logic and its
SMART_READER_LITE
LIVE PREVIEW

Undecidability of propositional separation logic and its neighbours - - PowerPoint PPT Presentation

Undecidability of propositional separation logic and its neighbours James Brotherston 1 and Max Kanovich 2 1 Imperial College London 2 Queen Mary University of London LICS-25, University of Edinburgh, 12 July 2010 Separation logic (Reynolds,


slide-1
SLIDE 1

Undecidability of propositional separation logic and its neighbours

James Brotherston1 and Max Kanovich2

1Imperial College London 2Queen Mary University of London

LICS-25, University of Edinburgh, 12 July 2010

slide-2
SLIDE 2

Separation logic (Reynolds, O’Hearn)

  • Separation logic is a formalism for reasoning about

memory.

slide-3
SLIDE 3

Separation logic (Reynolds, O’Hearn)

  • Separation logic is a formalism for reasoning about

memory.

  • Separation models are cancellative partial commutative

monoids H, ◦, E (E ⊆ H is a set of units).

slide-4
SLIDE 4

Separation logic (Reynolds, O’Hearn)

  • Separation logic is a formalism for reasoning about

memory.

  • Separation models are cancellative partial commutative

monoids H, ◦, E (E ⊆ H is a set of units).

  • Propositional formulas combine standard Boolean

connectives with “multiplicatives” ∗, — ∗ and I.

slide-5
SLIDE 5

Separation logic (Reynolds, O’Hearn)

  • Separation logic is a formalism for reasoning about

memory.

  • Separation models are cancellative partial commutative

monoids H, ◦, E (E ⊆ H is a set of units).

  • Propositional formulas combine standard Boolean

connectives with “multiplicatives” ∗, — ∗ and I.

  • Separating conjunction F ∗ G defined by:

h | =ρ F1 ∗ F2 ⇔ h = h1 ◦ h2 and h1 | =ρ F1 and h2 | =ρ F2

slide-6
SLIDE 6

Separation logic (Reynolds, O’Hearn)

  • Separation logic is a formalism for reasoning about

memory.

  • Separation models are cancellative partial commutative

monoids H, ◦, E (E ⊆ H is a set of units).

  • Propositional formulas combine standard Boolean

connectives with “multiplicatives” ∗, — ∗ and I.

  • Separating conjunction F ∗ G defined by:

h | =ρ F1 ∗ F2 ⇔ h = h1 ◦ h2 and h1 | =ρ F1 and h2 | =ρ F2

  • Archetypal heap models are H, ◦, {e}, where

H = L ⇀fin RV is a set of heaps, e is the empty heap, and

  • is (partial) union of disjoint heaps.

(Variations: stacks-and-heaps, heaps with permissions)

slide-7
SLIDE 7

Validity: concrete models vs. classes of models

  • F is valid in H, ◦, E if h |

=ρ F for all h ∈ H and for all valuations ρ of propositional variables.

slide-8
SLIDE 8

Validity: concrete models vs. classes of models

  • F is valid in H, ◦, E if h |

=ρ F for all h ∈ H and for all valuations ρ of propositional variables.

  • Applications of separation logic are typically based on a

fixed, heap-like model.

slide-9
SLIDE 9

Validity: concrete models vs. classes of models

  • F is valid in H, ◦, E if h |

=ρ F for all h ∈ H and for all valuations ρ of propositional variables.

  • Applications of separation logic are typically based on a

fixed, heap-like model.

  • Validity in such a model is a subtler problem than validity

in classes of models:

slide-10
SLIDE 10

Validity: concrete models vs. classes of models

  • F is valid in H, ◦, E if h |

=ρ F for all h ∈ H and for all valuations ρ of propositional variables.

  • Applications of separation logic are typically based on a

fixed, heap-like model.

  • Validity in such a model is a subtler problem than validity

in classes of models:

  • Normally, to show a property Q given that F is valid in a

class of models C, one chooses some model M ∈ C such that (F valid in M) → Q;

slide-11
SLIDE 11

Validity: concrete models vs. classes of models

  • F is valid in H, ◦, E if h |

=ρ F for all h ∈ H and for all valuations ρ of propositional variables.

  • Applications of separation logic are typically based on a

fixed, heap-like model.

  • Validity in such a model is a subtler problem than validity

in classes of models:

  • Normally, to show a property Q given that F is valid in a

class of models C, one chooses some model M ∈ C such that (F valid in M) → Q;

  • but, when M is given in advance, we have no such freedom!
slide-12
SLIDE 12

Axiomatisations of separation logic

  • BI, which is intuitionistic logic plus the MILL axioms and

rules for I, ∗ and — ∗;

slide-13
SLIDE 13

Axiomatisations of separation logic

  • BI, which is intuitionistic logic plus the MILL axioms and

rules for I, ∗ and — ∗;

  • BBI, which is BI plus ¬¬A ⊢ A;
slide-14
SLIDE 14

Axiomatisations of separation logic

  • BI, which is intuitionistic logic plus the MILL axioms and

rules for I, ∗ and — ∗;

  • BBI, which is BI plus ¬¬A ⊢ A;
  • BBI+eW where eW is I ∧ (A ∗ B) ⊢ I ∧ A, which says

“you can’t split the empty heap into two non-empty heaps”;

slide-15
SLIDE 15

Axiomatisations of separation logic

  • BI, which is intuitionistic logic plus the MILL axioms and

rules for I, ∗ and — ∗;

  • BBI, which is BI plus ¬¬A ⊢ A;
  • BBI+eW where eW is I ∧ (A ∗ B) ⊢ I ∧ A, which says

“you can’t split the empty heap into two non-empty heaps”;

  • BBI+W where W is A ∗ B ⊢ A. This system collapses into

classical logic!

slide-16
SLIDE 16

Axiomatisations of separation logic

  • BI, which is intuitionistic logic plus the MILL axioms and

rules for I, ∗ and — ∗;

  • BBI, which is BI plus ¬¬A ⊢ A;
  • BBI+eW where eW is I ∧ (A ∗ B) ⊢ I ∧ A, which says

“you can’t split the empty heap into two non-empty heaps”;

  • BBI+W where W is A ∗ B ⊢ A. This system collapses into

classical logic! NB.

  • 1. BI ⊂ BBI ⊂ BBI+eW ⊂ BBI+W, and both BI, BBI+W

are decidable;

slide-17
SLIDE 17

Axiomatisations of separation logic

  • BI, which is intuitionistic logic plus the MILL axioms and

rules for I, ∗ and — ∗;

  • BBI, which is BI plus ¬¬A ⊢ A;
  • BBI+eW where eW is I ∧ (A ∗ B) ⊢ I ∧ A, which says

“you can’t split the empty heap into two non-empty heaps”;

  • BBI+W where W is A ∗ B ⊢ A. This system collapses into

classical logic! NB.

  • 1. BI ⊂ BBI ⊂ BBI+eW ⊂ BBI+W, and both BI, BBI+W

are decidable;

  • 2. BBI, BBI+eW are (obviously) incomplete wrt. validity in

particular concrete models.

slide-18
SLIDE 18

Undecidability

machine M terminates from configuration C

(M is a non-deterministic, 2-counter Minsky machine.)

slide-19
SLIDE 19

Undecidability

machine M terminates from configuration C FM,C provable in Minimal BBI

  • Thm. 3.1

(M is a non-deterministic, 2-counter Minsky machine.)

slide-20
SLIDE 20

Undecidability

FM,C valid in any chosen heap-like model machine M terminates from configuration C FM,C provable in Minimal BBI

  • Thm. 4.2
  • Thm. 3.1

(M is a non-deterministic, 2-counter Minsky machine.)

slide-21
SLIDE 21

Undecidability

FM,C valid in any chosen heap-like model machine M terminates from configuration C FM,C valid in all separation models with indivisible units FM,C provable in Minimal BBI FM,C provable in BBI+eW FM,C valid in all separation models FM,C provable in BBI

  • Thm. 4.2
  • Thm. 3.1
  • Prop. 2.1
  • Prop. 2.1

(M is a non-deterministic, 2-counter Minsky machine.)

slide-22
SLIDE 22

Undecidability

FM,C valid in any chosen heap-like model machine M terminates from configuration C FM,C valid in all CBI-models with indivisible units FM,C valid in all separation models with indivisible units FM,C provable in Minimal BBI FM,C valid in all CBI-models FM,C provable in BBI+eW FM,C provable in CBI+eW FM,C valid in all separation models FM,C provable in BBI FM,C provable in CBI

  • Thm. 4.2
  • Thm. 7.1
  • Thm. 3.1
  • Prop. 2.1
  • Prop. 2.1
  • Prop. 7.1
  • Prop. 7.1

(M is a non-deterministic, 2-counter Minsky machine.)

slide-23
SLIDE 23

Finite valuations

Undecidability is intimately related to infinite valuations of the propositional variables (as sets of model elements): Theorem There is a sequent FM,C such that, for any heap-like model M:

  • FM,C is not valid in M, but;
  • FM,C is valid in M under every finite valuation!
slide-24
SLIDE 24

Finite valuations

Undecidability is intimately related to infinite valuations of the propositional variables (as sets of model elements): Theorem There is a sequent FM,C such that, for any heap-like model M:

  • FM,C is not valid in M, but;
  • FM,C is valid in M under every finite valuation!

So, to obtain decidable fragments of separation logic, one could:

  • 1. give up infinite valuations (Calcagno et al., FSTTCS’01);
slide-25
SLIDE 25

Finite valuations

Undecidability is intimately related to infinite valuations of the propositional variables (as sets of model elements): Theorem There is a sequent FM,C such that, for any heap-like model M:

  • FM,C is not valid in M, but;
  • FM,C is valid in M under every finite valuation!

So, to obtain decidable fragments of separation logic, one could:

  • 1. give up infinite valuations (Calcagno et al., FSTTCS’01);
  • 2. restrict the formula language (Berdine et al., FSTTCS’04).
slide-26
SLIDE 26

Summary

For the purely propositional fragment of separation logic, we have the following new results:

slide-27
SLIDE 27

Summary

For the purely propositional fragment of separation logic, we have the following new results:

  • validity in any given heap-like model is undecidable;
slide-28
SLIDE 28

Summary

For the purely propositional fragment of separation logic, we have the following new results:

  • validity in any given heap-like model is undecidable;
  • validity in such a model cannot be approximated by finite

valuations for propositional variables (which imposes restrictions on decidable fragments);

slide-29
SLIDE 29

Summary

For the purely propositional fragment of separation logic, we have the following new results:

  • validity in any given heap-like model is undecidable;
  • validity in such a model cannot be approximated by finite

valuations for propositional variables (which imposes restrictions on decidable fragments);

  • validity in various classes of models is undecidable;
slide-30
SLIDE 30

Summary

For the purely propositional fragment of separation logic, we have the following new results:

  • validity in any given heap-like model is undecidable;
  • validity in such a model cannot be approximated by finite

valuations for propositional variables (which imposes restrictions on decidable fragments);

  • validity in various classes of models is undecidable;
  • and provability in various axiomatisations (BBI, BBI+eW,

CBI, CBI+eW,. . . ) is undecidable too.

slide-31
SLIDE 31

Separation logic vs. linear logic

Separation logic obeys two principles which are highly unorthodox from the perspective of linear logic:

  • 1. The usual distributivity law

A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C)

  • 2. The exact equality

A ∗ B = A · B (In linear logic we typically have A ∗ B ⊆ A · B.) These two facts are entirely responsible for the undecidability of separation logic!