首页> 外文会议> >Implicitly Heterogeneous Multi-stage Programming
【24h】

Implicitly Heterogeneous Multi-stage Programming

机译:隐式异构多阶段编程

获取原文
获取原文并翻译 | 示例

摘要

Previous work on semantics-based multi-stage programming (MSP) language design focused on homogeneous designs, where the generating and the generated languages are the same. Homogeneous designs simply add a hygienic quasi-quotation and evaluation mechanism to a base language. An apparent disadvantage of this approach is that the programmer is bound to both the expressivity and performance characteristics of the base language. This paper proposes a practical means to avoid this by providing specialized translations from subsets of the base language to different target languages. This approach preserves the homogeneous "look" of multi-stage programs, and, more importantly, the static guarantees about the generated code. In addition, compared to an explicitly heterogeneous approach, it promotes reuse of generator source code and systematic exploration of the performance characteristics of the target languages. To illustrate the proposed approach, we design and implement a translation to a subset of C suitable for numerical computation, and show that it preserves static typing. The translation is implemented, and evaluated with several benchmarks. The implementation is available in the online distribution of MetaOCaml.
机译:以前基于语义的多阶段编程(MSP)语言设计的工作集中于同类设计,在同类设计中,生成的语言和生成的语言是相同的。同类设计只是在基本语言中添加了卫生的准引用和评估机制。这种方法的一个明显的缺点是,程序员必须同时受限于基本语言的表现力和性能特征。本文提出了一种实用的方法来避免这种情况,方法是提供从基本语言的子集到不同目标语言的专门翻译。这种方法保留了多阶段程序的同质“外观”,更重要的是,保留了有关所生成代码的静态保证。此外,与显式异构方法相比,它促进了生成器源代码的重用和对目标语言的性能特征的系统性探索。为了说明所提出的方法,我们设计并实现了对适合于数值计算的C子集的转换,并表明它保留了静态类型。实施翻译,并使用多个基准进行评估。该实现在MetaOCaml的在线发行版中可用。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号