Closed Types as a Simple Approach to Safe Imperative Multi-stage Programming

  • Authors:
  • Cristiano Calcagno;Eugenio Moggi;Walid Taha

  • Affiliations:
  • -;-;-

  • Venue:
  • ICALP '00 Proceedings of the 27th International Colloquium on Automata, Languages and Programming
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Safely adding computational effects to a multi-stage language has been an open problem. In previous work, a closed type constructor was used to provide a safe mechanism for executing dynamically generated code. This paper proposes a general notion of closed type as a simple approach to safely introducing computational effects into multistage languages. We demonstrate this approach formally in a core language called Mini-MLrefBN. This core language combines safely multi-stage constructs and ML-style references. In addition to incorporating state, Mini-MLrefBN also embodies a number of technical improvements over previously proposed core languages for multi-stage programming.