jstolarek / slicer

Companion code for paper "Imperative Functional Programs that Explain their Work", Wilmer Ricciotti, Jan Stolarek, Roly Perera and James Cheney, ICFP 2017, Oxford, UK
http://dl.acm.org/citation.cfm?id=3110258
GNU General Public License v3.0
7 stars 0 forks source link

Better abstraction of reference store #35

Closed jstolarek closed 7 years ago

jstolarek commented 7 years ago

Reference store is an IntMap, with store labels being an Int. There are some helper functions that work on a store (deref, storeInsert, insertStoreHole). This is all a bit messy. StoreLabel should be a newtype, not a type synonym, Store should be a record with a map and reference counter (currently handled by Eval monad) and it should be completely abstract.

TODO

jstolarek commented 7 years ago

Also, if StoreLabel is a newtype we could make it into an instance of Valuable, which would be a nice abstraction. At the moment we have to explicitly wrap it in VStoreLoc.

jstolarek commented 7 years ago

Also, StoreLabels should be a set.