scispace - formally typeset
Search or ask a question
Book ChapterDOI

Quantitative Types for the Linear Substitution Calculus

01 Sep 2014-pp 296-310
TL;DR: Two non-idempotent intersection type systems for the linear substitution calculus, a calculus with partial substitutions acting at a distance that is a computational interpretation of linear logic proof-nets, are defined.
Abstract: We define two non-idempotent intersection type systems for the linear substitution calculus, a calculus with partial substitutions acting at a distance that is a computational interpretation of linear logic proof-nets. The calculus naturally express linear-head reduction, a notion of evaluation of proof nets that is strongly related to abstract machines. We show that our first (resp. second) quantitave type system characterizes linear-head, head and weak (resp. strong) normalizing sets of terms. All such characterizations are given by means of combinatorial arguments, i.e. there is a measure based on type derivations which decreases with respect to each reduction relation considered in the paper.

Content maybe subject to copyright    Report

HAL Id: hal-01402078
https://hal.inria.fr/hal-01402078
Submitted on 24 Nov 2016
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entic research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diusion de documents
scientiques de niveau recherche, publiés ou non,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.
Distributed under a Creative Commons Attribution| 4.0 International License
Quantitative Types for the Linear Substitution Calculus
Delia Kesner, Daniel Ventura
To cite this version:
Delia Kesner, Daniel Ventura. Quantitative Types for the Linear Substitution Calculus. 8th IFIP
International Conference on Theoretical Computer Science (TCS), Sep 2014, Rome, Italy. pp.296-
310, �10.1007/978-3-662-44602-7_23�. �hal-01402078�

Quantitative Types for the Linear Substitution
Calculus
Delia Kesner
1
and Daniel Ventura
2
1
Univ. Paris-Diderot, SPC, PPS, CNRS, France
2
Univ. Federal de Goi´as, INF, Brasil
Abstract. We define two non-idempotent intersection type systems for
the linear substitution calculus, a calculus with partial substitutions act-
ing at a distance that is a computational interpretation of linear logic
proof-nets. The calculus naturally express linear-head reduction, a notion
of evaluation of proof nets that is strongly related to abstract machines.
We show that our first (resp. second) quantitave type system character-
izes linear-head, head and weak (resp. strong) normalizing sets of terms.
All such characterizations are given by means of combinatorial argu-
ments, i.e. there is a measure based on type derivations which decreases
with respect to each reduction relation considered in the paper.
1 Introduction
It is quite difficult to reason about programs by only taking into account
their syntax, so that many different semantic approaches were proposed
to analyze them in a more abstract way. One typical tool to analyze
relevant aspects of programs is the use of type systems. In particular,
intersection types allow to characterize head/weakly/strongly normaliz-
ing terms, i.e. a term t is typable in an intersection type system iff t
is head/weakly/strongly normalizing; quantitative information about the
behaviour of programs can also be obtained if the intersection types enjoy
non-idempotence.
Intersection Types (IT): Simply typed terms are strongly normal-
izing (cf. [7]) but the converse does not hold, e.g. the term t := λx.xx.
Intersection Types [15] extend the simply typed discipline with a finitary
notion of polymorphism, listing type usage, that exactly captures the set
of strongly normalizing terms. This is done by introducing a new con-
structor of types together with a corresponding set of typing rules. For
instance, the previous term t is typable with ((σ σ)σ) σ so that the
first (resp. second) occurrence of the variable x is typed with σ σ (resp.
σ). Typically, intersection types are idempotent, i.e. σ σ = σ. Moreover,

the intersection constructor is usually commutative and associative. In-
tersection types in their full generality provide a characterization of vari-
ous properties of terms: models of the λ-calculus [8], characterization of
head [17] as well as weakly [13, 17] and strongly normalizing terms [33].
Non-Idempotent Intersection Types: The use of non-idempotent
types [11] gives rise to resource aware semantics, which is suitable for
computational complexity since it allows to extract quantitative informa-
tion about reduction sequences. Indeed, the inequality σ σ 6= σ can
be read as the fact that two different uses of the variable x are not iso-
morphic to a single use. Relationship with Linear Logic [24] and Rele-
vant Logic [23, 18] provides an insight on the information refinement as-
pect of non-idempotent intersection types. The relation between the size
of a non-idempotent intersection typing derivation and the head/weak-
normalization execution time of λ-terms by means of abstract machines
was established by D. de Carvalho [21]. Non-idempotence is also used
in [9, 20] to reason about the longest derivation of strongly β-normalizing
terms in the λ-calculus by means of combinatorial arguments.
Calculi with Explicit Substitutions (ES) and Intersection
Types: Calculi with ES refine the λ-calculus by decomposing β-reduction
into small steps in order to specify different evaluation strategies imple-
mented by abstract machines. In traditional calculi with ES [1], the op-
erational semantics specifies the propagation of ES through the structure
of the term until they reach a variable occurrence, on which they finally
substitute or get garbage collected. But calculi with ES can also be in-
terpreted in Linear Logic [22, 28, 26, 5] by implementing another kind of
operational semantics: their dynamics is defined using contexts (i.e. terms
with holes) that allows the ES to act directly at a distance on single vari-
able occurrences, with no need to commute with any other constructor
in between. In other words, the propagation of substitutions is not per-
formed by structural induction on terms, since they are only consumed
according to the multiplicity of the variables.
Idempotent intersection type systems were used to characterize strongly
normalizing terms of calculi with ES [34, 27] while non-idempotence is
used in [10] to prove the exact relationship between typing derivations
and the number of steps of the longest reduction sequence of strongly-
normalizing terms in the λs-calculus [26] and in the λlxr-calculus [28]. No
study about linear-head, head and weak normalizing is provided in those
works. Moreover, the systems are not syntax-directed, i.e. not all the typ-
ing derivations of t end with the same typing rule. As a consequence, the
formal developments of proofs require a generation lemma which guaran-

tees the existence of some typing derivations having a particular shape.
This drawback makes the development of proofs more involved.
Contribution: This paper focuses on functional programs specified
via the Curry-Howard isomorphism by intuitionistic logic, in natural de-
duction style. The operational semantics implements resource control by
means of reduction rules describing the behaviour of explicit operators for
erasure and duplication. The term language is the linear substitution cal-
culus [3], called here M-calculus, and obtained from Milner’s calculus [36]
and the structural λ-calculus [5].
Partial substitution allows to express linear-head reduction [19, 35], a
notion of evaluation of proof nets that is strongly related to significant
aspects of computer science [32, 2, 4]. Linear-head reduction cannot be
expressed as a simple strategy of the λ-calculus, where substitution acts
on all free occurrences of a variable at once; this is probably one of the
reasons why there are so few works investigating it. In this paper we
use logical systems to reason about different notions of normalization of
terms, including those obtained with linear-head reduction.
More precisely, the quantitative semantics of programs used in this
paper is given by two non-idempotent intersection type systems. The
first one, based on [21], allows a characterization of linear-head, head
and weakly normalizing terms. While full logical characterizations of
head/weakly β-normalizing λ-terms were already given in the literature,
the use of a logical/type system to directly characterize linear-head nor-
malization in calculi with ES is new. The second system, another main
contributions of this paper, gives a characterization of strongly normaliz-
ing terms.
Our type systems use multiset notation and are syntax-directed so
that no generation lemmas are needed, thus making the development
of proofs much more direct. Moreover, the type systems for strong nor-
malization make use of a special notion of witness derivation for the ar-
guments (of applications and explicit substitutions) which makes them
particularly natural. All the characterizations in the paper are given by
means of simple combinatorial arguments, i.e. there is a measure that can
be associated to each typing derivation which is decreasing with respect
to the different reduction relations considered in the paper.
Structure of the paper: Sec. 2 presents the syntax and semantics of
the M-calculus and both typing systems. Sec. 3 presents the Linear-Head,
Head and Weak-Normalization characterizations while Sec. 4 presents the
Strong-Normalization characterization. We then conclude in Sec. 5.

2 The Linear Substitution Calculus
We first describe the syntax and the operational semantics of the M-
calculus, including some particular notions of rewriting such as linear-
head reduction. We then introduce a notion of type and two different
type systems that play a central role in the first part of the paper.
Syntax: Given a countable infinite set of symbols x, y, z, . . ., three
different syntactic categories for terms (T
M
) and contexts (C
M
) are defined
by the following grammars:
(terms) t, u, v ::= x | tt | λx.t | t[x/t]
(term contexts) C ::= 2 | λx.C | C t | t C | C[x/t] | t[x/C]
(list contexts) L ::= 2 | L[x/t]
A term x is called a variable, tu an application, λx.t an abstrac-
tion and t[x/u] a closure where [x/u] is an explicit substitution. We
write tt
1
. . . t
n
for (. . . (tt
1
) . . . t
n
). The notions of free and bound vari-
ables are defined as usual, in particular, fv(t[x/u]) := fv(t) \ {x} fv(u),
fv(λx.t) := fv(t) \ {x}, bv(t[x/u]) := bv(t) {x} bv(u) and bv(λx.t) :=
bv(t) {x}. We work with the standard notion of α-conversion i.e. re-
naming of bound variables for abstractions and substitutions. We write
C[t] (resp. L[t]) for the term obtained by replacing the hole of C (resp.
L) by the term t. We write C[[u]] or L[[u]] when the free variables of u
are not captured by the context, i.e. there are no abstractions or explicit
substitutions in the context that binds the free variables of u. The set
of positions of t, written pos(t), is the finite language over {0, 1} in-
ductively defined as follows: pos(t) for every t; 0p pos(λx.t) if
p pos(t); 0p pos(tu) (resp. pos(t[x/u])) if p pos(t); 1p pos(tu)
(resp. pos(t[x/u])) if p pos(u). The subterm of t at position p is
written t|
p
and defined as expected. The term u has an occurrence in
t iff there is p pos(t) such that t|
p
= u. We write |t|
x
to denote the
number of free occurrences of the variable x in the term t. All these
notions are extended to contexts as expected.
Operational Semantics: The M-calculus is given by the set of terms
T
M
and the reduction relation
dBcw
, the union of
dB
,
c
, and
w
,
denoted by
M
, which are, respectively, the closure by term contexts C of
the following rewriting rules:
L[λx.t]u 7→
dB
L[t[x/u]]
C[[x]][x/u] 7→
c
C[[u]][x/u]
t[x/u] 7→
w
t if |t|
x
= 0

Citations
More filters
Journal ArticleDOI
TL;DR: This article explores the use of non-idempotent intersection types in the framework of the λ-calculus by replacing the reducibility technique with trivial combinatorial arguments.
Abstract: This article explores the use of non-idempotent intersection types in the framework of the λ-calculus. Different topics are presented in a uniform framework: head normalization, weak normalization, weak head normalization, strong normalization, inhabitation, exact bounds and principal typings. The reducibility technique, traditionally used when working with idempotent types, is replaced in this framework by trivial combinatorial arguments.

53 citations


Cites background or methods from "Quantitative Types for the Linear S..."

  • ...Non-idempotent IT systems were used in [40, 41] to characterize different normalization properties of higher-order calculi....

    [...]

  • ...For example, linear-head, head, weak and strong normalization are characterized in [40] by means of appropriate non-idempotent types in the framework of the linear substitution calculus [1], a calculus with explicit substitution at a distance....

    [...]

Book ChapterDOI
04 Apr 2016
TL;DR: It is shown that call-by-need and call- by-name are observationally equivalent, so that in particular, the former turns out to be a correct implementation of the latter.
Abstract: We first develop a (semantical) characterization of call-by-need normalization by means of typability, i.e. we show that a term is normalizing in call-by-need if and only if it is typable in a suitable system with non-idempotent intersection types. This first result is used to derive a new completeness proof of call-by-need w.r.t. call-by-name. Concretely, we show that call-by-need and call-by-name are observationally equivalent, so that in particular, the former turns out to be a correct implementation of the latter.

34 citations


Cites background from "Quantitative Types for the Linear S..."

  • ...The second one, called A (for answers), characterizes the set of need-normalizing terms; it extends the one in [24] which characterizes the set of head-linear normalizing terms in λ-calculus with explicit substitutions....

    [...]

  • ...The same remark applies to the rule (ans) in system A with respect to the one in [24]....

    [...]

  • ...Different assignment systems with nonidempotent intersection types have been studied in the literature for different purposes [8, 10, 18, 19, 24, 26, 27, 30, 35, 34]....

    [...]

Book ChapterDOI
01 Sep 2014
TL;DR: The inhabitation problem for intersection types is known to be undecidable, but it is known that it is decidable in the case of non-idempotent intersection types.
Abstract: The inhabitation problem for intersection types is known to be undecidable. We study the problem in the case of non-idempotent intersection, and we prove decidability through a sound and complete algorithm. We then consider the inhabitation problem for an extended system typing the λ-calculus with pairs, and we prove the decidability in this case too. The extended system is interesting in its own, since it allows to characterize solvable terms in the λ-calculus with pairs.

31 citations

01 Jan 2017
TL;DR: Two resource aware typing systems for the λμ-calculus based on non-idempotent intersection and union types are defined and typability provides upper bounds for the length of head-reduction sequences and maximal reduction sequences.
Abstract: We define two resource aware typing systems for the λμ-calculus based on non-idempotent intersection and union types. The non-idempotent approach provides very simple combinatorial arguments –based on decreasing measures of type derivations– to characterize head and strongly normalizing terms. Moreover, typability provides upper bounds for the length of head-reduction sequences and maximal reduction sequences. 1998 ACM Subject Classification F.4.1 Mathematical Logic

27 citations

Journal ArticleDOI
TL;DR: It is proved that the resulting typed λ-calculus is strongly normalising and features weak subject reduction and it is shown how to naturally encode matrices and vectors in this typed calculus.
Abstract: We describe a type system for the linear-algebraic λ-calculus. The type system accounts for the linear-algebraic aspects of this extension of λ-calculus: it is able to statically describe the linear combinations of terms that will be obtained when reducing the programs. This gives rise to an original type theory where types, in the same way as terms, can be superposed into linear combinations. We prove that the resulting typed λ-calculus is strongly normalising and features weak subject reduction. Finally, we show how to naturally encode matrices and vectors in this typed calculus.

26 citations

References
More filters
Book ChapterDOI

[...]

01 Jan 2012

139,059 citations


"Quantitative Types for the Linear S..." refers background in this paper

  • ...[21]) which allows to obtain partial typing inference algorithms [40, 39, 31] and exact bounds for termination (cf....

    [...]

Journal ArticleDOI
30 Jan 1987

3,947 citations

Journal ArticleDOI
TL;DR: This column presents an intuitive overview of linear logic, some recent theoretical results, and summarizes several applications oflinear logic to computer science.
Abstract: Linear logic was introduced by Girard in 1987 [11] . Since then many results have supported Girard' s statement, \"Linear logic is a resource conscious logic,\" and related slogans . Increasingly, computer scientists have come to recognize linear logic as an expressive and powerful logic with connection s to a variety of topics in computer science . This column presents a.n intuitive overview of linear logic, some recent theoretical results, an d summarizes several applications of linear logic to computer science . Other introductions to linear logic may be found in [12, 361 .

2,304 citations


"Quantitative Types for the Linear S..." refers background or methods in this paper

  • ...Relationship with Linear Logic [24] and Relevant Logic [23, 18] provides an insight on the information refinement as-...

    [...]

  • ...Another key subrelation studied in this paper is linear-head reduction [19, 35], a strategy related to abstract machines [19] and linear logic [24]....

    [...]

  • ...Relationship with Linear Logic [24] and Relevant Logic [23, 18] provides an insight on the information refinement aspect of non-idempotent intersection types....

    [...]

  • ...But calculi with ES can also be interpreted in Linear Logic [22, 28, 26, 5] by implementing another kind of operational semantics: their dynamics is defined using contexts (i.e. terms with holes) that allows the ES to act directly at a distance on single variable occurrences, with no need to commute with any other constructor in between....

    [...]

Book ChapterDOI
01 Jan 2009

1,482 citations

Journal ArticleDOI
TL;DR: This contribution was made possible only by the miraculous fact that the first members of the Editorial Board were sharing the same conviction about the necessity of Theoretical Computer Science.

1,480 citations

Frequently Asked Questions (18)
Q1. What contributions have the authors mentioned in the paper "Quantitative types for the linear substitution calculus" ?

The authors show that their first ( resp. second ) quantitave type system characterizes linear-head, head and weak ( resp. strong ) normalizing sets of terms. All such characterizations are given by means of combinatorial arguments, i. e. there is a measure based on type derivations which decreases with respect to each reduction relation considered in the paper. 

This remains as future work. 

Another key subrelation studied in this paper is linear-head reduction [19, 35], a strategy related to abstract machines [19] and linear logic [24]. 

The HW-type system is known to type also some non weakly M-normalizing terms: for instance, if Ω is any non-terminating term, then x:[ ]→σ `HW xΩ:σ. 

the type systems for strong normalization make use of a special notion of witness derivation for the arguments (of applications and explicit substitutions) which makes them particularly natural. 

Although type inference is undecidable for any system characterizing termination properties, semi-decidable restrictions are expected to hold. 

The pushed out list context L in rule dB can be obtained by using an equivalence related to Regnier’s σ-equivalence [38]: L[λx.t]u ∼σ L[(λx.t)u] →dB L[t[x/u]]. 

An interesting challenge would be relax the notion of linear types in order to gain expressivity while staying in a different class. 

This paper focuses on functional programs specified – via the Curry-Howard isomorphism – by intuitionistic logic, in natural deduction style. 

The HW-system also enjoys the inhabitation property for λ-calculus [12], which is a proper sub-calculus of the linear substitution calculus. 

Types of terms can also be recovered by means of Subject Expansion (SE), a property which will be particularly useful in Sec. 3.1 and 3.2.Lemma 3 (SE I). 

The M-calculus is given by the set of terms TM and the reduction relation→dB∪c∪w, the union of→dB,→c, and→w, denoted by→M, which are, respectively, the closure by term contexts C of the following rewriting rules:L[λx.t]u 7→dB L[t[x/u]] C[[x]][x/u] 7→c C[[u]][x/u] t[x/u] 7→w t if |t|x = 

Last but not least, the inhabitation problem for idempotent intersection types in the λ-calculus is known to be undecidable [41], while the problem was recently shown to be decidable in the non-idempotent case [12]. 

the set of positive (resp. negative) subtypes of a type is the smallest set satisfying the following conditions (cf.[13]).– A ∈ P(A). – A ∈ P([σi]i∈I) if ∃i A ∈ P(σi); A ∈ N ([σi]i∈I) if ∃i A ∈ N (σi). 

In particular, intersection types allow to characterize head/weakly/strongly normalizing terms, i.e. a term t is typable in an intersection type system iff t is head/weakly/strongly normalizing; quantitative information about the behaviour of programs can also be obtained if the intersection types enjoy non-idempotence. 

This is related to a recent result [3] stating that linear-head reduction is standard for the M-calculus, exactly as left-to-right reduction is standard for the λ-calculus. 

given p ∈ pos(t), p is said to be a dB-redex occurrence of t if t|p = L[λx.t]u, p is a w-redex occurrence of t if t|p = v[x/u] with |v|x = 0, and p is a c-redex occurrence of t if p = p1p2, t|p1 = C[[x]][x/u] and C|p2 = 2. 

But calculi with ES can also be interpreted in Linear Logic [22, 28, 26, 5] by implementing another kind of operational semantics: their dynamics is defined using contexts (i.e. terms with holes) that allows the ES to act directly at a distance on single variable occurrences, with no need to commute with any other constructor in between.