Optimal Lambda Lifting in Quadratic Time

  • Marco T. Morazán
  • Ulrik P. Schultz
Conference paper

DOI: 10.1007/978-3-540-85373-2_3

Part of the Lecture Notes in Computer Science book series (LNCS, volume 5083)
Cite this paper as:
Morazán M.T., Schultz U.P. (2008) Optimal Lambda Lifting in Quadratic Time. In: Chitil O., Horváth Z., Zsók V. (eds) Implementation and Application of Functional Languages. IFL 2007. Lecture Notes in Computer Science, vol 5083. Springer, Berlin, Heidelberg

Abstract

The process of lambda lifting flattens a program by lifting all local function definitions to the global level. Optimal lambda lifting computes the minimal set of extraneous parameters needed by each function as is done by the O(n3) equation-based algorithm proposed by Johnsson. In contrast, modern lambda lifting algorithms have used a graph-based approach to compute the set of extraneous parameters needed by each function. Danvy and Schultz proposed an algorithm that reduced the complexity of lambda lifting from O(n3) to O(n2). Their algorithm, however, is an approximation of optimal lambda lifting. Morazán and Mucha proposed an optimal graph-based algorithm at the expense of raising the complexity to O(n3). Their algorithm, however, suggested that dominator trees might be used to develop an O(n2) algorithm. This article explores the relationship between the call graph of a program, its dominator tree, and lambda lifting by developing algorithms for successively richer sets of programs. The result of this exploration is an O(n2) optimal lambda lifting algorithm.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Marco T. Morazán
    • 1
  • Ulrik P. Schultz
    • 2
  1. 1.Seton Hall UniversitySouth OrangeUSA
  2. 2.University of Southern DenmarkOdenseDenmark

Personalised recommendations