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 条
  • [41] Generating custom code for efficient query execution on heterogeneous processors
    Bress, Sebastian
    Koecher, Bastian
    Funke, Henning
    Zeuch, Steffen
    Rabl, Tilmann
    Markl, Volker
    VLDB JOURNAL, 2018, 27 (06): : 797 - 822
  • [42] GENERATING EFFICIENT CODE FROM DATA-FLOW PROGRAMS
    HALBWACHS, N
    RAYMOND, P
    RATEL, C
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 528 : 207 - 218
  • [43] Generating efficient parallel code for successive over-relaxation
    Tang, PY
    ICA(3)PP 97 - 1997 3RD INTERNATIONAL CONFERENCE ON ALGORITHMS AND ARCHITECTURES FOR PARALLEL PROCESSING, 1997, : 503 - 510
  • [44] Generating custom code for efficient query execution on heterogeneous processors
    Sebastian Breß
    Bastian Köcher
    Henning Funke
    Steffen Zeuch
    Tilmann Rabl
    Volker Markl
    The VLDB Journal, 2018, 27 : 797 - 822
  • [45] Verified Validation of Lazy Code Motion
    Tristan, Jean-Baptiste
    Leroy, Xavier
    PLDI'09 PROCEEDINGS OF THE 2009 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2009, : 316 - 326
  • [46] CODE IMPROVEMENT VIA LAZY EVALUATION
    HANSON, DR
    INFORMATION PROCESSING LETTERS, 1980, 11 (4-5) : 163 - 167
  • [47] Verified Validation of Lazy Code Motion
    Tristan, Jean-Baptiste
    Leroy, Xavier
    ACM SIGPLAN NOTICES, 2009, 44 (06) : 316 - 326
  • [48] On the Variations of ChatGPT's Response Quality for Generating Source Code Across Programming Languages
    de Diego, Angela Gonzalez
    Wotawa, Franz
    TESTING SOFTWARE AND SYSTEMS, ICTSS 2024, 2025, 15383 : 63 - 78
  • [49] Generating Assertion Code from OCL: A Transformational Approach Based on Similarities of Implementation Languages
    Moiseev, Rodion
    Hayashi, Shinpei
    Saeki, Motoshi
    MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2009, 5795 : 650 - 664
  • [50] Generating type-safe script languages from functional APIs
    Horvath, Gabor
    Kozar, Gabor
    Szugyi, Zalan
    INFORMATICS 2013: PROCEEDINGS OF THE TWELFTH INTERNATIONAL CONFERENCE ON INFORMATICS, 2013, : 122 - 126