Call-by-value solvability, revisited Beniamino Accattoli1 and Luca Paolini2 ´ INRIA and LIX (Ecole Polytechnique), France Dipartimento di Informatica, Universit` a degli Studi di Torino, Italy 1

2

Abstract. In the call-by-value lambda-calculus solvable terms have been characterised by means of call-by-name reductions, which is disappointing and requires complex reasonings. We introduce the value-substitution lambda-calculus, a simple calculus borrowing ideas from Herbelin and Zimmerman’s call-by-value λCBV calculus and from Accattoli and Kesner’s substitution calculus λsub . In this new setting, we characterise solvable terms as those terms having normal form with respect to a suitable restriction of the rewriting relation.

1

Introduction

The most commonly used parameter passing policy for programming languages is call-by-value (CBV). Landin in [15] pioneered a CBV formal evaluation for a lambda-core of ALGOL60 (named ISWIM) via the SECD abstract machine. Ten years later, Plotkin [22] introduced the λβv calculus in order to grasp the CBV paradigm in a pure lambda-calculus setting. The λβv -calculus narrows the β-reduction rule by allowing the contraction of a redex (λx.t) u, only in case u is a value, i.e. a variable or an abstraction. Unfortunately, the semantics analysis of the λβv -calculus has turned out to be more elaborate than the semantic of the classical call-by-name (CBN) λ-calculus. CBN and CBV solvability. Solvability [8,13,14] is a pervasive notion in the semantic analysis of (CBN) lambda-calculus (see [26,7]). For instance, it underlies the fundamental notions of approximants, B¨ohm-trees, separability, and sensible λ-theories. A term t is solvable if there exists a head context H s.t. H[t] →∗β I, where I = λx.x is the identity. If t is not solvable then it is unsolvable. Solvability was first considered in connection with λ-definability of partial recursive functions. It was noted that representing the everywhere undefined function using the set of terms without normal form is not adequate, such a function should rather be associated to unsolvable terms, which form a strict subset of the set of terms without a normal form. Quoting from [26]:

[...] only those terms without normal forms which are in fact unsolvable can be regarded as being ”undefined” (or better now: ”totally undefined”); by contrast, all other terms without normal forms are at least partially defined. Essentially the reason is that unsolvability is preserved by application and composition [...] which [...] is not true in general for the property of failing to have a normal form. In CBN unsolvable (resp. solvable) terms can be characterized operationally as the terms without (resp. with) a head normal form. A solid theory of CBV is expected to enjoy an operational characterization of solvability, i.e. a strategy which terminates if and only if the term is solvable. The idea is that such a strategy gives a notion of evaluation for the represented functions. A term t is CBV-solvable whenever there is a head context H s.t. H[t] →∗βv I. An operational characterization has been provided in [21,23] but, unfortunately, it is obtained through call-by-name β-reduction, which is disappointing and not satisfying. The result is improved in [20] where the characterisation is built upon strong normalization via CBN weak3 reduction. An operational characterisation of solvability gives a way to compute the results of the represented functions. If it is not possible to get an internal characterisation, i.e. one which uses the rules of the calculus itself, then there is an inherent weakness in the rewriting rules of the calculus. For λβv it is indeed the case, let us illustrate the point with an example. Let ∆ = λx.xx. There is no head context sending (via βv -reduction) the following term to the identity: t = (λy.∆) (x z) ∆

(1)

and—as a consequence—t should be unsolvable and divergent in a good call-by-value calculus, while it is in λβv -normal form (!). The weakness of βv -reduction is a fact widely recognized and accepted, indeed there have been many proposals of alternative CBV calculi [11,12,17,24,9]. The value-substitution λvsub -calculus. In this paper we introduce the value-substitution λvsub -calculus, a simple CBV calculus with two rewriting rules. It extends the syntax of λ-calculus with an explicit substitution constructor t[u/x] (an avatar of let-expressions), but these substitutions are just delayed, they are not propagated in a small-step way. Our calculus borrows ideas from two existing calculi, Herbelin and Zimmerman’s 3

Weak β-reduction is the applicative-only closure of the β-rule, i.e. it is obtained from usual β-reduction by forbidding reductions under abstractions. In literature, it is sometimes called lazy β-reduction.

λCBV -calculus [11] and Accattoli and Kesner’s λsub -calculus [4], as we explain in Section 2. In particular, it is a reformulation at a distance [5,4]—i.e. without commutative rules—of λCBV . We prove that in the value-substitution calculus solvable terms can be characterised internally as the terms having normal form with respect to a sub-reduction of the calculus that we call stratified-weak reduction. Stratified-weak reduction plays in our characterization the same role of head β-reduction in CBN. The characterisation is obtained in two steps. First, we tackle the weaker notion of potentially valuable terms, i.e. terms for which there exists a substitution sending them into values (note that the identity is a value). Such terms are shown to be exactly those having normal form with respect to weak λvsub -reduction. Second, solvable terms are shown to be sort of hereditarily potentially valuable terms. Behavioural equivalence. The gain in moving from λCBV to λvsub is the fact that λvsub can be extended with a behavioural equivalence ≡vo , induced by the absence of commutative rules. The idea is that ≡vo relates terms differing only for the position of substitutions but behaving the same. Formally, ≡vo is a strong bisimulation of λvsub with itself. The calculus λvsub modulo ≡vo is particularly well-behaved, roughly because strong bisimulations preserve most operational properties. We use ≡vo to show that our characterisation of solvability in λvsub lifts to λCBV . The value-substitution calculus can also be related to the call-by-value translation (·)v of λ-calculus with explicit substitutions into multiplicative and exponential intuitionistic linear logic (IMELL) proof-nets, identified by (A ⇒ B)v =!(Av ( B v ) [10], which actually was our starting point. In particular, the equivalence ≡vo relates terms which map to the same proof-net. However, proof-nets do not appear in this paper. Related work. There exist various alternative approaches to CBV [11,12,17,24]. Unlike λvsub they all have many rewriting and commutative rules, and for none of them solvability has been studied. Since λvsub is essentially a refinement of λCBV , we compare them explicitly in Section 2.1, while we refer to the introduction of [11] for more relations with the literature. Solvability has also been recently studied for some extensions of λ-calculus in [18,25], but both works consider a call-by-name calculus. Outline. Section 2 introduces the calculus, shows that it is a subcalculus of λCBV and provides a simple proof of confluence for λvsub . Section 3 introduces CBV-solvability and explains the problems it poses. Section 4 proves that terms having weak normal form are potentially valuable and that terms having stratified-weak normal form are solvable. Section 5 proves the converse implications. Section 6 introduces the be-

havioural equivalence and lifts the characterisation of solvability to λCBV . Proofs. We omit all proofs, which can be found in [6].

2

The Value-Substitution Calculus

The value-substitution calculus λvsub is a lambda-calculus with explicit substitutions whose syntax is given by the following grammar: v ::= x | λx.t

t, s, r ::= v | t s | t[s/x]

where x, y, z are variables, v is the set of values and t[s/x] denotes an explicit substitution, i.e. a syntactical representation of a delayed substitution. In t[s/x], the subterm s is called the content of the explicit substitution. We use t{s/x} for the term obtained by the capture-avoiding substitution of s to each occurrence of x in t. There are two kinds of binder: λx.t and t[u/x], both binding x in t. All terms are considered up to α-conversion. Contexts are defined via the grammar: C ::= [·] | λx.C | C t | t C | C[t/x] | t[C/x] where [·] is a fresh constants. We use C[t] for the term obtained by the capture-allowing substitution of t to [·] in C and L for a (possibly empty) lists [t1 /x1 ] . . . [tk /xk ] of explicit substitutions. The value-substitution calculus is endowed with two rewriting rules (dB for B at a distance 4 and vs for value-substitution): (λx.t)L s 7→dB t[s/x]L

t[vL/x] 7→vs t{v/x}L

We use →dB , →vs and →λvsub for the closure by all contexts of 7→dB , 7→vs and 7→dB ∪ 7→vs , respectively. Some comments on the rewriting rules are in order. The rule →dB does not require the argument of the redex to be a value. The rule →vs instead can fire only when the content of the explicit substitution is of the form vL (i.e. a value followed by a list of substitutions), generalizing the usual requirement of being a value. Note that the unsolvable term t in (1) (page 2) diverges in λvsub : t = (λy.∆) (x z) ∆ →dB ∆[x z/y] ∆ →dB x0 x0 [∆/x0 ][x z/y] →vs ∆ ∆[x z/y] →dB . . .

(2)

The embedding of Plotkin’s λβv -calculus into λvsub is simply given by the identity, and each βv -reduction step (λx.t) v →βv t{v/x} factors in 4

B is often used for the rule (λx.t) s → t[s/x]

λvsub as (λx.t) v →dB t[v/x] →vs t{v/x}, as in the call-by-value calculi of [11,17]. The presence of the list of substitutions L may not seem necessary, but it is in fact the key to avoid commutation rules, as we explain in the next subsection. The following immediate lemma will be used implicitly throughout the paper. Lemma 1. If v0 , v1 ∈ Val then v0 {v1 /x} ∈ Val . Moreover, v0 →λvsub v00 implies v00 ∈ Val . 2.1

Relation with Herbelin’s and Zimmerman’s λCBV

The calculus we introduced borrows ideas from two already existing calculi, Herbelin and Zimmerman’s λCBV [11] and Accattoli and Kesner’s λsub [4]. Both calculi extend the syntax of λ-calculus: the former uses a let x = u in t construct, while the latter uses an explicit substitution construct t[u/x]. The two construct are in fact equivalent: we present both calculi with explicit substitutions, since let is quite verbose and easily gives rise to big terms. A key feature of λCBV is that the CBV restriction on redexes is imposed on explicit substitutions and not on β-redexes. The rewriting rules of λCBV —omitting the observational ones—follow. Operational rules

Structural rules

(λx.t) s ⇒ t[s/x] t[v/x] →letv t{v/x}

t[u/x] s →letapp (t s)[u/x] t[s[u/y]/x] →letlet t[s/x][u/y]

Structural rules commute explicit substitutions to enable hidden operational redexes. For instance, (λx.t)[u/y] s becomes a ⇒-redex only after the structural step (λx.t)[u/y] s →letapp ((λx.t) s)[u/y]. Similarly, t[v[u/y]/x] becomes a →letv -redex only after a →letlet -step. The substitution calculus λsub is a CBN calculus with explicit substitutions designed to reflect reductions in λj-dags [3] and pure proofnets [2]. It has two rewriting rules: (λx.t)L s →dB t[s/x]L

t[u/x] →s t{u/x}

where L is a list of substitutions, like in λvsub . The main feature of λsub is distance, i.e. the absence of commutative rules for substitutions: in →dB the function λx.t and the argument s can interact even if there is L between them. This is motivated by the close relation between λsub and graphical formalisms as (Pure) Proof-Nets or λj-dags, see [3,2]. The valuesubstitution calculus is a reformulation at a distance of λCBV , making the structural rules superfluous.

The rules of λvsub are sort of macro-rules of λCBV : (λx.t)L s →∗letapp ((λx.t) s)L ⇒ t[s/x]L t[vL/x] →∗letlet t[v/x]L →letv t{v/x}L that provide a straightforward simulation of λvsub into λCBV . Proposition 1. →λvsub ⊆→+ CBV , and so the equational theory of λvsub is contained in the theory of λCBV . Akin to other CBV calculi, λCBV equates more than Plotkin’s calculus. Indeed, the two terms: (λx.λx0 .t) (y y 0 ) (z z 0 )

(λx.((λx0 .t) (z z 0 ))) (y y 0 )

(3)

are not βv -interconvertible, while in λCBV both reduce to t[z z 0 /x0 ][y y 0 /x]. In Section 6 we show that in a sense λvsub (strictly) contains the equational theory of λCBV , despite the fact that λvsub is a subcalculus of λCBV . 2.2

Confluence

The proof of confluence is particularly simple. It is based on the following well-known lemma (used, for instance, to prove confluence of the ληcalculus). Lemma 2 (Hindley-Rosen, [7], Proposition 3.3.5.(ii), page 64). Let →1 and →2 be two rewriting relations on a set X. If they are both confluent and they commute, i.e. if t →∗1 u1 and t →∗2 u2 then there exists s such that u1 →∗2 s and u2 →∗1 s, then →1 ∪ →2 is confluent. The idea is to take →1 =→dB , →2 =→vs and →1 ∪ →2 =→λvsub and prove the hypothesis of the lemma. Confluence of →dB and →vs follows from their respective local confluence, Newman’s Lemma and the fact that they are strongly normalising (separately). Lemma 3. →dB and →vs are both confluent and strongly normalising reductions. Commutation of →dB and →vs follows by an easy and standard argument based on the particular shape of their local commutation diagram. Lemma 4. 1. →vs and →dB locally commute: If t →vs u1 and t →dB u2 then there is s s.t. u2 →vs s and u1 →∗dB s.

2. →vs and →dB commute: If t →∗vs u1 and t →∗dB u2 then there is s s.t. u2 →∗vs s and u1 →∗dB s. Thus Lemma 2 gets: Corollary 1. →λvsub is confluent.

3

Call-by-value solvability

First of all, let us recall the definition of solvability. Definition 1 (Solvable Terms). A term t is solvable if there exist terms u1 , . . . , uk and variables x1 , . . . , xh , with h, k ≥ 0, such that (λx1 . . . xh .t) u1 . . . uk →∗λvsub I, where I is the identity. We call (λx1 . . . λxh .[·]) u1 . . . uk a head context. Let ∆ be λx.xx. With respect to solvability the difference between CBN and CBV is well represented by the term t = I[∆ ∆/x]. The subterm ∆ ∆ is a typical example of unsolvable term. In CBN one has that t → I by simply erasing the substitution, and thus t is CBN solvable. In a CBV setting, instead, the substitution is blocked, because ∆ ∆ is not a value, nor it can be reduced to a value. Even worse, no plugging of t in a head context can turn ∆∆ in a value. Thus, there is no head context sending t on the identity, and t is CBV-unsolvable. We need to find a notion of reduction for which t diverges. To understand the difficulty is useful to recall the structure of the proof of the characterisation of CBN-solvability: 1. t has head normal form ⇒ t is solvable: this direction is proved by induction on the structure of t building a special head context H which erases all non-head subterms of t and produces the identity; 2. t is solvable ⇒ t has head normal form: it is a corollary of the standardisation theorem, if H[t] reduces to the identity then it does so by head reduction, and the fact that extraction of t from H[t] preserves head normalisability. We adapt the same pattern of the CBN approach, defining a new form of reduction (to be introduced in a while). The main difference is that in CBV not every non-head subterm can be erased, only values. Thus the proof of the first step is more involved. The head context transforming a solvable term into the identity needs to provide appropriate substitutions turning the content of explicit substitutions into values. So it is mandatory to first characterise potentially valuable terms.

Definition 2 (Potentially valuable term, [21]). A term t is potentially valuable whenever there are terms u1 , . . . , un , variables x1 . . . xn and a value v such that t{u1 /x1 } . . . {un /xn } →∗λvsub v5 . For example, values, and terms which reduce to values, are potentially valuables. A potentially valuable term which does not reduce to a value is x y (consider {I/x}), while ∆∆ is not potentially valuable. We show that a term is potentially valuable iff it has a weak normal form, and then we will build the characterisation of solvability on top of this one. Weak contexts are contexts whose hole is not under an abstraction: W ::= [·] | W t | t W | W[t/x] | t[W/x] The reduction →w is the closure by weak contexts of 7→dB ∪ 7→vs . We note →¬w the complement of →w , defined as →λvsub \ →w , which is the reduction which reduces redexes under at least one λ. To catch solvability we extend weak reduction as follows. A stratifiedweak context SW is defined as: SW ::= W | λx.SW | SW t | SW[t/x] The reduction →sw is the closure by stratified-weak contexts of 7→dB ∪ 7→vs . Weak contexts are widely used in literature, while stratified-weak contexts are an adptation of the ahead-strategy defined in [21]. They extend weak contexts allowing weak reductions under abstractions in head position, which have the important property that cannot be duplicated nor erased. Note that the diverging reduction (2) (page 4) of the unsolvable term of the introduction is a weak (and thus a stratified-weak) reduction.

4

Terms having stratified-weak normal form are solvable

Let us sketch the organization of this section. 1. We prove that terms having a weak normal form are potentially valuable, by: (a) characterising weak normal forms explicitly; (b) proving that weak normal forms are potentially valuable; (c) proving that terms having weak normal form are potentially valuable. 5

Potentially valuable terms can be defined via head-contexts, as for solvable terms, but our definition simplifies some technical points.

2. We prove that terms having a stratified-weak normal form are solvable, by: (a) characterising stratified-weak normal forms explicitly; (b) proving that stratified-weak normal forms are solvable; (c) proving that terms having stratified-weak normal form are solvable. The characterization of weak normal forms, noted wnf , uses an aux# iliary syntactic category wnf for terms which have not the form vL. The # idea is that a substitution t[u/x] can be reduced by 7→vs iff u ∈ / wnf . Lemma 5 (Weak normal forms). following grammar:

Let t ∈ λvsub and consider the

# # wnf ::= x | λx.t | wnf | wnf [wnf /x] # # # # # # wnf ::= x[wnf /x1 ] . . . [wnf /xn ] wnf | wnf wnf | wnf [wnf /x]

(weak n.f.) (#-weak n.f.)

with x possibly among x1 , . . . , xn and n ≥ 0. Then: 1. t is in →w -normal form iff t ∈ wnf . # 2. t is in →w -normal form and not of the form vL iff t ∈ wnf where L is a list of substitutions of #-weak normal forms. In λCBV , thanks to the structural rules, weak normal forms are simpler, they have either the shape xt1 ...tn L or the shape (λx.t)L, where ti are weak normal forms and L is a list of explicit substitutions having as # # content terms in wnf . However, using λCBV would not get rid of wnf and the operational study in the paper would be more complex, since λCBV has more rules. In Section 6 we will show how to characterise solvability in λCBV , by exploiting the characterisation in λvsub . We need some meta-notations. If n ∈ N then on is the term λx0 ...xn .xn (i.e. o0 = λx0 .x0 = I and oi+1 = λxi+1 .oi ), moreover we use the notation o≥n to denote a term of the shape λx0 ...xk .xk where k ≥ n. Clearly, a term o≥n can be noted o≥n−1 , loosing information. Let t be a term, we note t[n] a term of the form t{o≥n /x1 , . . . , o≥n /xk } with FV(t) = {x1 , . . . , xk }. Note that on is a closed value and t[n] is a closed term, for all n ∈ N. The following lemma is one of the key points of the characterisation. Its proof is delicate, technical and non-trivial. Lemma 6. Let t ∈ λvsub . # 1. If t ∈ wnf then exists h ∈ N s.t., for all j ∈ N, t[h+j] →∗λvsub o≥j .

2. If t ∈ wnf then exists h ∈ N s.t. for all j ∈ N exists v s.t. t[h+j] →∗λvsub v. Therefore, t is potentially valuable. Since Lemma 6 hides many details in notations to simplify the statement, let us spend some words on its first point. The first point says that substituting a family of terms o≥h+j (all of them, with at least h + j abstractions) to all the free variables of t we can obtain a term o≥j (with at least j abstractions). The following lemma is used to lift the result to terms having weak normal form, and its proof is straightforward. Lemma 7. If t →w t0 then t{v/x} →w t0 {v/x}. It is easily seen that Lemmas 6 and 7 imply the following corollary. Corollary 2. If t has a →w -normal form then it is potentially valuable. Now we show that →sw -normalizing terms are solvable. The first step is a characterisation of stratified-weak normal forms. Lemma 8 (Stratified-weak normal forms). A term t is in →sw normal form if and only if it belongs to the following syntax: # # snf ::= x | λx.snf | wnf | snf [wnf /x].

The second step is that stratified-weak normal forms are solvable. Lemma 9. If t is an →sw -normal form then there exist h, k ∈ N such that, for all j ∈ N, t[h+j] |o≥h+j .{z . . o≥h+j} →∗λvsub o≥j . k

Therefore, t is solvable. The next immediate lemma is used to lift the result to terms having stratified-weak normal forms, i.e. to get the third and last step. Lemma 10. If t →sw t0 then H[t] →sw H[t0 ] for any head context H. The characterisation of solvability easily follows. Corollary 3. If t has a →sw -normal form then t is solvable.

5

Solvable terms have stratified-weak normal form

To complete the characterisation of solvability we need to prove that solvable terms have stratified-weak normal form. The proof of this direction relies on the rewriting properties of stratified-weak reduction, in particular a sort of standardisation theorem stating that →∗λvsub ⊆→∗sw →∗¬sw , where →¬sw is the complement of →sw w.r.t. →λvsub , and the diamond property for →sw . Similarly, we show that potentially valuable terms have weak normal form. Lemma 11 (Diamond property). →w (resp. →sw ) enjoys the diamond property, i.e., if t →w ui (resp. t →sw ui ) and u1 6= u0 then there exists s s.t. ui →w s (resp. ui →sw s), for i = 0, 1. The diamond property is an abstract way to say that morally →sw and →w are deterministic strategies. Indeed, it implies that all maximal reduction sequences from a given term have the same length, which in turn gives the following corollary. Corollary 4. A term t has a →w -normal form (resp. →sw -normal form) iff t is →w -strongly normalisable (resp. →sw -strongly normalisable). We also need two factorisation properties [16], simple forms of standardisation, which can also be seen as postponement properties. Let →¬w be the complement of →w w.r.t. →λvsub . Theorem 1 (Factorisation). 1. →∗λvsub ⊆→∗w →∗¬w . 2. →∗λvsub ⊆→∗sw →∗¬sw . The proofs of the two properties are non-trivial. To avoid annoying repetitions we approached them abstractly. This lead the first author to develop an abstract technique for factorisation theorems in [1], where the two cases of our interest are proved. Both solvable (resp. potentially valuable) terms have been defined using →∗λvsub , but thanks to the factorisation theorems we can limit reductions to stratified-weak (resp. weak) redexes. Corollary 5. Let t ∈ λvsub . 1. If t →∗λvsub v then there exists a value v0 s.t. t →∗w v0 →∗¬w v. 2. If t →∗λvsub I then t →∗sw I.

The simplification given by the corollary is a key point in the proof of the next theorem. Theorem 2. Let t ∈ λvsub . If t is solvable then t has a stratified-weak normal form. We conclude with the similar result for potential valuability. Theorem 3. Let t ∈ λvsub . If t is potentially valuable then it has a →w normal form.

6

Behavioural equivalence and solvability for λCBV

At first sight there is no way of simulating λCBV in λvsub , since the structural rules have no counterpart. However, in λvsub the rules →letapp and →letlet can be recovered: they are just lifted to another, more subtle level. In λvsub two terms can have the same behavior and differ only for the position of substitutions, which is not relevant because substitutions do not block redexes. This can be formalized in a precise way, using the standard tool for behavioural equivalence: bisimulations. Definition 3. Let ≡vo be the equivalence defined as the reflexive, symmetric, transitive, and contextual closure of the following relations: t[s/x][u/y] ∼vo1 t u[s/x] ∼vo2 t[s/x] u ∼vo3 t[s[u/y]/x] ∼vo4

t[u/y][s/x] (t u)[s/x] (t u)[s/x] t[s/x][u/y]

if if if if

x∈ / fv(u)&y ∈ / fv(s) x∈ / fv(t) x∈ / fv(u) y∈ / fv(t)

Remark that ≡vo allows the commutation of explicit substitutions with every constructor except abstractions6 . Moreover, →letapp and →letlet are particular cases of ∼vo3 and ∼vo4 , respectively. Let (S, →S ) be a reduction systems. A strong bisimulation for (S, →S ) is a symmetric relation ≡⊆ S × S s.t. s ≡ t implies that if s →S s0 then there exists t0 s.t. t →S t0 and s0 ≡ t0 , for any pair s, t ∈ S. Lemma 12. ≡vo is a strong bisimulation for both (λvsub , →λvsub ) and (λvsub , →sw ). 6

The relation ≡vo is the CBV version of the relation ≡o for the structural λ-calculus λj in [5], of which λsub is a big-step variant.

Actually, ≡vo has a stronger property, it induces a bijection of redexes and an isomorphism of reduction graphs, not just a bisimulation. However, such stronger property seems to not be useful here. Strong bisimulations behave very well with respect to the underlying rewriting system, they preserve most operational properties. We just state some basic facts (whose proofs are easy, see [2], pp. 86-87). Lemma 13. Let (S, →S ) be a reduction system, ≡ a strong bisimulation for it, and define →S/≡ := ≡→S ≡. Then: 1. ≡ preserves reduction lengths; 2. ≡ can be postponed with respect to →S , i.e. →∗S/≡ ⊆→∗S ≡; 3. if →S is confluent then →S/≡ is confluent and →S is Church-Rosser modulo ≡; 4. →S/≡ preserves S-strong normalization. Hence →λvsub /≡vo enjoys all these properties (→λvsub is confluent). Summing up, in order to study λvsub modulo ≡vo it is enough to study λvsub , since all properties of λvsub lift to λvsub modulo ≡vo , with essentially no effort. It can be shown that the CBV translation of λvsub to proof-nets [10] maps two ≡vo -equivalent terms to the same proof-net, and thus ≡vo equivalent terms can be considered as the same computational object. The following lemma shows that λCBV is a subcalculus of λvsub modulo ≡vo (Point 3). Lemma 14. We have: 1. 2. 3. 4.

If t →λCBV u reducing an operational redex then t →λvsub u. If t →λCBV u reducing a structural redex then t ≡vo u. If t →∗λCBV u then t →∗λvsub ≡vo u. t →∗λvsub I iff t →∗λCBV I.

The calculus λvsub modulo ≡vo equates more than λCBV . For instance, x x[y y/z] ≡vo (x x)[y y/z] while the two terms are different λCBV normal forms. Define a term t is solvable in λCBV if there exists a head context H s.t. H[t] →∗λCBV I (note the use of →λCBV instead of →λvsub ). Then, Lemma 14.4 states that a term is solvable in λvsub iff it is solvable in λCBV . We now show that our characterisation of solvability lifts to λCBV . The calculi λvsub and λCBV share the same syntax, and therefore the same notions of weak and stratified-weak contexts. By closing the rules of λCBV by stratified-weak contexts we get stratified-weak reduction for λCBV , noted →swCBV . The following lemma relates →sw and →swCBV .

Lemma 15. We have: 1. If t →sw u then t →+ swCBV u. 2. If t →swCBV u reducing an operational redex then t →sw u. 3. If t →∗swCBV u then t →∗sw ≡vo u. In order to show that our characterisation of solvability lifts to λCBV we need the following easy property. Lemma 16. The structural rules of λCBV are strongly normalising. We can finally conclude. Theorem 4. We have: 1. t has a →sw normal form iff t has a →swCBV normal form. 2. t is solvable in λCBV iff t has a →swCBV -normal form.

7

Conclusions and future work

We presented λvsub , a new CBV calculus with explicit substitutions, compared it to Herbelin’s and Zimmerman’s λCBV , and proved an internal operational characterisation of solvable terms, simplifying and improving over previous results on CBV solvability. We plan to put forward the study of CBV through λvsub . First goals are to adapt the logical characterization of solvability based on intersection types given in [21,20], and the separability theorem proved in [19]. Simplifications and improvements are expected. We are also interested in a small-step variant of λvsub evaluation, in order to study a call-by-value version of head linear reduction and the connection to call-by-value abstract machines. Acknowledgements The first author wants to thank Simona Ronchi Della Rocca for inviting him in Turin in march 2011, where this work began.

References 1. Accattoli, B.: An abstract factorisation theorem for explicit substitutions (submitted) (2011), https://sites.google.com/site/beniaminoaccattoli/factorisation.pdf 2. Accattoli, B.: Jumping around the box. Ph.D. Thesis, Universit` a di Roma La Sapienza (2011)

3. Accattoli, B., Guerrini, S.: Jumping boxes. In: CSL. pp. 55–70 (2009) 4. Accattoli, B., Kesner, D.: The permutative λ-calculus, accepted at LPAR 2012 5. Accattoli, B., Kesner, D.: The structural λ-calculus. In: CSL 2010. Lecture Notes in Computer Science, vol. 6247, pp. 381–395. Springer-Verlag (2010) 6. Accattoli, B., Paolini, L.: Call-by-value solvability, revisited (ext. version) (2012), https://sites.google.com/site/beniaminoaccattoli/CBV-solvabilitywithproofs.pdf 7. Barendregt, H.P.: The Lambda Calculus – Its Syntax and Semantics, vol. 103. North-Holland (1984) 8. Barendregt, H.: Solvability in lambda-calculi. The Journal of Symbolic Logic 39(2), 372 (1975) 9. Dyckhoff, R., Lengrand, S.: Call-by-value lambda-calculus and ljq. J. Log. Comput. 17(6), 1109–1134 (2007) 10. Fern´ andez, M., Siafakas, N.: Labelled lambda-calculi with explicit copy and erase. In: LINEARITY. pp. 49–64 (2009) 11. Herbelin, H., Zimmermann, S.: An operational account of call-by-value minimal and classical lambda-calculus in ”natural deduction” form. In: TLCA. pp. 142–156. Lecture Notes in Computer Science (2009) 12. Hofmann, M.: Sound and complete axiomatisations of call-by-value control operators. Mathematical Structures in Computer Science 5, 461–482 (1995) 13. Hyland, J.M.E.: A survey of some useful partial order relations on terms of the lambda calculus. In: Lambda-Calculus and Computer Science Theory. pp. 83–95 (1975) 14. Klop, J.W.: On solvability by lambda i - terms. In: Lambda-Calculus and Computer Science Theory. pp. 342–345 (1975) 15. Landin, P.J.: A correspondence between ALGOL 60 and Church’s lambdanotation: Part I and Part II. Communications of the ACM 8(2-3), 89–101,158–165 (1965) 16. Melli`es, P.A.: A factorisation theorem in rewriting theory. In: Category Theory and Computer Science. pp. 49–68 (1997) 17. Moggi, E.: Computational lambda-calculus and monads. In: LICS. pp. 14–23. IEEE Computer Society Press, Piscataway, NJ, USA (1989) 18. Pagani, M., Rocca, S.R.D.: Linearity, non-determinism and solvability. Fundam. Inform. 103(1-4), 173–202 (2010) 19. Paolini, L.: Call-by-value separability and computability. In: ICTCS. pp. 74–89 (2001) 20. Paolini, L., Pimentel, E., Ronchi Della Rocca, S.: Lazy strong normalization. Electr. Notes Theor. Comput. Sci. 136, 103–116 (2005) 21. Paolini, L., Ronchi Della Rocca, S.: Call-by-value solvability. Theoretical Informatics and Applications 33(6), 507–534 (Nov 1999) 22. Plotkin, G.D.: Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science 1, 125–159 (1975) 23. Ronchi Della Rocca, S., Paolini, L.: The Parametric λ-Calculus: a Metamodel for Computation. Texts in Theoretical Computer Science: An EATCS Series, SpringerVerlag, Berlin (2004) 24. Sabry, A., Felleisen, M.: Reasoning about programs in continuation-passing style. LISP and Symbolic Computation 6, 289–360 (1993) 25. Saurin, A.: Standardization and B¨ ohm trees for Λµ-calculus. In: FLOPS. pp. 134– 149 (2010) 26. Wadsworth, C.P.: The relation between computational and denotational properties for Scott’s D∞ -models of the lambda-calculus. SIAM Journal of Computing 5(3), 488–521 (Sep 1976)

Call-by-value solvability, revisited

An operational characterisation of solvability gives a way to compute the ... 3 Weak β-reduction is the applicative-only closure of the β-rule, i.e. it is obtained.

200KB Sizes 1 Downloads 147 Views

Recommend Documents

Call-by-value solvability, revisited
him in Turin in march 2011, where this work started. References. 1. Accattoli, B.: An abstract factorisation theorem for explicit substitutions (decem- ber 2011), https://sites.google.com/site/beniaminoaccattoli/factorisation.pdf. 2. Accattoli, B.: J

Employment by Lotto Revisited
“stable” if each firm and worker has an acceptable match, and no firm and worker .... given matching µ, a firm-worker pair (f,w) is a blocking pair if they are not ...

Solvability problem for strong nonlinear non- diagonal ...
the heat operator, function b = 0 satisfies d) and has a special structure. It is known that in this problem singularities may appear in time inside of Q (see. [2]). As we see, there exist two reasons of nonsmoothness of global solution for (1), (2).

Representation: Revisited - GEOCITIES.ws
SMEC, Curtin University of Technology. The role of representation in ... Education suffered a decline in the last 20 or 30 years. (vonGlaserfled, 1995), which led ...

Representation: Revisited
in which social interchange has a major role in constructing and representing knowledge ... Explicitly speaking, the construction and representation of meaning.

Black Hole Information Revisited
Jun 22, 2017 - 4D: hard radiated quanta are always accompanied by an infinite cloud of tightly correlated soft quanta. In this note we conjecture that the full ...

Signatures of Branched Coverings and Solvability in ...
Jul 5, 2012 - By using the geometry of a sphere, Euclidean and hyperbolic planes one can construct universal ... and the hyperbolic plane is identified with its Poincare model in the unit disc. |z| < 1. We consider ..... linearly independent over Q.

Solvability of Centralized Supervisory Control under ...
S/G. In order to account for actuation and sensing limitations, the set of events Σ is partitioned in two ways. ..... (Consistency checking). (Eic,Γic) ∈ Qic,j ...... J. Quadrat, editors, 11th International Conference on Analysis and Optimization

Robust Bundle Adjustment Revisited - GitHub
Two notable exceptions are [22] and [9], which are dis- ..... Another option proposed in [9] is to rewrite ψ(r) as. (√ ..... adjustment) on a standard laptop computer.

Process Consultation Revisited
... proficient essay writing and custom writing services provided by professional ... the Helping Relationship (Prentice Hall Organizational Development Series), ...

genesis revisited pdf
... was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. genesis revisited pdf.

Avian genomes revisited
Sep 19, 2017 - to access, are a key component of amniote genomes. They experience ..... Recovery of homologous sequences from avian data. We targeted ...

INSTITUTION AND DEVELOPMENT REVISITED - UNCTAD
Sri Lanka. GHA. Ghana. MYS. Malaysia. GIN. Guinea. PAK. Pakistan. GNB. Guinea-Bissau. SGP .... institutions and WTO accession, 2009, 50 p. No. 42 Sudip ...

INSTITUTION AND DEVELOPMENT REVISITED - UNCTAD
The purpose of this series of studies is to analyse policy issues and to stimulate discussions in the area of international trade and development. The series includes studies by. UNCTAD staff and by distinguished researchers from academia. This paper

Revisited Linguistic Intuitions
Jun 10, 2011 - 843—all unadorned page references are to. Devitt [2010]) ..... LITTLE—at least one course in cognitive science, but no syntax. NONE—none of ...

Institution and Development Revisited: A ...
Mar 11, 2008 - HEI Working Paper No: 05/2008. Institution and Development Revisited: A Nonparametric Approach. Sudip Ranjan Basu. United Nations.

The Epidemiological Transition Revisited
fore postulated a fourth stage in the epidemiologic transition. During the “age .... framework, the mortality rates from Groups 1, 2, and 3 in a given country, year, and ... sent the proportions of all deaths that are attributed to each of a set of

The deadlock of democracy revisited
Sep 3, 1998 - did in the Philippines… No country .... long debate in the field of comparative politics. .... which distance from the ideal point is considered. 13.

Matching with Multiple Applications Revisited
Oct 6, 2003 - v vacancies. Each unemployed worker submits a applications with a $. &$,%, ..., v' given. These applications are randomly distributed across ...