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

From ML to Ada: Strongly-typed language interoperability via source translation
复制标题

从 ML 到 Ada:通过源翻译实现强类型语言互操作性

DOI:
--
复制
发表时间:
1998
影响因子:
1.1
通讯作者:
D. Oliva
D. Oliva
中科院分区:
计算机科学2区
文献类型:
--
作者:
A. Tolmach;D. Oliva

文献摘要

被引文献

相似文献

我们描述了一个系统,支持源代码级集成的ML类函数语言代码与ANSI C或Ada 83代码。该系统的工作原理是将功能代码翻译成类型正确的“香草”C或Ada;它在新的功能代码组件和“遗留”第三代语言组件之间提供了简单,高效,类型安全的互操作。我们的翻译代表了一种新的技术合成,包括用户参数化规范的原始类型和操作符;删除代码专业化的多态性;删除高阶函数使用闭包datashees和解释;和积极优化所产生的一阶代码,这可以被看作是编码的闭包分析的结果。程序在翻译过程的每个阶段都保持完全类型化,只使用简单的标准类型系统。目标代码的运行速度与当前优化ML编译器的输出相当,即使受到保守的垃圾收集器的阻碍。
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.