Sub-classical Boolean bunched logics and the meaning of par James - - PowerPoint PPT Presentation

sub classical boolean bunched logics and the meaning of
SMART_READER_LITE
LIVE PREVIEW

Sub-classical Boolean bunched logics and the meaning of par James - - PowerPoint PPT Presentation

Sub-classical Boolean bunched logics and the meaning of par James Brotherston (1) and Jules Villard (2) (1) University College London (2) Imperial College London /Facebook CSL, TU Berlin, Sept 2015 1/ 15 Bunched logics Bunched logics


slide-1
SLIDE 1

Sub-classical Boolean bunched logics and the meaning of par

James Brotherston (1) and Jules Villard (2)

(1) University College London (2) Imperial College London /Facebook

CSL, TU Berlin, Sept 2015

1/ 15

slide-2
SLIDE 2

Bunched logics

  • Bunched logics extend classical or intuitionistic logic with

various multiplicative connectives.

2/ 15

slide-3
SLIDE 3

Bunched logics

  • Bunched logics extend classical or intuitionistic logic with

various multiplicative connectives.

  • Formulas can be understood as sets of “worlds” (often

“resources”) in an underlying model.

2/ 15

slide-4
SLIDE 4

Bunched logics

  • Bunched logics extend classical or intuitionistic logic with

various multiplicative connectives.

  • Formulas can be understood as sets of “worlds” (often

“resources”) in an underlying model.

  • The multiplicatives generally denote composition
  • perations on these worlds.

2/ 15

slide-5
SLIDE 5

Bunched logics

  • Bunched logics extend classical or intuitionistic logic with

various multiplicative connectives.

  • Formulas can be understood as sets of “worlds” (often

“resources”) in an underlying model.

  • The multiplicatives generally denote composition
  • perations on these worlds.
  • Bunched logics are closely related to relevant logics and can

also be seen as (special) modal logics.

2/ 15

slide-6
SLIDE 6

BBI, proof-theoretically

Provability in the bunched logic BBI is given by extending classical logic by A ∗ B ⊢ B ∗ A A ∗ (B ∗ C) ⊢ (A ∗ B) ∗ C A ⊢ A ∗ ⊤∗ A ∗ ⊤∗ ⊢ A A1 ⊢ B1 A2 ⊢ B2 A1 ∗ A2 ⊢ B1 ∗ B2 A ∗ B ⊢ C A ⊢ B — ∗ C A ⊢ B — ∗ C A ∗ B ⊢ C (i.e., multiplicative intuitionistic linear logic.)

3/ 15

slide-7
SLIDE 7

BBI, semantically (1)

A BBI-model is given by W, ◦, E, where

  • W is a set (of “worlds”),

4/ 15

slide-8
SLIDE 8

BBI, semantically (1)

A BBI-model is given by W, ◦, E, where

  • W is a set (of “worlds”),
  • ◦ : W × W → P(W) is associative and commutative (we

extend ◦ pointwise to sets), and

4/ 15

slide-9
SLIDE 9

BBI, semantically (1)

A BBI-model is given by W, ◦, E, where

  • W is a set (of “worlds”),
  • ◦ : W × W → P(W) is associative and commutative (we

extend ◦ pointwise to sets), and

  • the set of units E ⊆ W satisfies w ◦ E = {w} for all w ∈ W.

4/ 15

slide-10
SLIDE 10

BBI, semantically (1)

A BBI-model is given by W, ◦, E, where

  • W is a set (of “worlds”),
  • ◦ : W × W → P(W) is associative and commutative (we

extend ◦ pointwise to sets), and

  • the set of units E ⊆ W satisfies w ◦ E = {w} for all w ∈ W.

Separation logic is based on heap models, e.g. H, ◦, {e}, where

4/ 15

slide-11
SLIDE 11

BBI, semantically (1)

A BBI-model is given by W, ◦, E, where

  • W is a set (of “worlds”),
  • ◦ : W × W → P(W) is associative and commutative (we

extend ◦ pointwise to sets), and

  • the set of units E ⊆ W satisfies w ◦ E = {w} for all w ∈ W.

Separation logic is based on heap models, e.g. H, ◦, {e}, where

  • H is the set of heaps, i.e. finite partial maps Loc ⇀fin Val,

4/ 15

slide-12
SLIDE 12

BBI, semantically (1)

A BBI-model is given by W, ◦, E, where

  • W is a set (of “worlds”),
  • ◦ : W × W → P(W) is associative and commutative (we

extend ◦ pointwise to sets), and

  • the set of units E ⊆ W satisfies w ◦ E = {w} for all w ∈ W.

Separation logic is based on heap models, e.g. H, ◦, {e}, where

  • H is the set of heaps, i.e. finite partial maps Loc ⇀fin Val,
  • ◦ is union of domain-disjoint heaps, and

4/ 15

slide-13
SLIDE 13

BBI, semantically (1)

A BBI-model is given by W, ◦, E, where

  • W is a set (of “worlds”),
  • ◦ : W × W → P(W) is associative and commutative (we

extend ◦ pointwise to sets), and

  • the set of units E ⊆ W satisfies w ◦ E = {w} for all w ∈ W.

Separation logic is based on heap models, e.g. H, ◦, {e}, where

  • H is the set of heaps, i.e. finite partial maps Loc ⇀fin Val,
  • ◦ is union of domain-disjoint heaps, and
  • e is the empty map.

4/ 15

slide-14
SLIDE 14

BBI, semantically (2)

Semantics of formula A w.r.t. BBI-model M = W, ◦, E, valuation ρ, and w ∈ W given by forcing relation w | =ρ A:

5/ 15

slide-15
SLIDE 15

BBI, semantically (2)

Semantics of formula A w.r.t. BBI-model M = W, ◦, E, valuation ρ, and w ∈ W given by forcing relation w | =ρ A:

w | =ρ P ⇔ w ∈ ρ(P)

5/ 15

slide-16
SLIDE 16

BBI, semantically (2)

Semantics of formula A w.r.t. BBI-model M = W, ◦, E, valuation ρ, and w ∈ W given by forcing relation w | =ρ A:

w | =ρ P ⇔ w ∈ ρ(P) . . . w | =ρ ⊤∗ ⇔ w ∈ E

5/ 15

slide-17
SLIDE 17

BBI, semantically (2)

Semantics of formula A w.r.t. BBI-model M = W, ◦, E, valuation ρ, and w ∈ W given by forcing relation w | =ρ A:

w | =ρ P ⇔ w ∈ ρ(P) . . . w | =ρ ⊤∗ ⇔ w ∈ E w | =ρ A1 ∗ A2 ⇔ w ∈ w1 ◦ w2 and w1 | =ρ A1 and w2 | =ρ A2

5/ 15

slide-18
SLIDE 18

BBI, semantically (2)

Semantics of formula A w.r.t. BBI-model M = W, ◦, E, valuation ρ, and w ∈ W given by forcing relation w | =ρ A:

w | =ρ P ⇔ w ∈ ρ(P) . . . w | =ρ ⊤∗ ⇔ w ∈ E w | =ρ A1 ∗ A2 ⇔ w ∈ w1 ◦ w2 and w1 | =ρ A1 and w2 | =ρ A2 w | =ρ A1 — ∗ A2 ⇔ ∀w′, w′′ ∈ W. if w′′ ∈ w ◦ w′ and w′ | =ρ A1 then w′′ | =ρ A2

5/ 15

slide-19
SLIDE 19

BBI, semantically (2)

Semantics of formula A w.r.t. BBI-model M = W, ◦, E, valuation ρ, and w ∈ W given by forcing relation w | =ρ A:

w | =ρ P ⇔ w ∈ ρ(P) . . . w | =ρ ⊤∗ ⇔ w ∈ E w | =ρ A1 ∗ A2 ⇔ w ∈ w1 ◦ w2 and w1 | =ρ A1 and w2 | =ρ A2 w | =ρ A1 — ∗ A2 ⇔ ∀w′, w′′ ∈ W. if w′′ ∈ w ◦ w′ and w′ | =ρ A1 then w′′ | =ρ A2 A is valid in M iff w | =ρ A for all ρ and w ∈ W.

5/ 15

slide-20
SLIDE 20

BBI, semantically (2)

Semantics of formula A w.r.t. BBI-model M = W, ◦, E, valuation ρ, and w ∈ W given by forcing relation w | =ρ A:

w | =ρ P ⇔ w ∈ ρ(P) . . . w | =ρ ⊤∗ ⇔ w ∈ E w | =ρ A1 ∗ A2 ⇔ w ∈ w1 ◦ w2 and w1 | =ρ A1 and w2 | =ρ A2 w | =ρ A1 — ∗ A2 ⇔ ∀w′, w′′ ∈ W. if w′′ ∈ w ◦ w′ and w′ | =ρ A1 then w′′ | =ρ A2 A is valid in M iff w | =ρ A for all ρ and w ∈ W. Theorem (Galmiche and Larchey-Wendling, 2006) A formula is BBI-provable iff it is valid in all BBI-models.

5/ 15

slide-21
SLIDE 21

Motivating question

  • ∗ is understood as a resource-sensitive version of

conjunction (with — ∗ its adjoint implication).

6/ 15

slide-22
SLIDE 22

Motivating question

  • ∗ is understood as a resource-sensitive version of

conjunction (with — ∗ its adjoint implication).

  • Might there be a resource-sensitive version of disjunction?

6/ 15

slide-23
SLIDE 23

Motivating question

  • ∗ is understood as a resource-sensitive version of

conjunction (with — ∗ its adjoint implication).

  • Might there be a resource-sensitive version of disjunction?
  • If so, then
  • how should we interpret it?

6/ 15

slide-24
SLIDE 24

Motivating question

  • ∗ is understood as a resource-sensitive version of

conjunction (with — ∗ its adjoint implication).

  • Might there be a resource-sensitive version of disjunction?
  • If so, then
  • how should we interpret it?
  • what logical properties ought it to have? and

6/ 15

slide-25
SLIDE 25

Motivating question

  • ∗ is understood as a resource-sensitive version of

conjunction (with — ∗ its adjoint implication).

  • Might there be a resource-sensitive version of disjunction?
  • If so, then
  • how should we interpret it?
  • what logical properties ought it to have? and
  • can we find natural models in which it makes sense?

6/ 15

slide-26
SLIDE 26

First answer: Classical BI

  • Classical BI (CBI) is classical logic plus classical

multiplicative linear logic.

7/ 15

slide-27
SLIDE 27

First answer: Classical BI

  • Classical BI (CBI) is classical logic plus classical

multiplicative linear logic.

  • CBI-models are given by W, ◦, E, U, where W, ◦, E is a

BBI-model, and U ⊆ W satisfies:

7/ 15

slide-28
SLIDE 28

First answer: Classical BI

  • Classical BI (CBI) is classical logic plus classical

multiplicative linear logic.

  • CBI-models are given by W, ◦, E, U, where W, ◦, E is a

BBI-model, and U ⊆ W satisfies: ∀w ∈ W. ∃ unique −w ∈ W. (w ◦ −w) ∩ U = ∅

7/ 15

slide-29
SLIDE 29

First answer: Classical BI

  • Classical BI (CBI) is classical logic plus classical

multiplicative linear logic.

  • CBI-models are given by W, ◦, E, U, where W, ◦, E is a

BBI-model, and U ⊆ W satisfies: ∀w ∈ W. ∃ unique −w ∈ W. (w ◦ −w) ∩ U = ∅

  • That is, every world w has a unique “dual” −w. Models

include Abelian groups, bit arrays, regular languages, etc.

7/ 15

slide-30
SLIDE 30

First answer: Classical BI

  • Classical BI (CBI) is classical logic plus classical

multiplicative linear logic.

  • CBI-models are given by W, ◦, E, U, where W, ◦, E is a

BBI-model, and U ⊆ W satisfies: ∀w ∈ W. ∃ unique −w ∈ W. (w ◦ −w) ∩ U = ∅

  • That is, every world w has a unique “dual” −w. Models

include Abelian groups, bit arrays, regular languages, etc.

  • Negation defined by w |

= ∼A ⇔ −w | = A.

7/ 15

slide-31
SLIDE 31

First answer: Classical BI

  • Classical BI (CBI) is classical logic plus classical

multiplicative linear logic.

  • CBI-models are given by W, ◦, E, U, where W, ◦, E is a

BBI-model, and U ⊆ W satisfies: ∀w ∈ W. ∃ unique −w ∈ W. (w ◦ −w) ∩ U = ∅

  • That is, every world w has a unique “dual” −w. Models

include Abelian groups, bit arrays, regular languages, etc.

  • Negation defined by w |

= ∼A ⇔ −w | = A.

  • We have ∼∼A ≡ A and A ∗

∨ B =def ∼(∼A ∗ ∼B).

7/ 15

slide-32
SLIDE 32

CBI is (often) too strong

  • Many BBI-models cannot be made into CBI-models,

because worlds in those models don’t have natural duals.

8/ 15

slide-33
SLIDE 33

CBI is (often) too strong

  • Many BBI-models cannot be made into CBI-models,

because worlds in those models don’t have natural duals.

  • There is no U ⊆ N such that N, +, {0}, U is a CBI-model.

8/ 15

slide-34
SLIDE 34

CBI is (often) too strong

  • Many BBI-models cannot be made into CBI-models,

because worlds in those models don’t have natural duals.

  • There is no U ⊆ N such that N, +, {0}, U is a CBI-model.
  • Similarly, for the heap model, there is no U ⊆ H such that

H, ◦, {e}, U is a CBI-model.

8/ 15

slide-35
SLIDE 35

BiBBI: Sub-classical BBI

We add multiplicative disjunction ∗ ∨, coimplication

\ and (maybe) falsum ⊥

∗ to BBI via the following rules:

9/ 15

slide-36
SLIDE 36

BiBBI: Sub-classical BBI

We add multiplicative disjunction ∗ ∨, coimplication

\ and (maybe) falsum ⊥

∗ to BBI via the following rules:

Monotonicity: Residuation: Commutativity: A1 ⊢ B1 A2 ⊢ B2 A1

∨ A2 ⊢ B1

∨ B2 A ⊢ B ∗ ∨ C = = = = = = = = = A

\ B ⊢ C A ∗ ∨ B ⊢ B ∗ ∨ A (Other principles are considered optional!)

9/ 15

slide-37
SLIDE 37

Semantics of BiBBI

A basic BiBBI-model is given by W, ◦, E, ▽, U, where

  • W, ◦, E is a BBI-model,

10/ 15

slide-38
SLIDE 38

Semantics of BiBBI

A basic BiBBI-model is given by W, ◦, E, ▽, U, where

  • W, ◦, E is a BBI-model,
  • ▽: W × W → P(W) (extended pointwise to sets), and

10/ 15

slide-39
SLIDE 39

Semantics of BiBBI

A basic BiBBI-model is given by W, ◦, E, ▽, U, where

  • W, ◦, E is a BBI-model,
  • ▽: W × W → P(W) (extended pointwise to sets), and
  • U ⊆ W.

10/ 15

slide-40
SLIDE 40

Semantics of BiBBI

A basic BiBBI-model is given by W, ◦, E, ▽, U, where

  • W, ◦, E is a BBI-model,
  • ▽: W × W → P(W) (extended pointwise to sets), and
  • U ⊆ W.

Forcing relation for new connectives: w | =ρ A ∗ ∨ B ⇔ ∀w1, w2 ∈ W. w ∈ w1 ▽ w2 implies w1 | =ρ A or w2 | =ρ B

10/ 15

slide-41
SLIDE 41

Semantics of BiBBI

A basic BiBBI-model is given by W, ◦, E, ▽, U, where

  • W, ◦, E is a BBI-model,
  • ▽: W × W → P(W) (extended pointwise to sets), and
  • U ⊆ W.

Forcing relation for new connectives: w | =ρ A ∗ ∨ B ⇔ ∀w1, w2 ∈ W. w ∈ w1 ▽ w2 implies w1 | =ρ A or w2 | =ρ B w | =ρ A

\ B ⇔ w′′ ∈ w′ ▽ w and w′′ | =ρ A and w′ | =ρ B

10/ 15

slide-42
SLIDE 42

Semantics of BiBBI

A basic BiBBI-model is given by W, ◦, E, ▽, U, where

  • W, ◦, E is a BBI-model,
  • ▽: W × W → P(W) (extended pointwise to sets), and
  • U ⊆ W.

Forcing relation for new connectives: w | =ρ A ∗ ∨ B ⇔ ∀w1, w2 ∈ W. w ∈ w1 ▽ w2 implies w1 | =ρ A or w2 | =ρ B w | =ρ A

\ B ⇔ w′′ ∈ w′ ▽ w and w′′ | =ρ A and w′ | =ρ B w | =ρ ⊥

⇔ w ∈ U This is compatible with CBI interpretation of these connectives.

10/ 15

slide-43
SLIDE 43

Bells and whistles

Principle Axiom Model condition Associativity A ∗ ∨ (B ∗ ∨ C) ⊢ (A ∗ ∨ B) ∗ ∨ C w1 ▽ (w2 ▽ w3) = (w1 ▽ w2) ▽ w3 Unit expansion A ⊢ A ∗ ∨ ⊥

w ▽ U ⊆ {w} Unit contraction A ∗ ∨ ⊥

∗ ⊢ A

w ∈ w ▽ U Contraction A ∗ ∨ A ⊢ A w ∈ w ▽ w Weak distribution A ∗ (B ∗ ∨ C) ⊢ (A ∗ B) ∗ ∨ C (x1 ◦ x2) ∩ (y1 ▽ y2) = ∅ implies ∃w. y1 ∈ x1 ◦ w and x2 ∈ w ▽ y2 Classicality ∼∼A ⊢ A ∃!−w. (w ◦ −w) ∩ U = ∅

Theorem Each axiom defines the corresponding model condition.

11/ 15

slide-44
SLIDE 44

Some technical results

For any collection A of axioms from our table, we have:

12/ 15

slide-45
SLIDE 45

Some technical results

For any collection A of axioms from our table, we have: Theorem A BiBBI-formula is provable in BiBBI + A iff it is valid in the corresponding subclass of basic BiBBI-models.

12/ 15

slide-46
SLIDE 46

Some technical results

For any collection A of axioms from our table, we have: Theorem A BiBBI-formula is provable in BiBBI + A iff it is valid in the corresponding subclass of basic BiBBI-models. (Completeness is by embedding BiBBI + A into a Sahlqvist fragment of modal logic.)

12/ 15

slide-47
SLIDE 47

Some technical results

For any collection A of axioms from our table, we have: Theorem A BiBBI-formula is provable in BiBBI + A iff it is valid in the corresponding subclass of basic BiBBI-models. (Completeness is by embedding BiBBI + A into a Sahlqvist fragment of modal logic.) Theorem There is a display calculus proof system for BiBBI + A that is both complete and cut-eliminating.

12/ 15

slide-48
SLIDE 48

Weak distribution principle

  • The most interesting versions of BiBBI are those satisfying

weak distribution: A ∗ (B ∗ ∨ C) ⊢ (A ∗ B) ∗ ∨ C which is a consequence of De Morgan equivalences (so holds in CBI), but not vice versa

13/ 15

slide-49
SLIDE 49

Weak distribution principle

  • The most interesting versions of BiBBI are those satisfying

weak distribution: A ∗ (B ∗ ∨ C) ⊢ (A ∗ B) ∗ ∨ C which is a consequence of De Morgan equivalences (so holds in CBI), but not vice versa

  • At the model level, this corresponds to:

(x1 ◦ x2) ∩ (y1 ▽ y2) = ∅ implies ∃w. y1 ∈ x1 ◦ w and x2 ∈ w ▽ y2

13/ 15

slide-50
SLIDE 50

Weak distribution principle

  • The most interesting versions of BiBBI are those satisfying

weak distribution: A ∗ (B ∗ ∨ C) ⊢ (A ∗ B) ∗ ∨ C which is a consequence of De Morgan equivalences (so holds in CBI), but not vice versa

  • At the model level, this corresponds to:

(x1 ◦ x2) ∩ (y1 ▽ y2) = ∅ implies ∃w. y1 ∈ x1 ◦ w and x2 ∈ w ▽ y2

  • If ⊥

∗ is a unit for ∗

∨, we obtain the disjunctive syllogism: A ∗ (∼A ∗ ∨ B) ⊢ B.

13/ 15

slide-51
SLIDE 51

Heap intersection

In the heap model, we can obtain a weak-distributive ▽ via at least two kinds of heap intersection:

14/ 15

slide-52
SLIDE 52

Heap intersection

In the heap model, we can obtain a weak-distributive ▽ via at least two kinds of heap intersection: Definition Define h ▽ h′ to be the intersection of (partial functions) h and h′ if h(ℓ) = h′(ℓ) for all ℓ ∈ dom(h) ∩ dom(h′), and undefined

  • therwise.

14/ 15

slide-53
SLIDE 53

Heap intersection

In the heap model, we can obtain a weak-distributive ▽ via at least two kinds of heap intersection: Definition Define h ▽ h′ to be the intersection of (partial functions) h and h′ if h(ℓ) = h′(ℓ) for all ℓ ∈ dom(h) ∩ dom(h′), and undefined

  • therwise.

Definition Define h ▽ h′ to be the intersection of h and h′ only where h(ℓ) = h′(ℓ).

14/ 15

slide-54
SLIDE 54

Heap intersection

In the heap model, we can obtain a weak-distributive ▽ via at least two kinds of heap intersection: Definition Define h ▽ h′ to be the intersection of (partial functions) h and h′ if h(ℓ) = h′(ℓ) for all ℓ ∈ dom(h) ∩ dom(h′), and undefined

  • therwise.

Definition Define h ▽ h′ to be the intersection of h and h′ only where h(ℓ) = h′(ℓ). The second is associative, but not the first. Neither intersection has a unit!

14/ 15

slide-55
SLIDE 55

Future work

  • The paper has quite a bit more about constructing models
  • f different fragments of BiBBI.

15/ 15

slide-56
SLIDE 56

Future work

  • The paper has quite a bit more about constructing models
  • f different fragments of BiBBI.
  • Better (non)conservativity results for various fragments

15/ 15

slide-57
SLIDE 57

Future work

  • The paper has quite a bit more about constructing models
  • f different fragments of BiBBI.
  • Better (non)conservativity results for various fragments
  • Explore further the space of models

15/ 15

slide-58
SLIDE 58

Future work

  • The paper has quite a bit more about constructing models
  • f different fragments of BiBBI.
  • Better (non)conservativity results for various fragments
  • Explore further the space of models
  • Applications of ∗

∨,

\ etc., in program analysis?

15/ 15

slide-59
SLIDE 59

Future work

  • The paper has quite a bit more about constructing models
  • f different fragments of BiBBI.
  • Better (non)conservativity results for various fragments
  • Explore further the space of models
  • Applications of ∗

∨,

\ etc., in program analysis?

Thanks for listening!

15/ 15