• Home
  • Search
  • An Unboxed Operational Semantics for ML Polymorphism
  • Cite Icon6
  • https://doi.org/10.1023/a:1007730624053Copy DOI Icon

An Unboxed Operational Semantics for ML Polymorphism

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

We present an unboxed operational semantics for an ML-style polymorphic language. Different from the conventional formalisms, the proposed semantics accounts for actual representations of run-time objects of various types, and supports a refined notion of polymorphism that allows polymorphic functions to be applied directly to values of various different representations. In particular, polymorphic functions can receive multi-word constants such as floating-point numbers without requiring them to be “boxed” (i.e., heap allocated.) This semantics will serve as an alternative basis for implementing polymorphic languages. The development of the semantics is based on the technique of the type-inference-based compilation for polymorphic record operations [20]. 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. At the time of polymorphic let binding, the necessary size abstractions are inserted so that a polymorphic function is translated into a function that is polymorphic not only in the type of the argument but also in its size. The ML type system is shown to be sound with respect to the operational semantics realized by the translation.

Similar Papers
  • Conference Article
  • Citations6

Haskell-style overloading is NP-hard

  • May 16, 1994
  • D.M Volpano
  • Research Article

Let Generalization, Polymorphic Recursion, and Variable Minimization in Boolean-Kinded Type Systems

  • Jan 08, 2026
  • Proceedings of the ACM on Programming Languages
  • Joseph Zullo
  • Research Article
  • Citations3

Relating typability and expressiveness in finite-rank intersection type systems (extended abstract)

  • Sep 01, 1999
  • ACM SIGPLAN Notices
  • Assaf J Kfoury +3
  • Research Article

From ML type inference to stratified type inference

  • Sep 12, 2005
  • ACM SIGPLAN Notices
  • François Pottier
  • Conference Article
  • Citations9

Typing the wild in Erlang

  • Sep 29, 2018
  • Nachiappan Valliappan +1
  • Research Article
  • Citations31

Programming with binders and indexed data-types

  • Jan 18, 2012
  • ACM SIGPLAN Notices
  • Andrew Cave +1
  • Research Article
  • Citations11

Compositional explanation of types and algorithmic debugging of type errors

  • Oct 01, 2001
  • ACM SIGPLAN Notices
  • Olaf Chitil
  • Conference Article
  • Citations412

Refinement types for ML

  • Jan 01, 1991
  • Tim Freeman +1
  • Research Article
  • Citations41

Monadic encapsulation of effects: a revised approach (extended version)

  • Nov 01, 2001
  • Journal of Functional Programming
  • E Moggi +1
  • Conference Article
  • Citations42

Type inference for COBOL systems

  • Oct 12, 1998
  • A Van Deursen +1
  • Book Chapter
  • Citations4

A framework for defining Object-Calculi extended abstract

  • Jan 01, 1999
  • Frédéric Lang +2
  • Conference Article
  • Citations30

Polymorphic type inference for machine code

  • Jun 02, 2016
  • Matt Noonan +2
  • Research Article
  • Citations10

Polymorphic type inference for machine code

  • Jun 02, 2016
  • ACM SIGPLAN Notices
  • Matt Noonan +2
  • Book Chapter
  • Citations6

Heap Slicing Using Type Systems

  • Jan 01, 2012
  • Mohamed A El-Zawawy
  • Research Article

Type inference, principal typings, and let-polymorphism for first-class mixin modules

  • Sep 12, 2005
  • ACM SIGPLAN Notices
  • Henning Makholm +1
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.