The Correctness of Type Specialisation

  • Authors:
  • John Hughes

  • Affiliations:
  • -

  • Venue:
  • ESOP '00 Proceedings of the 9th European Symposium on Programming Languages and Systems
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Type specialisation, like partial evaluation, is an approach to specialising programs. But type specialisation works in a very different way, using a form of type inference. Previous articles have described the method and demonstrated its power as a program transformation, but its correctness has not previously been addressed. Indeed, it is not even clear what correctness should mean: type specialisation transforms programs to others with different types, so clearly cannot preserve semantics in the usual sense. In this paper we explain why finding a correctness proof was difficult, we motivate a correctness condition, and we prove that type specialisation satisfies it. Perhaps unsurprisingly, type-theoretic methods turned out to crack the nut.