89 research outputs found
Exploiting parallelism in coalgebraic logic programming
We present a parallel implementation of Coalgebraic Logic Programming (CoALP)
in the programming language Go. CoALP was initially introduced to reflect
coalgebraic semantics of logic programming, with coalgebraic derivation
algorithm featuring both corecursion and parallelism. Here, we discuss how the
coalgebraic semantics influenced our parallel implementation of logic
programming
Category Theory and Model-Driven Engineering: From Formal Semantics to Design Patterns and Beyond
There is a hidden intrigue in the title. CT is one of the most abstract
mathematical disciplines, sometimes nicknamed "abstract nonsense". MDE is a
recent trend in software development, industrially supported by standards,
tools, and the status of a new "silver bullet". Surprisingly, categorical
patterns turn out to be directly applicable to mathematical modeling of
structures appearing in everyday MDE practice. Model merging, transformation,
synchronization, and other important model management scenarios can be seen as
executions of categorical specifications.
Moreover, the paper aims to elucidate a claim that relationships between CT
and MDE are more complex and richer than is normally assumed for "applied
mathematics". CT provides a toolbox of design patterns and structural
principles of real practical value for MDE. We will present examples of how an
elementary categorical arrangement of a model management scenario reveals
deficiencies in the architecture of modern tools automating the scenario.Comment: In Proceedings ACCAT 2012, arXiv:1208.430
Bifibrational functorial semantics of parametric polymorphism
Reynolds' theory of parametric polymorphism captures the invariance of polymorphically typed programs under change of data representation. Semantically, reflexive graph categories and fibrations are both known to give a categorical understanding of parametric polymorphism. This paper contributes further to this categorical perspective by showing the relevance of bifibrations. We develop a bifibrational framework for models of System F that are parametric, in that they verify the Identity Extension Lemma and Reynolds' Abstraction Theorem. We also prove that our models satisfy expected properties, such as the existence of initial algebras and final coalgebras, and that parametricity implies dinaturality
Bifibrational Functorial Semantics For Parametric Polymorphism
Reynolds’ theory of parametric polymorphism captures the invariance of polymorphically typed programs under change of data representation. Semantically, reflexive graph categories and fibrations are both known to give a categorical understanding of parametric polymorphism. This paper contributes further to this categorical perspective by showing the relevance of bifibrations. We develop a bifibrational framework for models of System F that are parametric, in that they verify the Identity Extension Lemma and Reynolds’ Abstraction Theorem. We also prove that our models satisfy expected properties, such as the existence of initial algebras and final coalgebras, and that parametricity implies dinaturality
Modalities, Cohesion, and Information Flow
It is informally understood that the purpose of modal type constructors in
programming calculi is to control the flow of information between types. In
order to lend rigorous support to this idea, we study the category of
classified sets, a variant of a denotational semantics for information flow
proposed by Abadi et al. We use classified sets to prove multiple
noninterference theorems for modalities of a monadic and comonadic flavour. The
common machinery behind our theorems stems from the the fact that classified
sets are a (weak) model of Lawvere's theory of axiomatic cohesion. In the
process, we show how cohesion can be used for reasoning about multi-modal
settings. This leads to the conclusion that cohesion is a particularly useful
setting for the study of both information flow, but also modalities in type
theory and programming languages at large
Tracing monadic computations and representing effects
In functional programming, monads are supposed to encapsulate computations,
effectfully producing the final result, but keeping to themselves the means of
acquiring it. For various reasons, we sometimes want to reveal the internals of
a computation. To make that possible, in this paper we introduce monad
transformers that add the ability to automatically accumulate observations
about the course of execution as an effect. We discover that if we treat the
resulting trace as the actual result of the computation, we can find new
functionality in existing monads, notably when working with non-terminating
computations.Comment: In Proceedings MSFP 2012, arXiv:1202.240
Initial Algebra Semantics for Cyclic Sharing Tree Structures
Terms are a concise representation of tree structures. Since they can be
naturally defined by an inductive type, they offer data structures in
functional programming and mechanised reasoning with useful principles such as
structural induction and structural recursion. However, for graphs or
"tree-like" structures - trees involving cycles and sharing - it remains
unclear what kind of inductive structures exists and how we can faithfully
assign a term representation of them. In this paper we propose a simple term
syntax for cyclic sharing structures that admits structural induction and
recursion principles. We show that the obtained syntax is directly usable in
the functional language Haskell and the proof assistant Agda, as well as
ordinary data structures such as lists and trees. To achieve this goal, we use
a categorical approach to initial algebra semantics in a presheaf category.
That approach follows the line of Fiore, Plotkin and Turi's models of abstract
syntax with variable binding
Modal dependent type theory and dependent right adjoints
In recent years we have seen several new models of dependent type theory
extended with some form of modal necessity operator, including nominal type
theory, guarded and clocked type theory, and spatial and cohesive type theory.
In this paper we study modal dependent type theory: dependent type theory with
an operator satisfying (a dependent version of) the K-axiom of modal logic. We
investigate both semantics and syntax. For the semantics, we introduce
categories with families with a dependent right adjoint (CwDRA) and show that
the examples above can be presented as such. Indeed, we show that any finite
limit category with an adjunction of endofunctors gives rise to a CwDRA via the
local universe construction. For the syntax, we introduce a dependently typed
extension of Fitch-style modal lambda-calculus, show that it can be interpreted
in any CwDRA, and build a term model. We extend the syntax and semantics with
universes
- …