Layer by layer - Combining Monads

12/04/2017
by   Fredrik Dahlqvist, et al.
0

We develop a method to incrementally construct programming languages. Our approach is categorical: each layer of the language is described as a monad. Our method either (i) concretely builds a distributive law between two monads, i.e. layers of the language, which then provides a monad structure to the composition of layers, or (ii) identifies precisely the algebraic obstacles to the existence of a distributive law and gives a best approximant language. The running example will involve three layers: a basic imperative language enriched first by adding non-determinism and then probabilistic choice. The first extension works seamlessly, but the second encounters an obstacle, which results in a best approximant language structurally very similar to the probabilistic network specification language ProbNetKAT.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/24/2021

Language Transformations in the Classroom

Language transformations are algorithms that take a language specificati...
research
08/06/2021

The Specification Language Server Protocol: A Proposal for Standardised LSP Extensions

The Language Server Protocol (LSP) changed the field of Integrated Devel...
research
02/09/2021

Native Type Theory

We present a method to construct "native" type systems for a broad class...
research
09/13/2023

A Cancellation Law for Probabilistic Processes

We show a cancellation property for probabilistic choice. If distributio...
research
11/02/2020

ProbRobScene: A Probabilistic Specification Language for 3D Robotic Manipulation Environments

Robotic control tasks are often first run in simulation for the purposes...
research
04/27/2022

A biset-enriched categorical model for Proto-Quipper with dynamic lifting

Quipper and Proto-Quipper are a family of quantum programming languages ...
research
03/20/2013

Local Expression Languages for Probabilistic Dependence: a Preliminary Report

We present a generalization of the local expression language used in the...

Please sign up or login with your details

Forgot password? Click here to reset