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 条
  • [31] Generational garbage collection without temporary space leaks for lazy functional languages
    Rojemo, N
    MEMORY MANAGEMENT, 1995, 986 : 145 - 162
  • [32] Generating power of lazy semantics
    Karczmarczuk, J
    THEORETICAL COMPUTER SCIENCE, 1997, 187 (1-2) : 203 - 219
  • [33] EFFICIENT STORAGE MANAGEMENT FOR FUNCTIONAL LANGUAGES
    HARRISON, PG
    COMPUTER JOURNAL, 1982, 25 (02): : 264 - 271
  • [34] LAZY DEBUGGING OF LAZY FUNCTIONAL PROGRAMS
    SNYDER, RM
    NEW GENERATION COMPUTING, 1990, 8 (02) : 139 - 161
  • [35] Generating efficient protocol code from an abstract specification
    Inst Natl de Recherche en, Informatique et Automatique, St. Martin, France
    IEEE ACM Trans Networking, 4 (514-524):
  • [36] Generating efficient tiled code for distributed memory machines
    Tang, PY
    Xue, JL
    PARALLEL COMPUTING, 2000, 26 (11) : 1369 - 1410
  • [37] Generating efficient protocol code from an abstract specification
    Castelluccia, C
    Dabbous, W
    OMalley, S
    IEEE-ACM TRANSACTIONS ON NETWORKING, 1997, 5 (04) : 514 - 524
  • [38] Code optimizations for lazy evaluation
    Bloss, Adrienne
    Hudak, Paul
    Young, Jonathan
    LISP and Symbolic Computation, 1988, 1 (02): : 147 - 164
  • [39] Type-Based Allocation Analysis for Co-recursion in Lazy Functional Languages
    Vasconcelos, Pedro
    Jost, Steffen
    Florido, Mario
    Hammond, Kevin
    PROGRAMMING LANGUAGES AND SYSTEMS, 2015, 9032 : 787 - 811
  • [40] Formally Specifying and Analyzing a Parallel Virtual Machine for Lazy Functional Languages Using Maude
    Fourtounis, Georgios
    Olveczky, Peter Csaba
    Papaspyrou, Nikolaos
    HLPP 11: PROCEEDINGS OF THE FIFTH INTERNATIONAL WORKSHOP ON HIGH-LEVEL PARALLEL PROGRAMMING & APPLICATIONS, 2011, : 19 - 26