Monadic regions

被引:3
作者
Fluet, M [1 ]
Morrisett, G
机构
[1] Cornell Univ, Dept Comp Sci, Ithaca, NY 14853 USA
[2] Harvard Univ, Div Engn & Appl Sci, Cambridge, MA 02138 USA
关键词
languages; theory; effect; monad; parametric polymorphism; region; region-based memory management; type system;
D O I
10.1145/1016848.1016867
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Region-based type systems provide programmer control over memory management without sacrificing type-safety. However, the type systems for region-based languages, such as the ML-Kit or Cyclone, are relatively complicated, so proving their soundness is nontrivial. This paper shows that the complication is in principle unnecessary. In particular, we show that plain old parametric polymorphism, as found in Haskell, is all that is needed. We substantiate this claim by giving a type- and meaning-preserving translation from a region-based language based on core Cyclone to a monadic variant of System F with region primitives whose types and operations are inspired by (and generalize) the ST monad.
引用
收藏
页码:103 / 114
页数:12
相关论文
共 30 条
  • [1] [Anonymous], P PROGR LANG DES IMP
  • [2] ARIOLA Z, 1998, P 25 ACM S PRINC PRO, P62
  • [3] Banerjee A., 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158), P88, DOI 10.1109/LICS.1999.782594
  • [4] Syntactic type soundness results for the region calculus
    Calcagno, C
    Helsen, S
    Thiemann, P
    [J]. INFORMATION AND COMPUTATION, 2002, 173 (02) : 199 - 221
  • [5] CALCAGNO C, 2001, P 28 ACM SIGPLAN SIG, P155
  • [6] CRARY K, 1999, P 26 ACM SIGPLAN SIG, P262
  • [7] FLUET M, 2004, TR20041936 CORN U DE
  • [8] Girard Jean-Yves, 1989, Cambridge Tracts in Theoretical Computer Science
  • [9] GROSSMAN D, 2002, P ACM C PROGR LANG D, P282, DOI DOI 10.1145/512529.512563
  • [10] GROSSMAN D, 2001, 20011856 CORN U DEP