Mint: Java']Java Multi-stage Programming Using Weak Separability

被引:10
|
作者
Westbrook, Edwin [1 ]
Ricken, Mathias [1 ]
Inoue, Jun [1 ]
Yao, Yilong [1 ]
Abdelatif, Tamer [1 ]
Taha, Walid [1 ]
机构
[1] Rice Univ, Houston, TX 77251 USA
关键词
Languages; Multi-staged languages; Multi-stage programming; Type systems; !text type='Java']Java[!/text;
D O I
10.1145/1809028.1806642
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Multi-stage programming (MSP) provides a disciplined approach to run-time code generation. In the purely functional setting, it has been shown how MSP can be used to reduce the overhead of abstractions, allowing clean, maintainable code without paying performance penalties. Unfortunately, MSP is difficult to combine with imperative features, which are prevalent in mainstream languages. The central difficulty is scope extrusion, wherein free variables can inadvertently be moved outside the scopes of their binders. This paper proposes a new approach to combining MSP with imperative features that occupies a "sweet spot" in the design space in terms of how well useful MSP applications can be expressed and how easy it is for programmers to understand. The key insight is that escapes (or "anti-quotes") must be weakly separable from the rest of the code, i.e. the computational effects occurring inside an escape that are visible outside the escape are guaranteed to not contain code. To demonstrate the feasibility of this approach, we formalize a type system based on Lightweight Java which we prove sound, and we also provide an implementation, called Mint, to validate both the expressivity of the type system and the effect of staging on the performance of Java programs.
引用
收藏
页码:400 / 411
页数:12
相关论文
共 50 条
  • [31] Programming multirobot applications using the ThinkingCap-II Java']Java framework
    Martinez-Barbera, H.
    Herrero-Perez, D.
    ADVANCED ENGINEERING INFORMATICS, 2010, 24 (01) : 62 - 75
  • [32] A modular approach to real-time programming using actors and Java']Java
    Nigro, L
    Pupo, F
    CONTROL ENGINEERING PRACTICE, 1998, 6 (12) : 1485 - 1491
  • [33] 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
  • [34] Implicitly heterogeneous multi-stage programming
    Eckhardt, Jason.
    Kaiabachev, Roumen
    Pasalic, Emir
    Swadi, Kedar
    Taha, Walid
    NEW GENERATION COMPUTING, 2007, 25 (03) : 305 - 336
  • [35] Refining Semantics for Multi-stage Programming
    Ge, Rui
    Garcia, Ronald
    ACM SIGPLAN NOTICES, 2017, 52 (12) : 2 - 14
  • [37] Multi-stage programming with explicit annotations
    Taha, W
    Sheard, T
    ACM SIGPLAN NOTICES, 1997, 32 (12) : 203 - 217
  • [38] Multi-stage reactive power programming using genetic algorithm
    Zhao, Xin
    Gao, Shan
    2008 THIRD INTERNATIONAL CONFERENCE ON ELECTRIC UTILITY DEREGULATION AND RESTRUCTURING AND POWER TECHNOLOGIES, VOLS 1-6, 2008, : 1484 - 1487
  • [39] Supply chain planning using multi-stage stochastic programming
    Nagar, Lokesh
    Jain, Karuna
    SUPPLY CHAIN MANAGEMENT-AN INTERNATIONAL JOURNAL, 2008, 13 (03) : 251 - 256
  • [40] Lane recognition method using multi-stage dynamic programming
    Gao, Dezhi
    Duan, Jianmin
    Yang, Lei
    Yang, Xining
    Jixie Gongcheng Xuebao/Journal of Mechanical Engineering, 2011, 47 (08): : 141 - 145