Realistic compilation by partial evaluation

被引:3
|
作者
Sperber, M
Thiemann, P
机构
[1] Wilhelm-Schickard-Inst. F. I., Universität Tübingen, D-72076 Tübingen
关键词
semantics-directed compiler generation; partial evaluation; compilation of higher-order functional languages;
D O I
10.1145/249069.231419
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Two key steps in the compilation of strict functional languages are the conversion of higher-order functions to data structures (closures) and the transformation to tail-recursive style. We show how to perform both steps at once by applying first-order offline partial evaluation to a suitable interpreter. The resulting code is easy to transliterate to low-level C or native code. We have implemented the compilation to C; it yields a performance comparable to that of other modern Scheme-to-C compilers. In addition, we have integrated various optimizations such as constant propagation, higher-order removal and arity raising simply by modifying the underlying interpreter. Purely first-order methods suffice to achieve the transformations. Our approach is an instance of semantics-directed compiler generation.
引用
收藏
页码:206 / 214
页数:9
相关论文
共 50 条
  • [1] Partial evaluation and separate compilation
    Heldal, R
    Hughes, J
    ACM SIGPLAN NOTICES, 1997, 32 (12) : 1 - 11
  • [2] Two for the price of one: Composing partial evaluation and compilation
    Sperber, M
    Thiemann, P
    ACM SIGPLAN NOTICES, 1997, 32 (05) : 215 - 225
  • [3] PARTIAL COMPILATION OF REXX
    PINTER, RY
    VORTMAN, P
    WEISS, Z
    IBM SYSTEMS JOURNAL, 1991, 30 (03) : 312 - 321
  • [4] Just-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation
    Fumero, Juan
    Steuwer, Michel
    Stadler, Lukas
    Dubach, Christophe
    ACM SIGPLAN NOTICES, 2017, 52 (07) : 60 - 73
  • [5] REALISTIC COMPILATION BY PROGRAM TRANSFORMATION - DETAILED SUMMARY
    KELSEY, R
    HUDAK, P
    CONFERENCE RECORD OF THE SIXTEENTH ANNUAL ACM SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 1989, : 281 - 292
  • [6] Partial Compilation of ASP Programs
    Cuteri, Bernardo
    Dodaro, Carmine
    Ricca, Francesco
    Schueller, Peter
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2019, 19 (5-6) : 857 - 873
  • [7] Generating efficient virtual worlds for visualization using partial evaluation and dynamic compilation
    Beshers, C
    Feiner, S
    ACM SIGPLAN NOTICES, 1997, 32 (12) : 107 - 115
  • [8] Optimized Compilation of Aggregated Instructions for Realistic Quantum Computers
    Shi, Yunong
    Leung, Nelson
    Gokhale, Pranav
    Rossi, Zane
    Schuster, David, I
    Hoffmann, Henry
    Chong, Frederic T.
    TWENTY-FOURTH INTERNATIONAL CONFERENCE ON ARCHITECTURAL SUPPORT FOR PROGRAMMING LANGUAGES AND OPERATING SYSTEMS (ASPLOS XXIV), 2019, : 1031 - 1044
  • [9] SEPARATE COMPILATION AND PARTIAL SPECIFICATION IN PASCAL
    CELENTANO, A
    DELLAVIGNA, P
    GHEZZI, C
    MANDRIOLI, D
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1980, 6 (04) : 320 - 328
  • [10] Partial program analysis for staged compilation systems
    Anand, Aditya
    Thakur, Manas
    FORMAL METHODS IN SYSTEM DESIGN, 2024, : 195 - 230