计算机科学 > 程序设计语言
[提交于 2017年2月16日 (v1),最后修订于 2017年4月19日 (此版本, v2)]
标题:A monad for full ground reference cells
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.