Results 1 -
5 of
5
Efficient Interpretation by Transforming Data Types and Patterns to Functions
- In Trends in Functional Programming, volume 7. Intellect
, 2007
"... In this paper we present the stepwise construction of an efficient interpreter for lazy functional programming languages like Haskell and Clean. The interpreter is realized by first transforming the source language to the intermediate language SAPL (Simple Application Programming Language) consistin ..."
Abstract
-
Cited by 9 (4 self)
- Add to MetaCart
In this paper we present the stepwise construction of an efficient interpreter for lazy functional programming languages like Haskell and Clean. The interpreter is realized by first transforming the source language to the intermediate language SAPL (Simple Application Programming Language) consisting of pure functions only. During this transformation algebraic data types and pattern-based function definitions are mapped to functions. This eliminates the need for constructs for Algebraic Data Types and Pattern Matching in SAPL. For SAPL a simple and elegant interpreter is constructed using straightforward graph reduction techniques. This interpreter can be considered as a prototype implementation of lazy functional programming languages. Using abstract interpretation techniques the interpreter is optimised. The performance of the resulting interpreter turns out to be very competitive in a comparison with other interpreters like Hugs, Helium, GHCi and Amanda for a number benchmarks. For some benchmarks the interpreter even rivals the speed of the GHC compiler. Due to its simplicity and the stepwise construction this implementation is an ideal subject for introduction courses on implementation aspects of lazy functional programming languages. 1
Translation Of Pattern Matching In A Java-Like Language
"... Pattern matching is a programming language construct that is common in functional programming but somewhat less popular in object-oriented languages. The present paper gives an overview of issues that arise when adding pattern matching to an object-oriented language like Java. ..."
Abstract
- Add to MetaCart
Pattern matching is a programming language construct that is common in functional programming but somewhat less popular in object-oriented languages. The present paper gives an overview of issues that arise when adding pattern matching to an object-oriented language like Java.
From Interpretation to Compilation
"... Abstract. In this paper we sketch some experiments with the construction of a simple compiler for a high level intermediate lazy functional language, with C++ as a target language. Because the compiler is intended for educational and experimental use, simplicity and clearness of construction are con ..."
Abstract
- Add to MetaCart
Abstract. In this paper we sketch some experiments with the construction of a simple compiler for a high level intermediate lazy functional language, with C++ as a target language. Because the compiler is intended for educational and experimental use, simplicity and clearness of construction are considered to be more important than efficiency. Starting point for the construction is a simple interpreter. In a first step this interpreter is turned into a simple compiler in a straightforward manner. The performance of a number of compiled benchmarks is analysed in a comparison with the interpreter and the Clean and GHC compilers. This analysis leads to some suggestions for optimisations. Of these optimisations tail recursion optimisation and optimisation of numerical functions and numerical (sub)expressions in functions are implemented. It turns out that in many cases these optimisations suffice to obtain a competitive performance. 1
Deriving a Strongly Normalizing STG Machine
"... Abstract: We present a modified version of the spineless tagless graph machine (or STG machine for short), that can deal with free variables and makes it possible to use compiled code for the normalization of functional expressions. We derive the machine from a high level semantics, thus enabling a ..."
Abstract
- Add to MetaCart
Abstract: We present a modified version of the spineless tagless graph machine (or STG machine for short), that can deal with free variables and makes it possible to use compiled code for the normalization of functional expressions. We derive the machine from a high level semantics, thus enabling a simple correctness proof. Our modified STG machine has been successfully implemented in the Ulysses system. 1

