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.
@inproceedings{kammar-levy-moss-staton-2017,
author = {Kammar, Ohad and Levy, Paul B. and Moss, Sean K. and Staton, Sam},
address = {Reykjavik, Iceland},
publisher = {IEEE Press},
booktitle = {Proceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science},
year = {2017},
month = jun,
doi = {10.1109/LICS.2017.8005109},
isbn = {978-1-5090-3018-7},
title = {A Monad for Full Ground Reference Cells},
}