On the Internal and External View of Graded Linear Logic Preston - - PowerPoint PPT Presentation

on the internal and external view of graded linear logic
SMART_READER_LITE
LIVE PREVIEW

On the Internal and External View of Graded Linear Logic Preston - - PowerPoint PPT Presentation

On the Internal and External View of Graded Linear Logic Preston Keel Harley Eades III 1 All data is not created equal Would you pass an integer around a program freely What about memory pointers 2 Getting to Grades: Linear Logic


slide-1
SLIDE 1

On the Internal and External View of Graded Linear Logic

Preston Keel Harley Eades III

1

slide-2
SLIDE 2

All data is not created equal

  • Would you pass an integer around a program

freely

  • What about memory pointers

2

slide-3
SLIDE 3

Getting to Grades: Linear Logic

  • Linear Logic
  • Resource conscience
  • used exactly once, used zero to many

!A

A

Γ ⊢ C Γ,!A ⊢ C Weak

Γ,!A,!A ⊢ C Γ,!A ⊢ C

Cont

3

slide-4
SLIDE 4

A → A ⊗ A

!A → A ⊗ A ⊗ A

A, A → A ⊗ A

!A, B → B

4

!A

slide-5
SLIDE 5

Getting to Grades: Bounded Linear Logic

  • Adding specifications for resource reuse
  • Aid in time complexity

5

slide-6
SLIDE 6

Getting to Grades: Bounded Linear Logic

  • Capture between one and any number of times
  • where can be used up to a natural

number, n, times

!A → !nA

A

6

slide-7
SLIDE 7

Graded Linear Logic

  • Generalize reuse bound of BLL to an arbitrary

  • f a semiring
  • Two forms: externally graded and internally

graded r ∈ R

(R,0, + ,1,*)

7

!rA

slide-8
SLIDE 8

Graded Linear Logic

  • Externally graded

where is of a resource algebra

  • Internally graded
  • New type annotation,

x1 : A1 ⊙ r1, . . . , xi : Ai ⊙ ri ⊢ t : B r ∈ R (R, * ,1, + ,0, ≤ ) x1 : A1, . . . , Ai : xi ⊢ t : B

□r A

8

slide-9
SLIDE 9

Two Sides…Same Coin

  • Inference rules of linear logic parallel rules for

graded linear logic

  • when eliminated introduces a discharged

formula into the context □r A A ⊙ r

Γ, A ⊢ B Γ,!A ⊢ B !Γ ⊢ B !Γ ⊢ !B

Γ, A ⊢ B Γ, □1 A ⊢ B

[Γ] ⊢ B r * Γ ⊢ □r B

9

slide-10
SLIDE 10

Two Sides…Same Coin

  • Internally graded context contain both linear, ,

and discharged, , hypotheses

  • Internally graded system makes use of external

grade information

A A ⊙ r

10

slide-11
SLIDE 11

Two Sides…Same Coin

  • New sequent calculus - Externally/Internally

Graded Linear Logic

  • Two fragments
  • Externally graded
  • Mixed externally/internally graded

X1 ⊙ r1, . . . , Xi ⊙ ri ⊢ B (X1 ⊙ r1, . . . , Xi ⊙ ri); (A1, . . . , Ai) ⊢ B

11

slide-12
SLIDE 12

How are they connected?

  • Can now be defined as
  • Externally graded linear logic underlies internally

graded linear logic

Γ1, X ⊙ r, Γ2 ⊢ A Γ1, FrX, Γ2 ⊢ A

FL

Γ1, A, Γ2 ⊢ B Γ1, GA ⊙ 1,Γ2 ⊢ B

GL

□r A

□r A = FrGA

12

slide-13
SLIDE 13

What can grades do?

Aprivate → Apublic Apublic → Aprivate

A[2..4] → A ⊗ A ⊗ A

13

slide-14
SLIDE 14

Structural Rules

  • Internally and externally graded systems

precisely control resources by controlling weakening and contraction

  • Non-optional with respect to the logic
  • Controlling exchange is often overlooked

14

slide-15
SLIDE 15

Structural Rules: Exchange

  • Useful when needing control over ordering
  • Mapping over lists, ordered communication
  • Applications in software verification and

interactive theorem proving

15

slide-16
SLIDE 16

Γ1, X ⊙ e(r1), Y ⊙ e(r2), Γ2 ⊢L A Γ1, Y ⊙ e(r2), X ⊙ e(r1), Γ2 ⊢L A

Γ1, X ⊙ e(r1), Y ⊙ r2, Γ2 ⊢L A Γ1, Y ⊙ r2, X ⊙ e(r1), Γ2 ⊢L A

□e(2) A

□2 A

16

slide-17
SLIDE 17

Structural Rules: Contraction and Weakening

  • Generalize system further to make these rules
  • ptional

Γ1, Γ2 ⊢ A 0 ∈ R Γ1, X ⊙ 0,Γ2 ⊢ A Γ1, X ⊙ r1, X ⊙ r2, Γ2 ⊢ A (r1 + r2) ∈ R Γ1, X ⊙ (r1 + r2), Γ2 ⊢ A

17

slide-18
SLIDE 18

Controlling structural rules

  • Contraction logic - no weakening
  • Affine logic - no contraction
  • Non-commutative and commutative versions

18

slide-19
SLIDE 19

Where we go from here

  • Understanding of substructural type systems
  • Higher order systems such as dependent types
  • Granule

19

slide-20
SLIDE 20

Questions ?

20