This semantics will serve as an alternative basis for implementing polymorphic languages. The development of the semantics is based on the technique of type inference based compilation for polymorphic record operations . We first develop a lower-level calculus, called a polymorphic unboxed calculus, that accounts for direct manipulation of unboxed values in a polymorphic language. This unboxed calculus supports efficient value binding through integer representation of variables. Different from de Bruijn indexes, our integer representation of a variable corresponds to the actual offset to the value in a run-time environment consisting of objects of various sizes.
Polymorphism is supported through an abstraction mechanism over argument sizes.
We then develop an algorithm that translates ML into the polymorphic unboxed calculus by using type information obtained through type inference. The ML type system is shown to be sound with respect to the operational semantics realized by the translation. Peter Buneman and Atsushi Ohori. Polymoprhism and Type Inference in Database Programming . ACM Transactions on Database Systems, March 1996.