11 research outputs found

    What is a categorical model of arrows?

    Get PDF
    We investigate what the correct categorical formulation of Hughes’ Arrows should be. It has long been folklore that Arrows, a functional programming construct, and Freyd categories, a categorical notion due to Power, Robinson and Thielecke, are somehow equivalent. In this paper, we show that the situation is more subtle. By considering Arrows wholly within the base category we derive two alternative formulations of Freyd category that are equivalent to Arrows—enriched Freyd categories and indexed Freyd categories. By imposing a further condition, we characterise those indexed Freyd categories that are isomorphic to Freyd categories. The key differentiating point is the number of inputs available to a computation and the structure available on them, where structured input is modelled using comonads

    Categoral views on computations on trees (Extended abstract)

    Get PDF
    Computations on trees form a classical topic in computing. These computations can be described in terms of machines (typically called tree transducers), or in terms of functions. This paper focuses on three flavors of bottom-up computations, of increasing generality. It brings categorical clarity by identifying a category of tree transducers together with two different behavior functors. The first sends a tree transducer to a coKleisli or biKleisli map (describing the contribution of each local node in an input tree to the global transformation) and the second to a tree function (the global tree transformation). The first behavior functor has an adjoint realization functor, like in Goguen’s early work on automata. Further categorical structure, in the form of Hughes’s Arrows, appears in properly parameterized versions of these structures

    Comonadic Notions of Computation

    Get PDF
    AbstractWe argue that symmetric (semi)monoidal comonads provide a means to structure context-dependent notions of computation such as notions of dataflow computation (computation on streams) and of tree relabelling as in attribute evaluation. We propose a generic semantics for extensions of simply typed lambda calculus with context-dependent operations analogous to the Moggi-style semantics for effectful languages based on strong monads. This continues the work in the early 90s by Brookes, Geva and Van Stone on the use of computational comonads in intensional semantics

    Freyd is Kleisli, for Arrows

    Get PDF
    Contains fulltext : 35849.pdf ( ) (Open Access

    Analysis and construction of logical systems: a category-theoretic approach

    Get PDF
    The aim of this dissertation is to develop categorical foundations for studying lambda calculi and their logics formed into logical systems. We show how internal models for polymorphic lambda calculi arise in any 2-category with a notion of discreteness. We generalise to a 2-categorical setting the famous theorem of Peter Freyd saying that there are no sufficiently (co)complete non-degenerate categories. As a simple corollary, we obtain a variant of Freyd theorem for categories internal to any tensored category. We introduce the concept of an associated category, and relying on it, provide a representation theorem relating our internal models with well-studied fibrational models for polymorphism. Finally, we define Yoneda triangles as relativisations of internal adjunctions, and use them to characterise universes that admit a notion of convolution. We show that such universes induce semantics for lambda calculi. We prove that a construction analogical to enriched Day convolution works for categories internal to a locally cartesian closed category with finite colimits.Celem niniejszej rozprawy jest zbudowanie teoriokategoryjnych fundamentów umożliwiających studiowanie rachunków lambda i ich logik opisanych za pomocą systemów logicznych. Pokazujemy w jaki sposób 2-kategorie z notacją dyskretności pozawalają mówić o modelach dla polimorficznych rachunków lambda. Uogólniamy i internalizujemy w 2-kategoriach klasyczne twierdzenia Petera Freyda o nieistnieniu dostatecznie (ko)zupełnych niezdegenerowanych kategorii. Jako prosty wniosek otrzymujemy wariant twierdzenia Freyda dla kategorii wewnętrznych względem dowolnej kategorii z tensorami. Wprowadzamy pojęcie kategorii stowarzyszonej i bazując na nim dowodzimy twierdzenie o reprezentacji wiążące wprowadzone w rozprawie wewnętrzne modele z dobrze znanymi modelami rozwłóknieniowymi dla polimorfizmu. Definiujemy pojęcie trójkąta Yonedy jako relatywizację wewnętrznych sprzężeń i używamy go do charakteryzacji uniwersów posiadających notację splotu. Pokazujemy, że takie uniwersa indukują semantykę dla rachunków lambda. Dowodzimy, że konstrukcja analogiczna do splotu Day'a dla kategorii wzbogacanych strukturą monoidalną zachodzi także dla kategorii wewnętrznych względem dowolnej lokalnie kartezjańsko domkniętej kategorii ze skończonymi kogranicami

    Lifting of operations in modular monadic semantics

    Get PDF
    Monads have become a fundamental tool for structuring denotational semantics and programs by abstracting a wide variety of computational features such as side-effects, input/output, exceptions, continuations and non-determinism. In this setting, the notion of a monad is equipped with operations that allow programmers to manipulate these computational effects. For example, a monad for side-effects is equipped with operations for setting and reading the state, and a monad for exceptions is equipped with operations for throwing and handling exceptions. When several effects are involved, one can employ the incremental approach to mod- ular monadic semantics, which uses monad transformers to build up the desired monad one effect at a time. However, a limitation of this approach is that the effect-manipulating operations need to be manually lifted to the resulting monad, and consequently, the lifted operations are non-uniform. Moreover, the number of liftings needed in a system grows as the product of the number of monad transformers and operations involved. This dissertation proposes a theory of uniform lifting of operations that extends the incremental approach to modular monadic semantics with a principled technique for lifting operations. Moreover the theory is generalized from monads to monoids in a monoidal category, making it possible to apply it to structures other than monads. The extended theory is taken to practice with the implementation of a new extensible monad transformer library in Haskell, and with the use of modular monadic semantics to obtain modular operational semantics

    Freyd is Kleisli, for Arrows

    No full text

    Lifting of operations in modular monadic semantics

    Get PDF
    Monads have become a fundamental tool for structuring denotational semantics and programs by abstracting a wide variety of computational features such as side-effects, input/output, exceptions, continuations and non-determinism. In this setting, the notion of a monad is equipped with operations that allow programmers to manipulate these computational effects. For example, a monad for side-effects is equipped with operations for setting and reading the state, and a monad for exceptions is equipped with operations for throwing and handling exceptions. When several effects are involved, one can employ the incremental approach to mod- ular monadic semantics, which uses monad transformers to build up the desired monad one effect at a time. However, a limitation of this approach is that the effect-manipulating operations need to be manually lifted to the resulting monad, and consequently, the lifted operations are non-uniform. Moreover, the number of liftings needed in a system grows as the product of the number of monad transformers and operations involved. This dissertation proposes a theory of uniform lifting of operations that extends the incremental approach to modular monadic semantics with a principled technique for lifting operations. Moreover the theory is generalized from monads to monoids in a monoidal category, making it possible to apply it to structures other than monads. The extended theory is taken to practice with the implementation of a new extensible monad transformer library in Haskell, and with the use of modular monadic semantics to obtain modular operational semantics
    corecore