ACM Home Page
Please provide us with feedback. Feedback
Formally optimal boxing
Full text PdfPdf (1.53 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Portland, Oregon, United States
Pages: 213 - 226  
Year of Publication: 1994
ISBN:0-89791-636-0
Authors
Fritz Henglein  Univ. of Copenhagen, Copenhagen, Denmark
Jesper Jørgensen  Univ. of Copenhagen, Copenhagen, Denmark
Sponsors
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 2,   Downloads (12 Months): 39,   Citation Count: 15
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/174675.177874
What is a DOI?

ABSTRACT

An important implementation decision in polymorphically typed functional programming language is whether to represent data in boxed or unboxed form and when to transform them from one representation to the other. Using a language with explicit representation types and boxing/unboxing operations we axiomatize equationally the set of all explicitly boxed versions, called completions, of a given source program. In a two-stage process we give some of the equations a rewriting interpretation that captures eliminating boxing/unboxing operations without relying on a specific implementation or even semantics of the underlying language. The resulting reduction systems operate on congruence classes of completions defined by the remaining equations E, which can be understood as moving boxing/unboxing operations along data flow paths in the source program. We call a completion eopt formally optimal if every other completion for the same program (and at the same representation type) reduces to eopt under this two-stage reduction. We show that every source program has formally optimal completions, which are unique modulo E. This is accomplished by first “polarizing” the equations in E and orienting them to obtain two canonical (confluent and strongly normalizing) rewriting systems. The completions produced by Leroy's and Poulsen's algorithms are generally not formally optimal in our sense. The rewriting systems have been implemented and applied to some simple Standard ML programs. Our results show that the amount of boxing and unboxing operations is also in practice substantially reduced in comparison to Leroy's completions. This analysis is intended to be integrated into Tofte's region-based implementation of Standard ML currently underway at DIKU.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

BGS82
 
Bjø92
Niko}aj Bjerner. Minimal typing derivations. DIKU Student Report, July 1992.
 
BTCGS91
BTGS90
CF91
 
CG90
DM82
 
Ghe90
G. Ghelli. Proof Theoretic Studies about a Minimal Type System Integrating Inclusion and Parametric Polymorphism. PhD thesis, Universita di Piss, Dipartimento di informatica, March 1990.
 
Hen93
HM93
KKR+86
Ler92
 
Mil78
R. Milner. A theory of type polymorphism in programming. J. Computer and System Sciences, 17:348-375, 1978.
Pet89
 
PJL91
 
Pou93
Eigil Poulsen. Representation analysis for efficient implementation of polymorphism. Master's thesis, DIKU, University of Copenhagen, 1993.
 
Rey83
J. Reynolds. Types, abstraction and parametric polymorphism. Information Processing, pages 513-523, 1983.
 
Ste77
G. Steele. Fast arithmetic in MacLisp. In Proc. 1977 MACSYMA Users' Conference, NASA Scientific and Technical Information Office, Washington, D.C., July 1977.
TT94
Wad89
 
WF92
A. Wright and M. Fagan. Soft typing and global representation optimization. Manuscript, July 1992.

CITED BY  15


REVIEW

"R. Sambasiva Rao : Reviewer"

LISP is a dynamically typed high-level language, while Standard ML and Haskell are statically typed polymorphic languages. The type of representation of data and the mode of implementation in a program result in different efficiencies when the  more...

Collaborative Colleagues:
Fritz Henglein: colleagues
Jesper Jørgensen: colleagues