Search engine for discovering works of Art, research articles, and books related to Art and Culture
ShareThis
Javascript must be enabled to continue!

Handling the Selection Monad

View through CrossRef
The selection monad on a set consists of selection functions. These select an element from the set, based on a loss (dually, reward) function giving the loss resulting from a choice of an element. Abadi and Plotkin used the monad to model a language with operations making choices of computations taking account of the loss that would arise from each choice. However, their choices were optimal, and they asked if they could instead be programmer provided. In this work, we present a novel design enabling programmers to do so. We present a version of algebraic effect handlers enriched by computational ideas inspired by the selection monad. Specifically, as well as the usual delimited continuations, our new kind of handlers additionally have access to choice continuations , that give the possible future losses. In this way programmers can write operations implementing optimisation algorithms that are aware of the losses arising from their possible choices. We give an operational semantics for a higher-order model language λC , and establish desirable properties including progress, type soundness, and termination for a subset with a mild hierarchical constraint on allowable operation types. We give this subset a selection monad denotational semantics, and prove soundness and adequacy results. We also present a Haskell implementation and give a variety of programming examples.
Title: Handling the Selection Monad
Description:
The selection monad on a set consists of selection functions.
These select an element from the set, based on a loss (dually, reward) function giving the loss resulting from a choice of an element.
Abadi and Plotkin used the monad to model a language with operations making choices of computations taking account of the loss that would arise from each choice.
However, their choices were optimal, and they asked if they could instead be programmer provided.
In this work, we present a novel design enabling programmers to do so.
We present a version of algebraic effect handlers enriched by computational ideas inspired by the selection monad.
Specifically, as well as the usual delimited continuations, our new kind of handlers additionally have access to choice continuations , that give the possible future losses.
In this way programmers can write operations implementing optimisation algorithms that are aware of the losses arising from their possible choices.
We give an operational semantics for a higher-order model language λC , and establish desirable properties including progress, type soundness, and termination for a subset with a mild hierarchical constraint on allowable operation types.
We give this subset a selection monad denotational semantics, and prove soundness and adequacy results.
We also present a Haskell implementation and give a variety of programming examples.

Related Results

MoNAD structure and the self-awareness
MoNAD structure and the self-awareness
The authors have been studying a conscious module called Module of Nerves for Advanced Dynamics (MoNAD), which is the core of a conscious robot. The functions of a MoNAD satisfy th...
Uniform Monad Presentations and Graph Quasitoposes
Uniform Monad Presentations and Graph Quasitoposes
Category theory is a field of mathematics that provides a unifying framework for the generalisation of mathematical definitions and theorems, and which has found significant applic...
Selection Gradients
Selection Gradients
Natural selection and sexual selection are important evolutionary processes that can shape the phenotypic distributions of natural populations and, consequently, a primary goal of ...
Poems
Poems
poems selection poems selection poems selection poems selection poems selection poems selection poems selection poems selection poems selection poems selection poems selection poem...
The Constructive Lift Monad
The Constructive Lift Monad
The lift monad is the construction which to a poset freely adjoins a bottom<br />element to it, or equivalently (from the classical viewpoint), the construction which freely ...
Azumaya Monads and Comonads
Azumaya Monads and Comonads
The definition of Azumaya algebras over commutative rings \(R\) requires the tensor product of modules over \(R\) and the twist map for the tensor product of any two \(R\)-modules....
Labyrinth, Ruin, Junkspace, Monad: dialectical images of the contemporary city
Labyrinth, Ruin, Junkspace, Monad: dialectical images of the contemporary city
The theoretical presupposition of the discourse developed here is Benjamin’s conception of a dialectical image applied to the experience of the modern and contemporary city. The st...
Coalgebraic Infinite Traces and Kleisli Simulations
Coalgebraic Infinite Traces and Kleisli Simulations
Kleisli simulation is a categorical notion introduced by Hasuo to verify finite trace inclusion. They allow us to give definitions of forward and backward simulation for various ty...

Back to Top