Type inference for unboxed types and first class mutability

  • Authors:
  • Swaroop Sridhar;Jonathan S. Shapiro

  • Affiliations:
  • Johns Hopkins University;Johns Hopkins University

  • Venue:
  • Proceedings of the 3rd workshop on Programming languages and operating systems: linguistic support for modern operating systems
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Systems programs rely on fine-grain control of data representation and use of state to achieve performance, conformance to hard-ware specification, and temporal predictability. The robustness and checkability of these programs could be greatly improved if modern type systems and programming language ideas, such as polymorphism and type inference, could be applied to these programs.BitC is a higher-order programming language in the tradition of ML and Haskell, extended to incorporate both state and the expression of unboxed and low-level datatypes. State and unboxed value types interact in subtle ways with polymorphic type-inference. Unless handled with care in the language design, interactions of these features can lead to unsoundness or results that are counter-intuitive to the programmer. Because instances of value types may have mutable components, a decision must be made concerning their compatibility at copy boundaries: should structurally equivalent types that differ only in their mutability be considered compatible. The choice impacts both the amount of polymorphism that the language can preserve and the burden of type annotation imposed on the programmer.This paper presents some of these challenges and our design for how to address these issues.