Inlining as staged computation

4Citations
Citations of this article
10Readers
Mendeley users who have this article in their library.

Abstract

Inlining and specialisation appear in various forms throughout the implementation of modern programming languages. From mere compiler optimizations to sophisticated techniques in partial evaluation, they are omnipresent, yet each application is treated differently. This paper is an attempt at uncovering the relations between inlining (as done in production compilers) and staged computation (as done in partial evaluators) in the hope of bringing together the research advances in both fields. Using a two-level lambda calculus as the intermediate language, we show how to model inlining as a staged computation while avoiding unnecessary code duplication. The new framework allows us to define inlining annotations formally and to reason about their interactions with module code. In fact, we present a cross-module inlining algorithm that inlines all functions marked inlinable, even in the presence of ML-style parameterized modules.

Cite

CITATION STYLE

APA

Monnier, S., & Shao, Z. (2003). Inlining as staged computation. Journal of Functional Programming, 13(3), 647–676. https://doi.org/10.1017/S0956796802004616

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free