Monadic Encapsulation with Stack of Regions

  • Authors:
  • Koji Kagawa

  • Affiliations:
  • -

  • Venue:
  • FLOPS '01 Proceedings of the 5th International Symposium on Functional and Logic Programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many modern programming languages use garbage collection for the sake of reliability and productivity. On the other hand, garbage collection causes several difficulties in some situations, for example, in real-time systems. Tofte and Talpin's region and effect system for ML infers lifetime of objects at compile time and makes it possible to reclaim memory safely without using garbage collectors at run time. Programmers do not have to provide any explicit directives about lifetime of objects. However, it is sometimes necessary for programmers to transform programs specially in order to make the system infer as they intend. As a result, programmers have to know, to some extent, how the system infers about regions. In this paper, we introduce a type system for an ML-like language which also aims for compile-time lifetime inference. It, however, lets programmers delimit lifetime of objects explicitly and makes the system check the correctness of programmers' directives.