7,730 research outputs found

    Call-by-name, Call-by-value, Call-by-need, and the Linear Lambda Calculus

    Get PDF
    Girard described two translations of intuitionistic logic into linear logic, one where A -> B maps to (!A) -o B, and another where it maps to !(A -o B). We detail the action of these translations on terms, and show that the first corresponds to a call-by-name calculus, while the second corresponds to call-by-value. We further show that if the target of the translation is taken to be an affine calculus, where ! controls contraction but weakening is allowed everywhere, then the second translation corresponds to a call-by-need calculus, as recently defined by Ariola, Felleisen, Maraist, Odersky, and Wadler. Thus the different calling mechanisms can be explained in terms of logical translations, bringing them into the scope of the Curry-Howard isomorphism

    Call-by-name, call-by-value, call-by-need and the linear lambda calculus

    Get PDF
    this paper is a minor refinement of one previously presented by Wadler [41,42], which is based on Girard's successor to linear logic, the Logic of Unity [15]. A similar calculus has been devised by Plotkin and Barber [6]. In many presentations of logic a key role is played by the structural rules: contraction provides the only way to duplicate an assumption, while weakening provides the only way to discard one. In linear logic [14], the presence of contraction or weakening is revealed in a formula by the presence of the `of course' connective, written `!'. The Logic of Unity [15] takes this separation one step further by distinguishing linear assumptions, which one cannot contract or weaken, from nonlinear or intuitionistic assumptions, which one can. Corresponding to Girard's first translation we define a mapping ffi from the call-byname to the linear calculus and show that this mapping is sound, in that M \Gamma\Gamma\Gamma\Gamma

    Separating weakening and contraction in a linear lambda calculus

    Get PDF
    We present a separated-linear lambda calculus based on a refinement of linear logic which allows separate control of weakening and contraction. The calculus satisfies subject reduction and confluence, has a straightforward notion of standard evaluation, and inherits previous results on the relationship of Girard\u27s two translations from minimal intuitionistic logic to linear logic with call-by-name and call-by-value. We construct a hybrid translation from Girard\u27s two which is sound and complete for mapping types, reduction sequences and standard evaluation sequences from call-by-need into separated-linear lambda, a more satisfying treatment of call-by-need than in previous work, which now allows a contrasting of all three reduction strategies in the manner (for example) that the CPS transla- tions allow for call-by-name and call-by-value

    Distilling Abstract Machines (Long Version)

    Full text link
    It is well-known that many environment-based abstract machines can be seen as strategies in lambda calculi with explicit substitutions (ES). Recently, graphical syntaxes and linear logic led to the linear substitution calculus (LSC), a new approach to ES that is halfway between big-step calculi and traditional calculi with ES. This paper studies the relationship between the LSC and environment-based abstract machines. While traditional calculi with ES simulate abstract machines, the LSC rather distills them: some transitions are simulated while others vanish, as they map to a notion of structural congruence. The distillation process unveils that abstract machines in fact implement weak linear head reduction, a notion of evaluation having a central role in the theory of linear logic. We show that such a pattern applies uniformly in call-by-name, call-by-value, and call-by-need, catching many machines in the literature. We start by distilling the KAM, the CEK, and the ZINC, and then provide simplified versions of the SECD, the lazy KAM, and Sestoft's machine. Along the way we also introduce some new machines with global environments. Moreover, we show that distillation preserves the time complexity of the executions, i.e. the LSC is a complexity-preserving abstraction of abstract machines.Comment: 63 page

    Completeness of algebraic CPS simulations

    Full text link
    The algebraic lambda calculus and the linear algebraic lambda calculus are two extensions of the classical lambda calculus with linear combinations of terms. They arise independently in distinct contexts: the former is a fragment of the differential lambda calculus, the latter is a candidate lambda calculus for quantum computation. They differ in the handling of application arguments and algebraic rules. The two languages can simulate each other using an algebraic extension of the well-known call-by-value and call-by-name CPS translations. These simulations are sound, in that they preserve reductions. In this paper, we prove that the simulations are actually complete, strengthening the connection between the two languages.Comment: In Proceedings DCM 2011, arXiv:1207.682

    Lambda Calculus in Core Aldwych

    Get PDF
    Core Aldwych is a simple model for concurrent computation, involving the concept of agents which communicate through shared variables. Each variable will have exactly one agent that can write to it, and its value can never be changed once written, but a value can contain further variables which are written to later. A key aspect is that the reader of a value may become the writer of variables in it. In this paper we show how this model can be used to encode lambda calculus. Individual function applications can be explicitly encoded as lazy or not, as required. We then show how this encoding can be extended to cover functions which manipulate mutable variables, but with the underlying Core Aldwych implementation still using only immutable variables. The ordering of function applications then becomes an issue, with Core Aldwych able to model either the enforcement of an ordering or the retention of indeterminate ordering, which allows parallel execution

    On Constructor Rewrite Systems and the Lambda Calculus

    Full text link
    We prove that orthogonal constructor term rewrite systems and lambda-calculus with weak (i.e., no reduction is allowed under the scope of a lambda-abstraction) call-by-value reduction can simulate each other with a linear overhead. In particular, weak call-by- value beta-reduction can be simulated by an orthogonal constructor term rewrite system in the same number of reduction steps. Conversely, each reduction in a term rewrite system can be simulated by a constant number of beta-reduction steps. This is relevant to implicit computational complexity, because the number of beta steps to normal form is polynomially related to the actual cost (that is, as performed on a Turing machine) of normalization, under weak call-by-value reduction. Orthogonal constructor term rewrite systems and lambda-calculus are thus both polynomially related to Turing machines, taking as notion of cost their natural parameters.Comment: 27 pages. arXiv admin note: substantial text overlap with arXiv:0904.412

    A lambda calculus for quantum computation with classical control

    Full text link
    The objective of this paper is to develop a functional programming language for quantum computers. We develop a lambda calculus for the classical control model, following the first author's work on quantum flow-charts. We define a call-by-value operational semantics, and we give a type system using affine intuitionistic linear logic. The main results of this paper are the safety properties of the language and the development of a type inference algorithm.Comment: 15 pages, submitted to TLCA'05. Note: this is basically the work done during the first author master, his thesis can be found on his webpage. Modifications: almost everything reformulated; recursion removed since the way it was stated didn't satisfy lemma 11; type inference algorithm added; example of an implementation of quantum teleportation adde
    • 

    corecore