Article

Categorical semantics for arrows.

Journal of Functional Programming (Impact Factor: 0.94). 01/2009; 19(3-4):403-438. DOI: 10.1017/S0956796809007308
Source: DBLP

ABSTRACT Arrows are an extension of the well-established notion of a monad in functional programming languages. This article presents several examples and constructions, and develops
denotational semantics of arrows as monoids in categories of bifunctors C^op x C -> C. Observing similarities to monads -- which are monoids in categories of endofunctors C -> C
-- it then considers Eilenberg-Moore and Kleisli constructions for arrows. The latter yields
Freyd categories, mathematically formulating the folklore claim “arrows are Freyd categories”.

0 Bookmarks
 · 
70 Views
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: Multi-level languages and Arrows both facilitate metaprogramming, the act of writing a program which generates a program. The arr function required of all Arrows turns arbitrary host language expressions into guest language expressions; because of this, Arrows may be used for metaprogramming only when the guest language is a superset of the host language. This restriction is also present in multi-level languages which offer unlimited cross-level persistence. This paper introduces generalized arrows and proves that they generalize Arrows in the following sense: every Arrow in a programming language arises from a generalized arrow with that language's term category as its codomain. Generalized arrows impose no containment relationship between the guest language and host language; they facilitate heterogeneous metaprogramming. The category having all generalized arrows as its morphisms and the category having all multi-level languages as its morphisms are isomorphic categories. This is proven formally in Coq, and the proof is offered as justification for the assertion that multi-level languages are generalized arrows. Combined with the existence of a particular kind of retraction in the host language, this proof can be used to define an invertible translation from two-level terms to one-level terms parameterized by a generalized arrow instance. This is ergonomically significant: it lets guest language providers write generalized arrow instances while the users of those guest languages write multi-level terms. This is beneficial because implementing a generalized arrow instance is easier than modifying a compiler, whereas writing two-level terms is easier than manipulating generalized arrow terms.
    07/2010;
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: This dissertation studies the logic behind quantum physics, using category theory as the principal tool and conceptual guide. To do so, principles of quantum mechanics are modeled categorically. These categorical quantum models are justified by an embedding into the category of Hilbert spaces, the traditional formalism of quantum physics. In particular, complex numbers emerge without having been prescribed explicitly. Interpreting logic in such categories results in orthomodular property lattices, and furthermore provides a natural setting to consider quantifiers. Finally, topos theory, incorporating categorical logic in a refined way, lets one study a quantum system as if it were classical, in particular leading to a novel mathematical notion of quantum-mechanical state space.
    Amsterdam University Press., ISBN: 9085550246
  • [Show abstract] [Hide abstract]
    ABSTRACT: Hughes' arrows were shown, by Jacobs et al., to be roughly monads in the bicategory Prof of profunctors (distributors, modules). However in their work as well as others', the categorical nature of the first operator was not pursued and its formulation remained rather ad hoc. In this paper, we identify first with strength for a monad, therefore: arrows are strong monads in Prof. Strong monads have been widely used in the semantics of functional programming after Moggi's seminal work, therefore our observation establishes categorical canonicity of the notion of arrow.
    01/2010;

Full-text (4 Sources)

View
41 Downloads
Available from
May 16, 2014