1,171 research outputs found
A Study In Monads
This thesis investigates both theory and applications of the monad in a functional setting. Monads are constructs simulating different types of computations, such as indeterminism, exception handling, stateful computations, IO, and much more, all in the functional paradigm. The thesis starts by defining the monad, and builds up the theory around it. Three large implementaional examples using monads are presented: One implementation of a small interpreter for lambda calculus with graph sharing, one framework for writing symmetric cryptographic algorithms, and one more theoretical construction of a catamorphism and comprehension based monadic query language. All of these examples uses combinations of several monads to form complex computations with a high level of expressiveness. Other related constructs are discussed, as well as a presentation of the foundation for monads in category theory. A new monad is also introduced, the Pair monad. This monad is a generalisation of the list monad, and simulates substitution in tree-like structures, such as lambda terms. Furthermore, the thesis makes an investigation into the Curry-Howard Correspondence with a first order lambda calculus extended with monads, called computational lambda calculus. This results in a sublogic of constructive S4 modal logic. The thesis also uses the Kripke semantic for this logic to deduce a Kripke semantic for type setting lambda terms in computational lambda calculus
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
Semantics of a Typed Algebraic Lambda-Calculus
Algebraic lambda-calculi have been studied in various ways, but their
semantics remain mostly untouched. In this paper we propose a semantic analysis
of a general simply-typed lambda-calculus endowed with a structure of vector
space. We sketch the relation with two established vectorial lambda-calculi.
Then we study the problems arising from the addition of a fixed point
combinator and how to modify the equational theory to solve them. We sketch an
algebraic vectorial PCF and its possible denotational interpretations
Logical Relations for Monadic Types
Logical relations and their generalizations are a fundamental tool in proving
properties of lambda-calculi, e.g., yielding sound principles for observational
equivalence. We propose a natural notion of logical relations able to deal with
the monadic types of Moggi's computational lambda-calculus. The treatment is
categorical, and is based on notions of subsconing, mono factorization systems,
and monad morphisms. Our approach has a number of interesting applications,
including cases for lambda-calculi with non-determinism (where being in logical
relation means being bisimilar), dynamic name creation, and probabilistic
systems.Comment: 83 page
Initial Semantics for Reduction Rules
We give an algebraic characterization of the syntax and operational semantics
of a class of simply-typed languages, such as the language PCF: we characterize
simply-typed syntax with variable binding and equipped with reduction rules via
a universal property, namely as the initial object of some category of models.
For this purpose, we employ techniques developed in two previous works: in the
first work we model syntactic translations between languages over different
sets of types as initial morphisms in a category of models. In the second work
we characterize untyped syntax with reduction rules as initial object in a
category of models. In the present work, we combine the techniques used earlier
in order to characterize simply-typed syntax with reduction rules as initial
object in a category. The universal property yields an operator which allows to
specify translations---that are semantically faithful by construction---between
languages over possibly different sets of types.
As an example, we upgrade a translation from PCF to the untyped lambda
calculus, given in previous work, to account for reduction in the source and
target. Specifically, we specify a reduction semantics in the source and target
language through suitable rules. By equipping the untyped lambda calculus with
the structure of a model of PCF, initiality yields a translation from PCF to
the lambda calculus, that is faithful with respect to the reduction semantics
specified by the rules.
This paper is an extended version of an article published in the proceedings
of WoLLIC 2012.Comment: Extended version of arXiv:1206.4547, proves a variant of a result of
PhD thesis arXiv:1206.455
Intersection Types for the Computational lambda-Calculus
We study polymorphic type assignment systems for untyped lambda-calculi with
effects, based on Moggi's monadic approach. Moving from the abstract definition
of monads, we introduce a version of the call-by-value computational
lambda-calculus based on Wadler's variant with unit and bind combinators, and
without let. We define a notion of reduction for the calculus and prove it
confluent, and also we relate our calculus to the original work by Moggi
showing that his untyped metalanguage can be interpreted and simulated in our
calculus. We then introduce an intersection type system inspired to Barendregt,
Coppo and Dezani system for ordinary untyped lambda-calculus, establishing type
invariance under conversion, and provide models of the calculus via inverse
limit and filter model constructions and relate them. We prove soundness and
completeness of the type system, together with subject reduction and expansion
properties. Finally, we introduce a notion of convergence, which is precisely
related to reduction, and characterize convergent terms via their types
- …