• Aucun résultat trouvé

A logical framework for incremental type-checking

N/A
N/A
Protected

Academic year: 2022

Partager "A logical framework for incremental type-checking"

Copied!
90
0
0

Texte intégral

(1)

A logical framework for incremental type-checking

Matthias Puech1,2 Yann R´egis-Gianas2

1Dept. of Computer Science, University of Bologna

2University Paris 7, CNRS, and INRIA, PPS, teamπr2

May 2011

CEA LIST

(2)

A paradoxical situation

Observation

We have powerful tools to mechanize the metatheory of (proof) languages

. . . And yet,

Workflow of programming and formal mathematics is still largely inspired by legacy software development (emacs,make,svn, diffs. . . )

Isn’t it time to make these tools metatheory-aware?

(3)

A paradoxical situation

Observation

We have powerful tools to mechanize the metatheory of (proof) languages

. . . And yet,

Workflow of programming and formal mathematics is still largely inspired by legacy software development (emacs,make,svn, diffs. . . )

Isn’t it time to make these tools metatheory-aware?

(4)

A paradoxical situation

Observation

We have powerful tools to mechanize the metatheory of (proof) languages

. . . And yet,

Workflow of programming and formal mathematics is still largely inspired by legacy software development (emacs,make,svn, diffs. . . )

Isn’t it time to make these tools metatheory-aware?

(5)

Incrementality in programming & proof languages

Q :

Do you spend more timewritingcode oreditingcode?

Today, we use:

separate compilation

dependency management

version control on the scripts

interactive toplevel with rollback (Coq)

(6)

Incrementality in programming & proof languages

(7)

Incrementality in programming & proof languages

(8)

Incrementality in programming & proof languages

(9)

Incrementality in programming & proof languages

(10)

Incrementality in programming & proof languages

(11)

Incrementality in programming & proof languages

(12)

Incrementality in programming & proof languages

(13)

Incrementality in programming & proof languages

(14)

In an ideal world. . .

Edition should be possible anywhere

The impact of changes visible “in real time”

No need for separate compilation, dependency management

Types are good witnesses of this impact

Applications

non-(linear|batch) user interaction

typed version control systems

type-directed programming

tactic languages

(15)

In an ideal world. . .

Edition should be possible anywhere

The impact of changes visible “in real time”

No need for separate compilation, dependency management

Types are good witnesses of this impact

Applications

non-(linear|batch) user interaction

typed version control systems

type-directed programming

tactic languages

(16)

In an ideal world. . .

Edition should be possible anywhere

The impact of changes visible “in real time”

No need for separate compilation, dependency management

Types are good witnesses of this impact

Applications

non-(linear|batch) user interaction

typed version control systems

type-directed programming

(17)

In this talk, we focus on. . .

. . . building a procedure to type-checklocal changes

What data structure for storing type derivations?

What language for expressing changes?

(18)

Menu

The big picture

Incremental type-checking Why not memoization?

Our approach

Two-passes type-checking The data-oriented way A metalanguage of repository

The LF logical framework Monadic LF

Committing to MLF

(19)

Menu

The big picture

Incremental type-checking Why not memoization?

Our approach

Two-passes type-checking The data-oriented way

A metalanguage of repository The LF logical framework Monadic LF

Committing to MLF

(20)

The big picture

version management script files

parsing type-checking

AST representation

Typing annotations

(21)

The big picture

version management

script files parsing

type-checking

AST representation

Typing annotations

(22)

The big picture

script files

version management

parsing type-checking

AST representation

Typing annotations

(23)

The big picture

script files parsing

version management type-checking

AST representation

Typing annotations

(24)

The big picture

script files parsing

version management type-checking

AST representation

Typing annotations

(25)

The big picture

user interaction parsing

version management type-checking

AST representation

Typing annotations

(26)

The big picture

user interaction parsing

type-checking

version management

AST representation

Typing annotations

(27)

The big picture

user interaction parsing

incremental type-checking version management

AST representation

Typing annotations

(28)

A logical framework for incremental type-checking

Yes, we’re speaking about (any) typed language.

A type-checker

val check : env →term →types → bool

builds and checks the derivation (on the stack)

conscientiously discards it

i

i

i

e

AB, BC, A`BC Ax AB, BC, A`ABAx

AB, BC, A`AAx

AB, BC, A`B e

AB, BC, A`C AB, BC`AC AB`(BC)AC

`(AB)(BC)AC

(29)

A logical framework for incremental type-checking

Yes, we’re speaking about (any) typed language.

A type-checker

val check : env →term →types → bool

builds and checks the derivation (on the stack)

conscientiously discards it

i

i

e

AB, BC, A`BC Ax AB, BC, A`ABAx

AB, BC, A`AAx

AB, BC, A`B e

AB, BC, A`C AB, BC`AC AB`(BC)AC

(30)

A logical framework for incremental type-checking

Yes, we’re speaking about (any) typed language.

A type-checker

val check : env →term →types → bool

builds and checks the derivation (on the stack)

conscientiously discards it

true

(31)

A logical framework for incremental type-checking

Goal Type-check a large derivation taking advantage of the knowledge from type-checking previous versions Idea Remember all derivations!

More precisely

Given a well-typedR:repository and aδ :deltaand apply:repository→delta→derivation , an incremental type-checker

tc:repository→delta→bool decides ifapply(δ,R) is well-typed inO(|δ|).

(and notO(|apply(δ,R)|))

(32)

A logical framework for incremental type-checking

Goal Type-check a large derivation taking advantage of the knowledge from type-checking previous versions Idea Remember all derivations!

More precisely

Given a well-typedR:repository and aδ :deltaand apply:repository→delta→derivation , an incremental type-checker

tc:repository→delta→bool

(33)

A logical framework for incremental type-checking

Goal Type-check a large derivation taking advantage of the knowledge from type-checking previous versions Idea Remember all derivations!

More precisely

Given a well-typedR:repository and aδ :deltaand apply:repository→delta→derivation , an incremental type-checker

tc:repository→delta→repository option

(34)

A logical framework for incremental type-checking

Goal Type-check a large derivation taking advantage of the knowledge from type-checking previous versions Idea Remember all derivations!

from

to

(35)

Memoization maybe?

let rec check env t a = matcht with

| ... → ... false

| ... → ... true and infer env t =

matcht with

| ... → ... None

| ... → ... Some a

Syntactically

+ lightweight, efficient implementation + repository=table,delta=t

– syntactic comparison (no quotient on judgements)

What if I wante.g. weakening or permutation to be taken into account?

Semantically

– external to the type system (meta-cut)

What does it mean logically?

JΓ Γ`JwfΓ

Γ1`J1wfΓ2 . . . Γn−1[Jn−1]`JnwfΓn Γ1`JwfΓn[Jn][J]

– imperative (introduces a dissymmetry)

Mixes two goals: derivation synthesis &object reuse

(36)

Memoization maybe?

let table =ref ([] : environ × term×types)in let rec check env t a =

if List .mem (env,t,a) ! table then true else matchtwith

| ... → ... false

| ... → ... table := (env, t ,a )::! table ; true and infer env t =

try List . assoc (env, t) ! table with Not found→ matchtwith

| ... → ... None

| ... → ... table := (env, t ,a )::! table ; Some a

Syntactically

+ lightweight, efficient implementation + repository=table,delta=t

– syntactic comparison (no quotient on judgements)

What if I wante.g. weakening or permutation to be taken into account?

Semantically

– external to the type system (meta-cut)

What does it mean logically?

JΓ Γ`JwfΓ

Γ1`J1wfΓ2 . . . Γn−1[Jn−1]`JnwfΓn Γ1`JwfΓn[Jn][J]

– imperative (introduces a dissymmetry)

Mixes two goals: derivation synthesis &object reuse

(37)

Memoization maybe?

Syntactically

+ lightweight, efficient implementation

+ repository=table,delta=t

– syntactic comparison (no quotient on judgements)

What if I wante.g. weakening or permutation to be taken into account?

Semantically

– external to the type system (meta-cut)

What does it mean logically?

JΓ Γ`JwfΓ

Γ1`J1wfΓ2 . . . Γn−1[Jn−1]`JnwfΓn Γ1`JwfΓn[Jn][J]

– imperative (introduces a dissymmetry)

Mixes two goals: derivation synthesis &object reuse

(38)

Memoization maybe?

Syntactically

+ lightweight, efficient implementation + repository=table,delta=t

– syntactic comparison (no quotient on judgements)

What if I wante.g. weakening or permutation to be taken into account?

Semantically

– external to the type system (meta-cut)

What does it mean logically?

JΓ Γ`JwfΓ

Γ1`J1wfΓ2 . . . Γn−1[Jn−1]`JnwfΓn Γ1`JwfΓn[Jn][J]

– imperative (introduces a dissymmetry)

Mixes two goals: derivation synthesis &object reuse

(39)

Memoization maybe?

Syntactically

+ lightweight, efficient implementation + repository=table,delta=t

– syntactic comparison (no quotient on judgements)

What if I wante.g. weakening or permutation to be taken into account?

Semantically

– external to the type system (meta-cut)

What does it mean logically?

JΓ Γ`JwfΓ

Γ1`J1wfΓ2 . . . Γn−1[Jn−1]`JnwfΓn Γ1`JwfΓn[Jn][J]

– imperative (introduces a dissymmetry)

Mixes two goals: derivation synthesis &object reuse

(40)

Memoization maybe?

Syntactically

+ lightweight, efficient implementation + repository=table,delta=t

– syntactic comparison (no quotient on judgements)

What if I wante.g. weakening or permutation to be taken into account?

Semantically

– external to the type system (meta-cut)

What does it mean logically?

JΓ Γ`JwfΓ

Γ1`J1wfΓ2 . . . Γn−1[Jn−1]`JnwfΓn Γ1`JwfΓn[Jn][J]

– imperative (introduces a dissymmetry)

Mixes two goals: derivation synthesis &object reuse

(41)

Memoization maybe?

Syntactically

+ lightweight, efficient implementation + repository=table,delta=t

– syntactic comparison (no quotient on judgements)

What if I wante.g. weakening or permutation to be taken into account?

Semantically

– external to the type system (meta-cut)

What does it mean logically?

JΓ Γ`JwfΓ

Γ1`J1wfΓ2 . . . Γn−1[Jn−1]`JnwfΓn Γ1`JwfΓn[Jn][J]

– imperative (introduces a dissymmetry)

Mixes two goals: derivation synthesis &object reuse

(42)

Memoization maybe?

Syntactically

+ lightweight, efficient implementation + repository=table,delta=t

– syntactic comparison (no quotient on judgements)

What if I wante.g. weakening or permutation to be taken into account?

Semantically

– external to the type system (meta-cut)

What does it mean logically?

JΓ Γ`JwfΓ

Γ1`J1wfΓ2 . . . Γn−1[Jn−1]`JnwfΓn Γ1`JwfΓn[Jn][J]

– imperative (introduces a dissymmetry)

(43)

Menu

The big picture

Incremental type-checking Why not memoization?

Our approach

Two-passes type-checking The data-oriented way A metalanguage of repository

The LF logical framework Monadic LF

Committing to MLF

(44)

Two-passes type-checking

ti = type inference = derivation delta synthesis tc = type checking = derivation delta checking

δ = program delta δLF = derivation delta

R = repository of derivations

Shift of trust: ti(complex, ad-hoc algorithm)→ tc (simple, generic kernel)

(45)

Two-passes type-checking

ti = type inference = derivation delta synthesis tc = type checking = derivation delta checking

δ = program delta δLF = derivation delta

R = repository of derivations

(46)

A popular storage model for directories

/

/foo /bar

/foo/a /bar/b /bar/c

v1

(47)

A popular storage model for directories

/

/foo /bar

/foo/a /bar/b /bar/c

/

/bar

/bar/c'

v1

/foo

/foo/a /bar/b

(48)

A popular storage model for directories

/

/foo /bar

/foo/a /bar/b /bar/c

/

/bar

/bar/c'

v1

(49)

A popular storage model for directories

/

/foo /bar

/foo/a /bar/b /bar/c

/

/bar

/bar/c'

v1

v2

(50)

A popular storage model for directories

/

/foo /bar

/foo/a /bar/b /bar/c

/

/bar

99dcf1d 46f9c2 923ace3

c328e8f d54c809

6e4f99a

4244e8a

cf189a6

e33478f

/bar/c'

v1

v2

820e7ab

a85f0b77

(51)

A popular storage model for directories

/

/foo /bar

/foo/a /bar/b /bar/c

/

/bar

99dcf1d 46f9c2 923ace3

c328e8f d54c809

6e4f99a

4244e8a

cf189a6

e33478f 99dcf1d → "Hello World"

d54c809 → 46f9c2, 923ace3 6ef99a → 99dcf1d 4244e8a → 6e4f99a, d54c809

/bar/c'

v1

v2

820e7ab

a85f0b77

(52)

A popular storage model for directories

/

/foo /bar

/foo/a /bar/b /bar/c

/

/bar

99dcf1d 46f9c2 923ace3

c328e8f d54c809

6e4f99a

4244e8a

cf189a6

e33478f 99dcf1d → "Hello World"

d54c809 → 46f9c2, 923ace3 6ef99a → 99dcf1d 4244e8a → 6e4f99a, d54c809

/bar/c'

v1

v2

820e7ab

a85f0b77 a85f0b77

(53)

A popular storage model for directories

The repositoryRis a pair (∆, x):

∆ :x7→(Commit (x×y) |Tree~x |Blob string)

Operations

commit δ extend the database with Tree/Blob objects

add a Commit object

update head

checkout v follow v all the way to theBlobs diff v1 v2 follow simultaneously v1 and v2

if object names are equal, stop (content is equal)

(54)

A popular storage model for directories

The repositoryRis a pair (∆, x):

∆ :x7→(Commit (x×y) |Tree~x |Blob string)

Invariants

∆ forms a DAG

if (x,Commit (y, z))∈∆ then

I (y,Tree t)

I (z,Commit(t, v))

if (x,Tree(~y))∈∆ then

for all yi, either (yi,Tree(~z)) or (yi,Blob(s))∈∆

(55)

A popular storage model for directories

The repositoryRis a pair (∆, x):

∆ :x7→(Commit (x×y) |Tree~x |Blob string)

Invariants

∆ forms a DAG

if (x,Commit (y, z))∈∆ then

I (y,Tree t)

I (z,Commit(t, v))

if (x,Tree(~y))∈∆ then

for all yi, either (yi,Tree(~z)) or (yi,Blob(s))∈∆

(56)

A typed repository of proofs

v1 - - : ⊢ C

λ- : ⊢(A∧B)→C -,- : ⊢ A∧B π₁ : A∧B⊢C π₂ : ⊢A π₃ : ⊢B

(57)

A typed repository of proofs

- - : ⊢ C v1

- - : ⊢ C λ- : ⊢(A∧B)→C

-,- : ⊢ A∧B -,- : ⊢ A∧B

π₁ : A∧B⊢C π₂ : ⊢A π₃ : ⊢B

π₃' : ⊢B

λ- : ⊢(A∧B)→C

π₁ : A∧B⊢C π₂ : ⊢A

(58)

A typed repository of proofs

- - : ⊢ C v1

- - : ⊢ C λ- : ⊢(A∧B)→C

-,- : ⊢ A∧B -,- : ⊢ A∧B

π₁ : A∧B⊢C π₂ : ⊢A π₃ : ⊢B

π₃' : ⊢B

(59)

A typed repository of proofs

- - : ⊢ C v1

v2 - - : ⊢ C

λ- : ⊢(A∧B)→C

-,- : ⊢ A∧B -,- : ⊢ A∧B

π₁ : A∧B⊢C π₂ : ⊢A π₃ : ⊢B

π₃' : ⊢B

(60)

A typed repository of proofs

- - : ⊢ C v1

v2 - - : ⊢ C

λ- : ⊢(A∧B)→C

-,- : ⊢ A∧B -,- : ⊢ A∧B

π₁ : A∧B⊢C π₂ : ⊢A π₃ : ⊢B

π₃' : ⊢B

x y z

t

v w

s r

q u p

(61)

A typed repository of proofs

x=. . . :AB`C y=. . . :`A z=. . . :`B

t=λa:AB·x:`ABC u= (y, z) : `AB

v=t u:`C

w=Commit(v, w1) :Version

(62)

A typed repository of proofs

x=. . . :AB`C y=. . . :`A z=. . . :`B

t=λa:AB·x:`ABC u= (y, z) : `AB

v=t u:`C

w=Commit(v, w1) :Version , w

(63)

A typed repository of proofs

x=. . . :AB`C y=. . . :`A z=. . . :`B

t=λa:AB·x:`ABC u= (y, z) : `AB

v=t u:`C

w=Commit(v, w1) :Version p=. . . :`B

q= (y, p) :`AB r=t q:`C

s=Commit(r, w) :Version

(64)

A typed repository of proofs

x=. . . :AB`C y=. . . :`A z=. . . :`B

t=λa:AB·x:`ABC u= (y, z) : `AB

v=t u:`C

w=Commit(v, w1) :Version p=. . . :`B

q= (y, p) :`AB r=t q:`C

s=Commit(r, w) :Version , s

(65)

A data-oriented notion of delta

The first-order case

A delta is a term twithvariables x, y , defined in the repository

(66)

A data-oriented notion of delta

The binder case

A delta is a term twithvariables x, yand boxes[t]{x/u}y.n to jump over binders in the repository

(67)

A data-oriented notion of delta

The binder case

A delta is a term twithvariables x, yand boxes[t]{x/u}y.n to jump over binders in the repository

(68)

Towards a metalanguage of proof repository

Repository language 1. name all proof steps 2. annote them by judgement Delta language

1. address sub-proofs (variables) 2. instantiate lambdas (boxes) 3. check against R

Need extra-logical features!

(69)

Towards a metalanguage of proof repository

Repository language 1. name all proof steps 2. annote them by judgement Delta language

1. address sub-proofs (variables) 2. instantiate lambdas (boxes) 3. check against R

Need extra-logical features!

(70)

Menu

The big picture

Incremental type-checking Why not memoization?

Our approach

Two-passes type-checking The data-oriented way

A metalanguage of repository The LF logical framework Monadic LF

Committing to MLF

(71)

A logical framework for incremental type-checking

LF [Harper et al. 1992] (a.k.a. λΠ) provides a meta-logicto represent and validate syntax, rules and proofs of anobject language, by means of a typedλ-calculus.

dependent types to express object-judgements signature to encode the object language

higher-order abstract syntax to easily manipulate hypothesis

Examples

[x:A] .. . t:B λx·t:AB

is-lam: ΠA, B:ty·Πt:tmtm· (Πx:tm·isx Ais(t x)B) is(lamA(λx·t x))(arrA B)

[x:N]

λx·x:NN

is-lam nat nat(λx·x) (λyz·z) :is(lam nat(λx·x)) (arr nat nat)

(72)

A logical framework for incremental type-checking

LF [Harper et al. 1992] (a.k.a. λΠ) provides a meta-logicto represent and validate syntax, rules and proofs of anobject language, by means of a typedλ-calculus.

dependent types to express object-judgements signature to encode the object language

higher-order abstract syntax to easily manipulate hypothesis Examples

[x:A]

.. . t:B λx·t:AB

is-lam: ΠA, B:ty·Πt:tmtm·

(Πx:tm·isx Ais(t x)B) is(lamA(λx·t x))(arrA B)

[x:N]

λx·x:NN

is-lam nat nat(λx·x) (λyz·z) :is(lam nat(λx·x)) (arr nat nat)

(73)

A logical framework for incremental type-checking

Syntax

K ::= Πx:A·K | ∗ A ::= Πx:A·A |a(l)

t ::= λx:A·t |x(l)|c(l) l ::= · |t, l

Σ ::= · |Σ[c:A]|Σ[a:K]

Judgements

Γ`ΣK

Γ`ΣA:K

(74)

The delta language

Syntax

K ::= Πx:A·K | ∗ A ::= Πx:A·A |a(l)

t ::= λx:A·t |x(l)|c(l) |[t]{x/t}x.n l ::= · |t, l

Σ ::= · |Σ[c:A]|Σ[a:K]

Judgements

R,Γ`ΣK ⇒ R

R,Γ`ΣA:K ⇒ R

R,Γ`Σt:A⇒ R

Informally

R,Γ`Σ x⇒ Rmeans

“I am what x stands for, in Γ or inR (and produceR)”.

R,Γ`Σ [t]{x/u}y.n ⇒ R0 means

“Variable y has the form (v . . . vn−1(λx· R00). . .) in R.

(75)

Naming of proof steps

Remark

In LF, proof step = term application spine Exampleis-lam nat nat (λx·x) (λyz·z) Monadic Normal Form (MNF)

Program transformation, IR for FP compilers

Goal: sequentialize all computations by naming them (lets)

t ::= λx·t|t(l)|x l ::= · |t, l =⇒

t ::= retv |let x=v(l) in t|v(l) l ::= · |v, l

v ::= x |λx·t Examples

f(g(x)) ∈/ MNF

λx·f(g(λy·y, x)) =⇒

ret(λx·leta=g(λy·y, x)in f(a))

(76)

Naming of proof steps

Positionality inefficiency let x=. . . in

lety =. . .in let z=. . .in

... v(l)

=⇒

x=. . . y=. . . z=. . . ...

`v(l)

Non-positional monadic calculus

t ::= retv |σ`v(l) l ::= · |v, l

v ::= x|λx·t σ : x7→v(l)

(77)

Naming of proof steps

Positionality inefficiency let x=. . . in

lety =. . .in let z=. . .in

... v(l)

=⇒

x=. . . y=. . . z=. . . ...

`v(l)

Non-positional monadic calculus

t ::= retv |σ`v(l) l ::= · |v, l

v ::= x|λx·t σ : x7→v(l)

(78)

Naming of proof steps

Positionality inefficiency let x=. . . in

lety =. . .in let z=. . .in

... v(l)

=⇒

x=. . . y=. . . z=. . . ...

`v(l)

Non-positional monadic calculus

t ::= retv |letx=v(l)in t |v(l) l ::= · |v, l

(79)

Naming of proof steps

Positionality inefficiency let x=. . . in

lety =. . .in let z=. . .in

... v(l)

=⇒

x=. . . y=. . . z=. . . ...

`v(l)

Non-positional monadic calculus

t ::= retv |σ `v(l) l ::= · |v, l

(80)

Naming of proof steps

Positionality inefficiency let x=. . . in

lety =. . .in let z=. . .in

... v(l)

=⇒

x=. . . y=. . . z=. . . ...

`v(l)

Non-positional monadic calculus

t ::= retv |σ`v(l) l ::= · |v, l

(81)

Monadic LF

K ::= Πx:A·K | ∗ A ::= Πx:A·A |σ`a(l)

t ::= retv |σ `h(l) h ::= x |c

l ::= · |v, l

v ::= c|x |λx:A·t σ : x7→h(l)

Σ ::= · |Σ[c:A]|Σ[a:K]

(82)

Monadic LF

K ::= Πx:A·K | ∗ A ::= Πx:A·A |σ`a(l)

t ::= retv |σ `h(l) h ::= x |c

l ::= · |v, l

v ::= c|x |λx:A·t σ : x7→h(l)

Σ ::= · |Σ[c:A]|Σ[a:K]

(83)

Monadic LF

K ::= Πx:A·K | ∗ A ::= Πx:A·A |σ`a(l)

t ::= σ`h(l) h ::= x |c

l ::= · |v, l

v ::= c|x |λx:A·t σ : x7→h(l)

Σ ::= · |Σ[c:A]|Σ[a:K]

(84)

Type annotation

Remark

In LF, judgement annotation = type annotation Example

is-lam nat nat(λx·x) (λyz·z)

:is(lam nat (λx·x)) (arr nat nat)

K ::= Πx:A·K | ∗ A ::= Πx:A·A |σ `a(l) R ::= σ`h(l) :a(l)

h ::= x |a l ::= · |v, l

v ::= c|x |λx:A·R σ : x7→h(l) :a(l)

Σ ::= · |Σ[c:A]|Σ[a:K]

(85)

Type annotation

Remark

In LF, judgement annotation = type annotation Example

is-lam nat nat(λx·x) (λyz·z)

:is(lam nat (λx·x)) (arr nat nat)

K ::= Πx:A·K | ∗ A ::= Πx:A·A |σ`a(l)

t ::= σ`h(l) :a(l) h ::= x |a

l ::= · |v, l

v ::= c|x |λx:A·t

(86)

The repository language

Remark

In LF, judgement annotation = type annotation Example

is-lam nat nat(λx·x) (λyz·z)

:is(lam nat (λx·x)) (arr nat nat)

K ::= Πx:A·K | ∗ A ::= Πx:A·A |σ`a(l) R ::= σ`h(l) :a(l)

h ::= x |a l ::= · |v, l

v ::= c|x |λx:A·R

(87)

Commit (WIP)

R

, ·

`

Σ

t

: A

+

⇒ R

+

What does it do?

type-checks twrt. R (inO(t))

puts tin non-pos. MNF

annotate with type

with the adapted rules for variable & box:

VarΓ(x) =A or σ(x) :A

` : ),Γ`Σx:A`x:A) Box

(88)

Example

Signature

A B C D:∗

a: (D→B)→C →A b b0 :C→B

c:D→C d:D

Terms

t1 = a(λx:D·b(c(x)), c(d))

R1 = [v=c(d) :C]`a(λx:D·[w=c(x) :C]`b(w) :B, v) :A t2 = a(λy:D·[b0(w)]{x/y}1 )

R2 = [v=c(d) :C]`

a(λy:D·[x=y][w=c(x) :C]`b0(w) :B, v) :A

(89)

Regaining version management

Just add to the signature Σ:

Version:∗ Commit0:Version

Commit: Πt:tm·is(t,unit)→Version→Version Commit t

if R=σ `v:Version and R,· `Σt:is(p,unit)⇒(ρ`k) then

ρ[x=Commit(p, k, v)]`x:Version is the new repository

(90)

Further work

implementation & metatheory of Commit

from terms to derivations (ti)

diff on terms

mimick other operations from VCS (Merge)

Références

Documents relatifs

We would also like to thank everyone who contributed to this project, from near or far, with a special mention to Harley Smart, Marie Tourigny and Pier-Philippe Rioux for their

De plus, CLARK est heureux de combiner le vernissage de cette exposition au lancement du numéro 113 de la revue Espace, dédiant sa page couverture et un cahier spécial de 18 pages

make est un outil indispensable aux développeurs car : il assure la compilation séparée automatisée, il permet de ne recompiler que le code modifié, il

We take the domain thesaurus “Technik und Management” (TEMA) which has its origins in the assembly of six print thesauri, highlight some exemplary structural challenges resulting

Our interviews allowed us to understand what motivates visually impaired people to fly drones, learn what interaction and feedback features can support accessible

Dans ces situations, la r ealisation d’une pr e-coupe papillaire pr ecoce, l’utilisation d’un fil guide pancr eatique ou d’une proth ese pancr eatique peuvent faciliter la

Feb 1-5 New York; NY, Kuwait Info will encompass diverse areas such as com p uter software, hardware, peripherals, and office furniture, micrographics, data communications,

to make it easy for users to install your software?.