5,493 research outputs found
Lazy Evaluation and Delimited Control
The call-by-need lambda calculus provides an equational framework for
reasoning syntactically about lazy evaluation. This paper examines its
operational characteristics. By a series of reasoning steps, we systematically
unpack the standard-order reduction relation of the calculus and discover a
novel abstract machine definition which, like the calculus, goes "under
lambdas." We prove that machine evaluation is equivalent to standard-order
evaluation. Unlike traditional abstract machines, delimited control plays a
significant role in the machine's behavior. In particular, the machine replaces
the manipulation of a heap using store-based effects with disciplined
management of the evaluation stack using control-based effects. In short, state
is replaced with control. To further articulate this observation, we present a
simulation of call-by-need in a call-by-value language using delimited control
operations
Lambda Calculus in Core Aldwych
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
First Class Call Stacks: Exploring Head Reduction
Weak-head normalization is inconsistent with functional extensionality in the
call-by-name -calculus. We explore this problem from a new angle via
the conflict between extensionality and effects. Leveraging ideas from work on
the -calculus with control, we derive and justify alternative
operational semantics and a sequence of abstract machines for performing head
reduction. Head reduction avoids the problems with weak-head reduction and
extensionality, while our operational semantics and associated abstract
machines show us how to retain weak-head reduction's ease of implementation.Comment: In Proceedings WoC 2015, arXiv:1606.0583
Introducing a Calculus of Effects and Handlers for Natural Language Semantics
In compositional model-theoretic semantics, researchers assemble
truth-conditions or other kinds of denotations using the lambda calculus. It
was previously observed that the lambda terms and/or the denotations studied
tend to follow the same pattern: they are instances of a monad. In this paper,
we present an extension of the simply-typed lambda calculus that exploits this
uniformity using the recently discovered technique of effect handlers. We prove
that our calculus exhibits some of the key formal properties of the lambda
calculus and we use it to construct a modular semantics for a small fragment
that involves multiple distinct semantic phenomena
Variable elimination for building interpreters
In this paper, we build an interpreter by reusing host language functions
instead of recoding mechanisms of function application that are already
available in the host language (the language which is used to build the
interpreter). In order to transform user-defined functions into host language
functions we use combinatory logic : lambda-abstractions are transformed into a
composition of combinators. We provide a mechanically checked proof that this
step is correct for the call-by-value strategy with imperative features.Comment: 33 page
- …