Implicitly heterogeneous multi-stage programming

被引:0
|
作者
Eckhardt, J [1 ]
Kaiabachev, R [1 ]
Pasalic, E [1 ]
Swadi, K [1 ]
Taha, W [1 ]
机构
[1] Rice Univ, Houston, TX 77005 USA
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:275 / 292
页数:18
相关论文
共 50 条
  • [1] Implicitly Heterogeneous Multi-Stage Programming
    Jason Eckhardt
    Roumen Kaiabachev
    Emir Pasalic
    Kedar Swadi
    Walid Taha
    New Generation Computing, 2007, 25 : 305 - 336
  • [2] Implicitly heterogeneous multi-stage programming
    Eckhardt, Jason.
    Kaiabachev, Roumen
    Pasalic, Emir
    Swadi, Kedar
    Taha, Walid
    NEW GENERATION COMPUTING, 2007, 25 (03) : 305 - 336
  • [3] Implicitly heterogeneous multi-stage programming for FPGAs
    Chen, Fulong
    Goyal, Rajat
    Westbrook, Edwin
    Taha, Walid
    Journal of Computational Information Systems, 2010, 6 (14): : 4915 - 4922
  • [4] Multi-stage programming
    Taha, W
    Sheard, T
    ACM SIGPLAN NOTICES, 1997, 32 (08) : 321 - 321
  • [5] A gentle introduction to multi-stage programming
    Taha, W
    DOMAIN-SPECIFIC PROGRAM GENERATION, 2003, 3016 : 30 - 50
  • [6] Refining semantics for multi-stage programming
    Ge, Rui
    Garcia, Ronald
    JOURNAL OF COMPUTER LANGUAGES, 2019, 51 : 222 - 240
  • [7] Refining Semantics for Multi-stage Programming
    Ge, Rui
    Garcia, Ronald
    PROCEEDINGS OF THE 16TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON GENERATIVE PROGRAMMING: CONCEPTS AND EXPERIENCES (GPCE'17), 2017, : 2 - 14
  • [8] Refining Semantics for Multi-stage Programming
    Ge, Rui
    Garcia, Ronald
    ACM SIGPLAN NOTICES, 2017, 52 (12) : 2 - 14
  • [10] Multi-stage programming with explicit annotations
    Taha, W
    Sheard, T
    ACM SIGPLAN NOTICES, 1997, 32 (12) : 203 - 217