Hostname: page-component-76fb5796d-zzh7m Total loading time: 0 Render date: 2024-04-25T09:26:51.976Z Has data issue: false hasContentIssue false

From ML to Ada: Strongly-typed language interoperability via source translation

Published online by Cambridge University Press:  01 July 1998

ANDREW TOLMACH
Affiliation:
Pacific Software Research Center, Department of Computer Science, Portland State University, P.O. Box 751, Portland, OR, 97207-0751, USA; (e-mail: apt@cs.pdx.edu)
DINO P. OLIVA
Affiliation:
Pacific Software Research Center, Department of Computer Science and Engineering, Oregon Graduate Institute, 20000 N.W. Walker Road, P.O. Box 91000, Portland, OR 97291-1000, USA; (e-mail: oliva@cse.ogi.edu) Current address: Bell Laboratories, Rm 2C-408, 600 Mountain Ave., Murray Hill NJ 07974-0636, USA.
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, ‘vanilla’ C or Ada; it offers simple, efficient, type-safe inter-operation between new functional code components and ‘legacy’ third-generation-language components. Our translator represents a novel synthesis of techniques including user-parameterized specification of primitive types and operators; removal of polymorphism by code specialization; removal of higher-order functions using closure datatypes and interpretation; and aggressive optimization of the resulting first-order code, which can be viewed as encoding the result of a closure analysis. Programs remain fully typed at every stage of the translation process, using only simple, standard type systems. Target code runs at speeds comparable to the output of current optimizing ML compilers, even though handicapped by a conservative garbage collector.

Type
Research Article
Copyright
© 1998 Cambridge University Press

Footnotes

This work was supported, in part, by the US Air Force Materiel Command under contract F19628-93-C-0069. The first author was also supported, in part, by the National Science Foundation under grant CCR-9503383. A portion of this work was previously presented by the first author at the 1997 Workshop on Types in Compilation, under the title ‘Combining Closure Conversion with Closure Analysis using Algebraic Types’.
Submit a response

Discussions

No Discussions have been published for this article.