Expressing Object Residency Optimizations Using Pointer Type Annotations

Moss, J. Eliot B. and Hosking, Antony L.


We consider some issues in optimizing persistent programming languages. In particular, we show how to express optimizations of object residency checks in strongly typed persistent languages as “annotations” on pointer types. These annotations essentially extend and refine the type system of the language, and they have at least two significant uses. First, a programmer can use them to express desired residency properties to be enforced by the language implementation (compiler plus run time). Second, we can use them to separate a persistence optimizer, which adds annotations, from the remainder of the compiler, which simply obeys them. This gives rise to a nice separation of concerns in supporting high-performance persistence: the “intelligent” optimizer can be factored off from the rest of the compiler.

In addition to modularity benefits, the separation allows us to explore the value of various optimizations without actually implementing them in the optimizer. Rather, we can optimize programs by hand and compare optimized and unoptimized code to develop sound data to use when deciding whether to implement an optimization. While the approach is similar to source-to-source optimizers, which are by no means a new idea, in our case the target language is an extension of the source language, and one specifically designed to be easier to compile well. We are applying the approach in our ongoing implementation of Persistent Modula-3. We present the type annotation approach in the context of Modula-3, but it should be applicable to any strongly typed persistent programming language, as well as to a range of other kinds of optimizations.

  author = {Moss, J. Eliot B. and Hosking, Antony L.},
  title = {Expressing Object Residency Optimizations Using Pointer Type
  booktitle = {International Workshop on Persistent Object Systems},
  series = {POS},
  year = {1994},
  editor = {Atkinson, Malcolm and Maier, David and Benzaken, Veronique},
  pages = {3--15},
  month = {September},
  address = {Tarascon, France},
  publisher = {Springer},
  gscholar = {23}