GENERATING EFFICIENT CODE FOR LAZY FUNCTIONAL LANGUAGES

被引:0
|
作者
SMETSERS, S
NOCKER, E
VANGRONINGEN, J
PLASMEIJER, R
机构
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In this paper we will discuss how a good code generator can be built for (lazy) functional languages. Starting from Concurrent Clean, an experimental lazy functional programming language, code is generated for an intermediate abstract machine: the ABC machine. In this first pass many well-known optimisation techniques are included. However, we will also present some new ideas in this area, like the way in which strictness can be incorporated, and the implementation of higher order functions. In a second pass, the ABC code is translated to concrete target code for the Motorola MC680x0 processor. Again many optimisation methods appear to be applicable. Some of them (for example register allocation algorithms) are common for the implementation of other types of languages, but have to be adapted because of the specific properties of both source language and target machine. Other optimisations are specific for lazy functional languages, e.g. the implementation of higher order functions, efficient memory management and the optimised graph reduction. Measurements demonstrate that due to the optimisations of both passes very fast code can be generated. We have compared Concurrent Clean with two other functional languages, namely Lml and Hope, and also with the imperative language C. With respect to both functional languages this comparison clearly goes in favour of Concurrent Clean. Furthermore, we can conclude that, when using the presented compilation techniques, a lazy functional language is able to compete even with an imperative language such as C.
引用
收藏
页码:592 / 617
页数:26
相关论文
共 50 条
  • [21] The GRIN project: A highly optimising back end for lazy functional languages
    Boquist, U
    Johnsson, T
    IMPLEMENTATION OF FUNCTIONAL LANGUAGES, 1997, 1268 : 58 - 84
  • [23] Lazy code motion
    Knoop, J
    Rüthing, O
    Steffen, B
    ACM SIGPLAN NOTICES, 2004, 39 (04) : 460 - 461
  • [24] LAZY CODE MOTION
    KNOOP, J
    RUTHING, O
    STEFFEN, B
    SIGPLAN NOTICES, 1992, 27 (07): : 224 - 234
  • [25] Heap Recycling for Lazy Languages
    Hage, Jurriaan
    Holdermans, Stefan
    PEPM'08: PROCEEDINGS OF THE 2008 ACM SIGPLAN SYMPOSIUM ON PARTIAL EVALUATION AND SEMANTICS-BASED PROGRAM MANIPULATION, 2008, : 189 - 197
  • [26] Generating Efficient FFT GPU Code with LIFT
    Koepcke, Bastian
    Steuwer, Michel
    Gorlatch, Sergei
    PROCEEDINGS OF THE 8TH ACM SIGPLAN INTERNATIONAL WORKSHOP ON FUNCTIONAL HIGH-PERFORMANCE AND NUMERICAL COMPUTING (FHPNC '19), 2019, : 1 - 13
  • [27] Improvement of RMI performance by generating efficient code
    Maeda, K
    ELECTRONICS AND COMMUNICATIONS IN JAPAN PART I-COMMUNICATIONS, 2003, 86 (10): : 79 - 88
  • [28] GENERATING EFFICIENT CODE FROM STRICTNESS ANNOTATIONS
    LINDSTROM, G
    GEORGE, L
    YEH, D
    LECTURE NOTES IN COMPUTER SCIENCE, 1987, 250 : 140 - 154
  • [29] GENERATING EFFICIENT CODE FROM CONTINUATION SEMANTICS
    PETTERSSON, M
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 477 : 165 - 178
  • [30] Efficient computation of trellis code generating functions
    Shi, J
    Wesel, RD
    IEEE TRANSACTIONS ON COMMUNICATIONS, 2004, 52 (02) : 219 - 227