# A monad for full ground reference cells

**Authors:** Ohad Kammar, Paul B. Levy, Sean K. Moss, Sam Staton

arXiv: 1702.04908 · 2017-04-20

## TL;DR

This paper introduces a monadic framework for modeling dynamic memory allocation with cyclic references and encapsulation in a denotational semantics setting, enabling effect masking and supporting full ground references.

## Contribution

It develops a novel monad-based approach for full ground references with encapsulation and effect masking, advancing denotational semantics of mutable memory.

## Key findings

- Defines a monad for full ground references with effect masking
- Provides a denotational semantics for a call-by-value calculus with references
- Validates code transformations involving memory effects

## Abstract

We present a denotational account of dynamic allocation of potentially cyclic memory cells using a monad on a functor category. We identify the collection of heaps as an object in a different functor category equipped with a monad for adding hiding/encapsulation capabilities to the heaps. We derive a monad for full ground references supporting effect masking by applying a state monad transformer to the encapsulation monad. To evaluate the monad, we present a denotational semantics for a call-by-value calculus with full ground references, and validate associated code transformations.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1702.04908/full.md

## Figures

21 figures with captions in the complete paper: https://tomesphere.com/paper/1702.04908/full.md

## References

37 references — full list in the complete paper: https://tomesphere.com/paper/1702.04908/full.md

---
Source: https://tomesphere.com/paper/1702.04908