Lambda the Ultimate

inactiveTopic Practical Aspects of Multi-Stage Programming
started 3/4/2004; 10:01:01 AM - last post 3/7/2004; 3:09:32 PM
Bryn Keller - Practical Aspects of Multi-Stage Programming  blueArrow
3/4/2004; 10:01:01 AM (reads: 7815, responses: 3)
Practical Aspects of Multi-Stage Programming
via MetaOcaml list

Jason L. Eckhardt, Roumen Kaiabachev, Kedar N. Swadi, Walid Taha and Oleg Kiselyov (draft)

Abstract. High-level languages offer abstraction mechanisms that can reduce development time and improve software quality. But abstraction mechanisms often have an accumulative runtime overhead that can discourage their use.

Multi-stage programming (MSP) languages offer constructs that make it possible to use abstraction mechanisms without paying a runtime overhead. This paper studies applying MSP to implementing dynamic programming (DP) problems. The study reveals that staging high-level implementations of DP algorithms naturally leads to a code explosion problem.

In addition, it is common that high-level languages are not designed to deliver the kind of performance that is desirable in implementations of such algorithms. The paper proposes a solution to each of these two problems. Staged memoization is used for code explosion, and a kind of “offshoring” translation is used to address the second. For basic DP problems, the performance of the resulting specialized C implementations is almost always better than the hand-written generic C implementations.

Since I know at least one of the authors reads LTU fairly regularly, perhaps they'll comment?
Posted to implementation by Bryn Keller on 3/4/04; 10:02:51 AM

Ehud Lamm - Re: Practical Aspects of Multi-Stage Programming  blueArrow
3/7/2004; 11:26:09 AM (reads: 151, responses: 0)
Is the implementation available?

Oleg - Re: Practical Aspects of Multi-Stage Programming  blueArrow
3/7/2004; 3:05:59 PM (reads: 129, responses: 1)
The implementation of the monadic cross-stage memoizing Y combinator is given in the paper itself. The code in the paper is all there is. It runs on the current version of MetaOCaml (and even on a not-so-current one). The subset-of-Caml -> C compiler is not yet in the distribution. One may wish to inquire therefore on a MetaOCaml mailing list: http://www.metaocaml.org

Ehud Lamm - Re: Practical Aspects of Multi-Stage Programming  blueArrow
3/7/2004; 3:09:32 PM (reads: 133, responses: 0)
The subset-of-Caml -> C compiler is not yet in the distribution

This is what I was interested in...

I guess I should follow the MetaOCaml mailing list.