Loading [MathJax]/extensions/TeX/ieeemacros.js
A graph-based higher-order intermediate representation | IEEE Conference Publication | IEEE Xplore

A graph-based higher-order intermediate representation


Abstract:

Many modern programming languages support both imperative and functional idioms. However, state-of-the-art imperative intermediate representations (IRs) cannot natively r...Show More

Abstract:

Many modern programming languages support both imperative and functional idioms. However, state-of-the-art imperative intermediate representations (IRs) cannot natively represent crucial functional concepts (like higher-order functions). On the other hand, functional IRs employ an explicit scope nesting, which is cumbersome to maintain across certain transformations. In this paper we present Thorin: a higher-order, functional IR based on continuation-passing style that abandons explicit scope nesting in favor of a dependency graph. This makes Thorin an attractive IR for both imperative as well as functional languages. Furthermore, we present a novel program transformation to eliminate the overhead caused by higher-order functions. The main component of this transformation is lambda mangling: an important transformation primitive in Thorin. We demonstrate that lambda mangling subsumes many classic program transformations like tail-recursion elimination, loop unrolling or (partial) inlining. In our experiments we show that higher-order programs translated with Thorin are consistently as fast as C programs.
Date of Conference: 07-11 February 2015
Date Added to IEEE Xplore: 05 March 2015
Electronic ISBN:978-1-4799-8161-8
Conference Location: San Francisco, CA, USA

Contact IEEE to Subscribe

References

References is not available for this document.