A modal type system for safe distributed computing Giuseppe - - PowerPoint PPT Presentation

a modal type system for safe distributed computing
SMART_READER_LITE
LIVE PREVIEW

A modal type system for safe distributed computing Giuseppe - - PowerPoint PPT Presentation

A modal type system for safe distributed computing Giuseppe Primiero FWO - Flemish Research Foundation Centre for Logic and Philosophy of Science, Ghent University Giuseppe.Primiero@Ugent.be http://www.philosophy.ugent.be/giuseppeprimiero/


slide-1
SLIDE 1

A modal type system for safe distributed computing

Giuseppe Primiero

FWO - Flemish Research Foundation Centre for Logic and Philosophy of Science, Ghent University Giuseppe.Primiero@Ugent.be http://www.philosophy.ugent.be/giuseppeprimiero/

PCC12, Copenhagen, 17th August 2012

slide-2
SLIDE 2

Outline

1

Background

2

Contextual Types with Multi-Modalities

3

The Operational Semantics

4

Conclusions

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 2 / 31

slide-3
SLIDE 3

1

Background

2

Contextual Types with Multi-Modalities

3

The Operational Semantics

4

Conclusions

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 3 / 31

slide-4
SLIDE 4

Logical Approaches to Distributed Programming

There is a great variety of systems that approach the issue of distributed programming in view of resource accessibility, safety, security, etc.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 3 / 31

slide-5
SLIDE 5

Logical Approaches to Distributed Programming

There is a great variety of systems that approach the issue of distributed programming in view of resource accessibility, safety, security, etc. The idea of using Curry-Howard based Semantics to this purpose is natural . . .

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 3 / 31

slide-6
SLIDE 6

Logical Approaches to Distributed Programming

There is a great variety of systems that approach the issue of distributed programming in view of resource accessibility, safety, security, etc. The idea of using Curry-Howard based Semantics to this purpose is natural . . . . . . and it has been very recently combined with the extension of the modal apparatus to gain more control on the notion of resources, their location and accessibility.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 3 / 31

slide-7
SLIDE 7

Some relevant works

A typed λ-calculus with stationary situations and flowing informations:

◮ [Borghuis and Feijs, 2000]: focus on the representation of the order

  • f commands and recover of data from locations.
  • G. Primiero (Ghent University)

Modal Type Theory PCC12 4 / 31

slide-8
SLIDE 8

Some relevant works

A typed λ-calculus with stationary situations and flowing informations:

◮ [Borghuis and Feijs, 2000]: focus on the representation of the order

  • f commands and recover of data from locations.

Type Theories for (safe) distributed and staged computing:

◮ [Davies and Pfenning, 2001], [Jia and Walker, 2004],

[Moody, 2003]: represent heterogeneity w.r.t. properties, resources, devices, software, services.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 4 / 31

slide-9
SLIDE 9

Some relevant works

A typed λ-calculus with stationary situations and flowing informations:

◮ [Borghuis and Feijs, 2000]: focus on the representation of the order

  • f commands and recover of data from locations.

Type Theories for (safe) distributed and staged computing:

◮ [Davies and Pfenning, 2001], [Jia and Walker, 2004],

[Moody, 2003]: represent heterogeneity w.r.t. properties, resources, devices, software, services.

Modal logics for local resources:

◮ [Park, 2006]: distinction between transmission of safe values and

safe code.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 4 / 31

slide-10
SLIDE 10

Some relevant works

A typed λ-calculus with stationary situations and flowing informations:

◮ [Borghuis and Feijs, 2000]: focus on the representation of the order

  • f commands and recover of data from locations.

Type Theories for (safe) distributed and staged computing:

◮ [Davies and Pfenning, 2001], [Jia and Walker, 2004],

[Moody, 2003]: represent heterogeneity w.r.t. properties, resources, devices, software, services.

Modal logics for local resources:

◮ [Park, 2006]: distinction between transmission of safe values and

safe code.

ILP with ✷ for certified mobile computing:

◮ [Bonelli and Feller, 2009]: code and certificate development;

corresponds to a variant of the intensional λ-calculus introduced in [Artemov and Bonelli, 2007]: operational interpretation for remote calls.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 4 / 31

slide-11
SLIDE 11

This contribution: meaning of expressions

We introduce a polymorphic typed system with multi-modal operators that distinguishes between safe values and safe code (extended from [Primiero, 2012]):

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 5 / 31

slide-12
SLIDE 12

This contribution: meaning of expressions

We introduce a polymorphic typed system with multi-modal operators that distinguishes between safe values and safe code (extended from [Primiero, 2012]):

◮ ai :A says that program a is executed at address i for specification

A, producing a safe value;

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 5 / 31

slide-13
SLIDE 13

This contribution: meaning of expressions

We introduce a polymorphic typed system with multi-modal operators that distinguishes between safe values and safe code (extended from [Primiero, 2012]):

◮ ai :A says that program a is executed at address i for specification

A, producing a safe value;

◮ xi :A says that code for specification A is validly executable at (and

bounded to) address i, producing mobile code;

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 5 / 31

slide-14
SLIDE 14

This contribution: meaning of expressions

We introduce a polymorphic typed system with multi-modal operators that distinguishes between safe values and safe code (extended from [Primiero, 2012]):

◮ ai :A says that program a is executed at address i for specification

A, producing a safe value;

◮ xi :A says that code for specification A is validly executable at (and

bounded to) address i, producing mobile code;

◮ ✷i(A true): “A is valid at every address accessible from i”;

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 5 / 31

slide-15
SLIDE 15

This contribution: meaning of expressions

We introduce a polymorphic typed system with multi-modal operators that distinguishes between safe values and safe code (extended from [Primiero, 2012]):

◮ ai :A says that program a is executed at address i for specification

A, producing a safe value;

◮ xi :A says that code for specification A is validly executable at (and

bounded to) address i, producing mobile code;

◮ ✷i(A true): “A is valid at every address accessible from i”; ◮ ✸i(A true): “A is executable from address i”;

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 5 / 31

slide-16
SLIDE 16

This contribution: meaning of expressions

We introduce a polymorphic typed system with multi-modal operators that distinguishes between safe values and safe code (extended from [Primiero, 2012]):

◮ ai :A says that program a is executed at address i for specification

A, producing a safe value;

◮ xi :A says that code for specification A is validly executable at (and

bounded to) address i, producing mobile code;

◮ ✷i(A true): “A is valid at every address accessible from i”; ◮ ✸i(A true): “A is executable from address i”; ◮ ◦Γ ⊢ ◦(A true): contexts describe networks in which code is

executed; their internal structure refers to ordered composition of commands.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 5 / 31

slide-17
SLIDE 17

Some Features

Language in an operational semantics with underlying Curry-Howard isomorphism:

◮ Categorical fragment used to interpret operations with safe values ◮ Functional fragment used to interpret distributed computations with

safe code

Modification of the standard interpretation of propositional modalities; Modalities are used to reason on the contexts/locations that are safe to the evaluation of the λ-terms.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 6 / 31

slide-18
SLIDE 18

This Contribution: sum up

The polymorphism and the resulting modal type system are used therefore to explore reasoning about distributed computing, obtaining Code Mobility Rules from corresponding properties of the modal

  • perators. Significant contributions of this work are:

1

the strong assumption on the polymorphic nature of codes and values, understood as locally and globally valid processes;

2

an alternative formulation and interpretation of (multi-)modalities for safe distributed computing;

3

the underlying operational semantics for the interpretation of distributed programs.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 7 / 31

slide-19
SLIDE 19

1

Background

2

Contextual Types with Multi-Modalities

3

The Operational Semantics

4

Conclusions

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 8 / 31

slide-20
SLIDE 20

Language

Definition (Kinds)

The set K =: {type, typeinf} contains the kind type of all specifications valid by everywhere executable programs, defined by term constructors C; the kind typeinf of specifications valid by locally executable codes, defined by variable constructors V.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 8 / 31

slide-21
SLIDE 21

Language

Definition (Kinds)

The set K =: {type, typeinf} contains the kind type of all specifications valid by everywhere executable programs, defined by term constructors C; the kind typeinf of specifications valid by locally executable codes, defined by variable constructors V.

Definition (Terms)

The set of terms T = {C, V} is given by: constructors C := {ai; (ai, bj); ai(bj); λ(ai(bj)); <ai, bj >}; variables V := {xi; (xi(bj)); (xi(bj))(ai)}.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 8 / 31

slide-22
SLIDE 22

Language

Definition (Kinds)

The set K =: {type, typeinf} contains the kind type of all specifications valid by everywhere executable programs, defined by term constructors C; the kind typeinf of specifications valid by locally executable codes, defined by variable constructors V.

Definition (Terms)

The set of terms T = {C, V} is given by: constructors C := {ai; (ai, bj); ai(bj); λ(ai(bj)); <ai, bj >}; variables V := {xi; (xi(bj)); (xi(bj))(ai)}. Judgements are generalised to their contextual form: Γi := ·, xi :Ai, ∆i ∆i := ·, ai :Ai

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 8 / 31

slide-23
SLIDE 23

Interpreting safe values

Definition (Introduction Rules for type)

The rules for signed expressions in the kind type are (Eliminations and Equality are omitted): ai :A Type Formation A type ai :A bj :B I∧ (ai, bj):A ∧ B ai :A LeftI l(ai):A ∨ B b:B RightI r(b):A ∨ B ai :A A type ⊢ bj :B I → ai(bj):A → B a1 :A, . . . , an :A ai :A ⊢ bj :B λ((ai(bj))A, B) I∀ (∀ai :A)B type a1 :A, . . . , an :A ai :A ⊢ bj :B (< ai, bj >, A, B) I∃ (∃ai :A)B type

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 9 / 31

slide-24
SLIDE 24

Interpreting safe code

Definition (Rules for typeinf)

The rules for signed expressions in the kind typeinf are: Local Validity Rule Γi, xj :A, ∆i ⊢ A typeinf A typeinf xi :A ⊢ bj :B Functional abstraction ((xi)bj):A ⊃ B A typeinf xi :A ⊢ bj :B ai :A β − conversion (xi(bj))(ai) = bj[a/x]i :B type[a/x]i ((xi−1(bj))A, B) (bj)[x/ai−1 := ai] α − conversion (ai(bj)):A → B

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 10 / 31

slide-25
SLIDE 25

Structural Rules

Lemma

Structural Rules for Weakening, Contraction and Exchange are admissible for type and (restrictedly for) typeinf expressions.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 11 / 31

slide-26
SLIDE 26

Truth Predicates

Definition (Semantic Judgements)

The sorting K induces truth definitions as follows: ∆i; · ⊢ ai :A GlobalTruth A true ∆i; Γj ⊢ xj :A LocalTruth ∆i; Γj ⊢ A true∗ where ∆ contains only valid assumptions of the form B type and Γ contains at least one true assumption of the form B typeinf, appropriately addressed at i.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 12 / 31

slide-27
SLIDE 27

The Modal Extension

We now induce modalities for expressions from the constructors for kinds, according to the following intuitive explanations:

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 13 / 31

slide-28
SLIDE 28

The Modal Extension

We now induce modalities for expressions from the constructors for kinds, according to the following intuitive explanations: ✷(A true):

◮ Program for A is everywhere satisfied; ◮ A true holds under any extension of globally valid conditions ∅, ∆.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 13 / 31

slide-29
SLIDE 29

The Modal Extension

We now induce modalities for expressions from the constructors for kinds, according to the following intuitive explanations: ✷(A true):

◮ Program for A is everywhere satisfied; ◮ A true holds under any extension of globally valid conditions ∅, ∆.

✸(A true):

◮ Program for A can be executed somewhere (where correctly

accessed);

◮ A true holds under some context extension ∆, Γ.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 13 / 31

slide-30
SLIDE 30

Introduction and Elimination for ✷

Definition (Rules for ✷GΣ)

Γi; xj :A ⊢ A true∗ ✷iΓ, [xj/aj]:A ⊢ A true I✷ ✷i∪jΣ ⊢ ✷i∪j(A true) ✷iΓ, aj :A ⊢ ✷i∪j(A true) ✷i∪j(A true), ✷k∆ ⊢ ✷∪(i,j,k)(B true) E✷ Γi, aj :A, ∆k ⊢ B true

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 14 / 31

slide-31
SLIDE 31

Introduction and Elimination for ✷

Definition (Rules for ✷GΣ)

Γi; xj :A ⊢ A true∗ ✷iΓ, [xj/aj]:A ⊢ A true I✷ ✷i∪jΣ ⊢ ✷i∪j(A true) ✷iΓ, aj :A ⊢ ✷i∪j(A true) ✷i∪j(A true), ✷k∆ ⊢ ✷∪(i,j,k)(B true) E✷ Γi, aj :A, ∆k ⊢ B true I-✷: if a program for A uses only safe values originating at i, j, then it can be executed everywhere in network G = {i, j} (induces an operational interpretation as Remote Procedure Call); E-✷: sends value A from i, j to G, where it can be used to evaluate B at any further accessible address k.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 14 / 31

slide-32
SLIDE 32

Introduction and Elimination for ✸

Definition (Rules for ✸GΣ)

Γi; xj :A ⊢ B true∗ I✸ ✸i∩jΣ ⊢ ✸i∩j(B true) ✷iΓ; ✸j∆ ⊢ ✸i∩j(A true) ✸j∆; xk :A ⊢ ✸j∩k(B true) E✸ Γi; ∆j ⊢ B true∗

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 15 / 31

slide-33
SLIDE 33

Introduction and Elimination for ✸

Definition (Rules for ✸GΣ)

Γi; xj :A ⊢ B true∗ I✸ ✸i∩jΣ ⊢ ✸i∩j(B true) ✷iΓ; ✸j∆ ⊢ ✸i∩j(A true) ✸j∆; xk :A ⊢ ✸j∩k(B true) E✸ Γi; ∆j ⊢ B true∗ I-✸: if value B requires safe code executable at i and j, then resources at the intersection of i, j are needed for any execution; it constructs a return value for a RPC; E-✸: from ✸i,j(A true) infer its variable constructor, then deriving local validity of B without the additional location of A.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 15 / 31

slide-34
SLIDE 34

Interaction among Modalities: Code Mobility Rules

Definition (Broadcast)

Broadcast is used to send to a specific additional address a safe value in the network G = {i, j}. ✷iΓ, aj :A ⊢ ✷i∪j(B true) xj :A ⊢ A true∗ ✷iΓ, ✸j(A true) ⊢ ✸i∩j(B true) (Broadcast)

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 16 / 31

slide-35
SLIDE 35

Interaction among Modalities: Code Mobility Rules

Definition (Broadcast)

Broadcast is used to send to a specific additional address a safe value in the network G = {i, j}. ✷iΓ, aj :A ⊢ ✷i∪j(B true) xj :A ⊢ A true∗ ✷iΓ, ✸j(A true) ⊢ ✸i∩j(B true) (Broadcast)

Definition (Rules)

Global Access is the reverse function that calls from a specific address within network G safe code that becomes executable at any address. ✷iΓ; xj :A ⊢ ✸i∩j(B true) aj :A ⊢ A true ✷iΓ, aj :A ⊢ ✷i∪j(B true) (Global Access)

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 16 / 31

slide-36
SLIDE 36

Interaction among Modalities: Some Properties

Definition (Admissible Rules)

Transmission (downward transitivity): if a process B′ at k uses code B at j, and B uses code A at i, then B at k uses A at i (for i < j < k ∈ G)

xi :A ⊢ A true∗ ✸j(B true)[✸i(A true)] ✸k(B′ true)[✸j(B true)] Transmission ✸i(A true) ⊢ ✸k(B′ true)

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 17 / 31

slide-37
SLIDE 37

Interaction among Modalities: Properties (cnt’d)

Definition

Upper Inclusion: if value for A is valid at k, then it can be accessed from any location i, j < k within that network

✷i∪jΣ ⊢ ✷k(A true) ✷i∪jΣ; ak :A ⊢ ✷∪(i,j,k)(A true) Upper Inclusion ✷∪(i,j,k)Σ ⊢ ✷i∪j(A true)

Definition (Admissible Rules)

Lower Inclusion: if value for A is valid at i, j, then it can be sent to any location k > i, j within that network;

✷iΓ, ✷j∆ ⊢ ✷i∪j(A true) ✷i∪jΣ ⊢ ✷k(A true) Lower Inclusion ✷∪(i,j,k)Σ ⊢ ✷k(A true)

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 18 / 31

slide-38
SLIDE 38

Interaction among Modalities: Properties (cnt’d)

Definition (Admissible Rules)

✷iΓ, ✷j∆ ⊢ ✷k(A true) Ascending Iteration ✷∪(i,j,k)Σ ⊢ ✷k(✷i∪j(A true)) ✷iΓ, ✷j∆ ⊢ ✷k(A true) Descending Iteration ✷∪(i,j,k)Σ ⊢ ✷i∪j(✷k(A true))

By Ascending Iteration, one can access at k a value for A executed at i, j whenever a program for A can be executed at k using values at i, j; by Descending Iteration, one can access at k a value for A executed at i, j, whenever a program for A is executable at k with values at i, j

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 19 / 31

slide-39
SLIDE 39

1

Background

2

Contextual Types with Multi-Modalities

3

The Operational Semantics

4

Conclusions

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 20 / 31

slide-40
SLIDE 40

Language

Definition (Syntax)

The syntax is defined by the following alphabet: Types := {α | α × β | α + β | α → β | α ⊃ β} Terms := {xi | ai, for i ∈ Indices} Indices := {1, . . . , n} Functions := {exec(α) | runi(α) | runi∪j(α · β) | runi∩j(α · β) | synchroj(β(exec(α)))}, where · = {+, ×} Contexts := {Γi | ◦iΓ}, where ◦ = {✷, ✸} Remote Operations := {GLOB(✷i∪jΓ, α) | BROAD(✸i∩jΓ, α)} Portable Code := {RET(Γi∪j, α) | SEND(Γi∩j, α)}

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 20 / 31

slide-41
SLIDE 41

Model

Syntactic expressions are then evaluated in a model defined by states of the machine.

Definition (Operational Model)

The set States := {S, S′, . . . } contains states of the machine. A state S := (C, t.i :α) | C ∈ Contexts; t ∈ Terms; i ∈ Indices; α ∈ Types is an occurrence of an indexed typed term in context. An operational model

  • f the procedural semantics for the machine is a model where each S is

evaluated by transition to some S′. An indexed transition system, called a Network Network := (S, →, I) is a triple with S ⊆ States, I ⊆ Indices and → a ternary relation over indexed states (S × I × S). If S, S′ ∈ S and i, j ∈ I, then → (S, i, j, S′) is written as Si → S′

j . This means that there is a transition → from state S valid

at index i to state S′ valid at index j defined according to the machine typing rules.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 21 / 31

slide-42
SLIDE 42

Operational Semantics (II)

Definition (Network State)

S → S′ run (Γi, xi :α) → (✸iΓ, runi(α)) exec (Γi, ai :α) → (✷iΓ, exec(α)) corun (Γi, runi(α) ⊢ bj :β) → (✷iΓ, runi∩j(α(β)) coexec (Γi, exec(α) ⊢ bj :β) → (✷iΓ, runi∪j(α(β)) synchro (✷iΓ, runi∪j(α(β)) → (✷iΓ, synchroj(β(exec(α)))) product (Γi, exec(α), exec(β)) → (✷iΓ, runi∩j(α × β)) extraction1 (✷iΓ, runi∩j(α × β)) → (✷iΓ, exec(α)) extraction2 (✷iΓ, runi∩j(α × β)) → (✷iΓ, exec(β)) tagunion (Γi, exec(α)) → (✷iΓ, runi∪j(α + β)) patternmatch1 (✷iΓ, runi∪j(α + β) ⊢ ck :γ) → (✷iΓ, runi∩k(α(γ))) patternmatch2 (✷iΓ, runi∪j(α + β) ⊢ ck :γ) → (✷iΓ, runj∩k(β(γ))) ✷1 (✷iΓ, exec(α)) → (GLOB(✷i∪jΓ, α)) ✷2 (✷i∪jΓ, α) → (RET(Γi∪j, α)) ✸1 (✸iΓ, runj(α)) → (BROAD(✸i∩jΓ, α)) ✸2 (✸i∩jΓ, α) → (SEND(Γi∩j, α))

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 22 / 31

slide-43
SLIDE 43

Rewriting Rules I

Global ∆i, ai :α ⊢ exec(α) Local Γi, xi :α; ∆i ⊢ runi(α) ai :α bj :β I× runi∩j(α × β) runi∩j(α × β) E × (l) exec(α) ai :α I + (1) runi(α + β) bj :β I + (2) runj(α + β)

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 23 / 31

slide-44
SLIDE 44

Rewriting Rules II

runi∪j(α + β) runi(α) ⊢ ck :γ runj(β) ⊢ ck :γ E+ runi∩k;j∩k(γ) xi :α runi(α) ⊢ bj :β I ⊃ runi∩j(α ⊃ β) ai :α exec(α) ⊢ bj :β I → runi∪j(α → β) runi∩j(α ⊃ β) ai :α Synchro synchroj(β(exec(α))) Γi, xj :α ⊢ runj(α) ✷iΓ, xj(aj) : α ⊢ exec(α) RPC1 GLOB(✷i∪jΓ, α) Γi, xj :α ⊢ runj(α) ✸iΓ ⊢ runj(α) RPC2 BROAD(✸i∩jΓ, α)

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 24 / 31

slide-45
SLIDE 45

Rewriting Rules III

✷iΓ, aj :α ⊢ exec(α) GLOB(✷i∪jΓ, α) PORT1 RET(Γi∪j, α) ✷iΓ, xj :α ⊢ runi∩j(α) BROAD(✸i∩jΓ, α) PORT2 SEND(Γi∩j, α)

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 25 / 31

slide-46
SLIDE 46

Safety

Theorem (Progress)

If S := (Γ, t.i :α), then either S → S′ or exec(α) is the output value.

Theorem (Preservation)

If S := (Γ, t.i :α) and S → S′, then S′ := (Γ, t′ :α).

Theorem (Type Safety)

Safety is satisfied by transformations (according to the table in Definition 17) or by terminating expression (exec(α)):

1

If S := (t.i :α), and S → S′, then S′ := (t.i :α);

2

If S := (t.i :α), then either exec(α) is the output value or there is α′ for S′ := (t.i :α′) s.t. S → S′.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 26 / 31

slide-47
SLIDE 47

1

Background

2

Contextual Types with Multi-Modalities

3

The Operational Semantics

4

Conclusions

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 27 / 31

slide-48
SLIDE 48

Results

Local soundness and completeness generalized from the expansion/reduction in the mono-modal case from [Primiero, 2012]; Substitution on terms and truth predicates; Theorems for Strong Normalization and Confluence via the Operational Semantics; Theorems for the equivalence of ✷i∪j to a CK-operator and ✸i∩j to a DK-operator.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 27 / 31

slide-49
SLIDE 49

Conclusions

We have introduced a Computational Interpretation for a Multimodal Type-Theory with indexed and ordered Contexts; It treats modalities in a structurally different way than other modal type theories; It has an operational interpretation via a Procedural Semantics; It can be interpreted for Trusted Communications ([Primiero and Taddeo, 2012]). Further Work: working paper on a notion of Dependent Evidence in ILP and extensions to Semantics for Error States in Distributed Setting.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 28 / 31

slide-50
SLIDE 50

References I

Artemov, S. and Bonelli, E. (2007). The intensional lambda calculus. In Proceedings of the international symposium on Logical Foundations of Computer Science, LFCS ’07, pages 12–25, Berlin, Heidelberg. Springer-Verlag. Bonelli, E. and Feller, F . (2009). The logic of proofs as a foundation for certifying mobile computation. In Artëmov, S. N. and Nerode, A., editors, LFCS, volume 5407 of Lecture Notes in Computer Science, pages 76–91. Springer. Borghuis, T. and Feijs, L. (2000). A constructive logic for services and information flow in computer networks. The Computer Journal, 43(4):274–289.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 29 / 31

slide-51
SLIDE 51

References II

Davies, R. and Pfenning, F . (2001). A modal analysis of staged computation. Journal of the ACM, 48(3):555–604. Jia, L. and Walker, D. (2004). Modal Proofs as Distributed Programs. In Programming Languages and Systems, ESOP2004, volume 2986 of Lectures Notes in Computer Science. Springer Verlag. Moody, J. (2003). Modal logic as a basis for distributed computation. Technical Report CMU-CS-03-194, School of Computer Science, Carnegie-Mellon University, Pittsburgh, PA, USA. Park, S. (2006). A modal language for the safety of mobile values. In In Fourth ASIAN Symposium on Programming Languages and Systems, pages 217–233. Springer.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 30 / 31

slide-52
SLIDE 52

References III

Primiero, G. (2012). A contextual type theory with judgemental modalities for reasoning from open assumptions. Logique & Analyse, 220. Primiero, G. and Taddeo, M. (2012). A modal type theory for formalizing trusted communications. Journal of Applied Logic, 10:92–114.

  • G. Primiero (Ghent University)

Modal Type Theory PCC12 31 / 31