Abstract
Restricting destructive update to values of a distinguished reference type prevents functions from being polymorphic in the mutability of their arguments. This restriction makes it easier to reason about program behaviour during transformation, but the lack of polymorphism reduces the expressiveness of the language. We present a System-F style core language that uses dependently kinded proof witnesses to encode information about the mutability of values and the purity of computations. We support mixed strict and lazy evaluation, and use our type system to ensure that only computations without visible side effects are suspended.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Avron, A., Honsell, F., Mason, I.A.: An overview of the Edinburgh Logical Framework. In: Current Trends in Hardware Verification and Automated Theorem Proving, pp. 323–340. Springer, Heidelberg (1989)
Benton, N., Buchlovsky, P.: Semantics of an effect analysis for exceptions. In: Proc. of TLDI 2007, pp. 15–26. ACM, New York (2007)
Benton, N., Kennedy, A.: Monads, effects and transformations. Electronic Notes in Theoretical Computer Science, pp. 1–18. Elsevier, Amsterdam (1999)
Benton, N., Kennedy, A., Beringer, L., Hofmann, M.: Relational semantics for effect-based program transformations with dynamic allocation. In: Proc. of PPDP, pp. 87–96. ACM, New York (2007)
Crary, K., Walker, D., Morrisett, G.: Typed memory management in a calculus of capabilities. In: Proc. of POPL, pp. 262–275. ACM, New York (1999)
de Medeiros Santos, A.L.: Compilation by Transformation in Non-Strict Functional Languages. PhD thesis, University of Glasgow (1995)
Launchbury, J.: A natural semantics for lazy evaluation. In: Proc. of POPL, pp. 144–154. ACM, New York (1993)
Launchbury, J., Jones, S.P.: Lazy functional state threads. In: Proc. of PLDI, pp. 24–35. ACM, New York (1994)
Leroy, X., Doligez, D., Garrigue, J., Rémy, D., Vouillon, J.: The Objective Caml system, release 3.11, documentation and user’s manual. Technical report, INRIA (2008)
Lippmeier, B.: Type Inference and Optimisation for an Impure World. PhD thesis, Australian National University (June 2009) (submitted)
MacQueen, D.B.: Standard ML of New Jersey. In: Małuszyński, J., Wirsing, M. (eds.) PLILP 1991. LNCS, vol. 528, pp. 1–13. Springer, Heidelberg (1991)
Peyton Jones, S., Meijer, E.: Henk: a typed intermediate language. In: Proc. of the Workshop on Types in Compilation (1997)
Peyton Jones, S., Shields, M., Launchbury, J., Tolmach, A.: Bridging the gulf: a common intermediate language for ML and Haskell. In: Proc. of POPL, pp. 49–61. ACM, New York (1998)
Shapiro, J., Sridhar, S., Doerrie, S.: BitC language specification. Technical report, The EROS Group and Johns Hopkins University (2008)
Sulzmann, M., Chakravarty, M.M.T., Jones, S.P., Donnelly, K.: System-F with type equality coercions. In: Proc. of TLDI. ACM, New York (2007)
Talpin, J.-P., Jouvelot, P.: The type and effect discipline. In: Proc. of Logic in Computer Science, pp. 162–173. IEEE, Los Alamitos (1992)
Tofte, M., Birkedal, L., Elsman, M., Hallenberg, N., Olesen, T.H., Sestoft, P.: Programming with regions in the MLKit (revised for version 4.3.0). Technical report, IT University of Copenhagen, Denmark (January 2006)
Tolmach, A.: Optimizing ML using a hierarchy of monadic types. In: Leroy, X., Ohori, A. (eds.) TIC 1998. LNCS, vol. 1473, pp. 97–115. Springer, Heidelberg (1998)
Wadler, P., Thiemann, P.: The marriage of effects and monads. ACM Trans. Computation and Logic 4(1), 1–32 (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lippmeier, B. (2009). Witnessing Purity, Constancy and Mutability. In: Hu, Z. (eds) Programming Languages and Systems. APLAS 2009. Lecture Notes in Computer Science, vol 5904. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-10672-9_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-10672-9_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-10671-2
Online ISBN: 978-3-642-10672-9
eBook Packages: Computer ScienceComputer Science (R0)