Fast binding-time analysis for multi-level specialization

  • Robert Glück
  • Jesper Jørgensen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1181)


Program specialization can divide a computation into several computation stages. We present the key ingredient of our approach to multi-level specialization: an accurate and fast multi-level binding-time analysis. Three efficient program analyses for higher-order, functional languages are presented which are based on constraint systems and run almost-linear in the size of the analyzed programs. The three constraint normalizations have been proven correct (soundness, completeness, termination, existence of best solution). The analyses have all been implemented for a substantial, higher-order subset of Scheme. Experiments with widely-available example programs confirm the excellent run-time behavior of the normalization algorithms.


program transformation partial evaluation program analysis generating extensions functional languages 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    L.O. Andersen. Binding-time analysis and the taming of C pointers. In Partial Evaluation and Semantics-Based Program Manipulation, ACM Press, 1993.Google Scholar
  2. 2.
    L. Birkedal, M. Welinder. Binding-time analysis for Standard ML. Lisp and Symbolic Computation, 8(3): 191–208, 1995.Google Scholar
  3. 3.
    A. Bondorf. Automatic autoprojection of higher order recursive equations. Science of Computer Programming, 17(1-3):3–34, 1991.Google Scholar
  4. 4.
    A. Bondorf, J. Jørgensen. Efficient analyses for realistic off-line partial evaluation. J of Functional Programming, 3(3):315–346, 1993.Google Scholar
  5. 5.
    C. Consel. Binding time analysis for higher order untyped functional languages. In Conference on Lisp and Functional Languages. 264–272, ACM Press, 1990.Google Scholar
  6. 6.
    A. P. Ershov. On the essence of compilation. In E. J. Neuhold (ed.), Formal Description of Programming Concepts, 391–420. North-Holland, 1978.Google Scholar
  7. 7.
    R. Glück, J. Jørgensen. Generating optimizing specializers. In IEEE International Conference on Computer Languages, 183–194. 1994.Google Scholar
  8. 8.
    R. Glück, J. Jørgensen. Efficient multi-level generating extensions for program specialization. In M. Hermenegildo, S. D. Swierstra (eds.) Programming Languages, Implementations, Logics and Programs, LNCS 982, 259–278, Springer-Verlag, 1995.Google Scholar
  9. 9.
    C. K. Gomard. Partial type inference for untyped functional programs. In ACM Conference on Lisp and Functional Programming, 282–287, ACM Press, 1990.Google Scholar
  10. 10.
    C. K. Gomard, N. D. Jones. A partial evaluator for the untyped lambda calculus. J of Functional Programming, 1(1):21–69, 1991.Google Scholar
  11. 11.
    F. Henglein. Efficient type inference for higher-order binding-time analysis. In J. Hughes (ed.), Functional Programming and Computer Architecture, LNCS 523, 448–472, Springer-Verlag, 1991.Google Scholar
  12. 12.
    IEEE. Standard for the Scheme programming language, IEEE Std 1178-1990.Google Scholar
  13. 13.
    N. D. Jones, C. K. Gomard, P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.Google Scholar
  14. 14.
    J. Jørgensen. Generating a compiler for a lazy language by partial evaluation. In Symposium on Principles of Programming Languages. 258–268, 1992.Google Scholar
  15. 15.
    F. Nielson, H. R. Nielson. Two-Level Functional Languages, volume 34 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1992.Google Scholar
  16. 16.
    F. Nielson, H. R. Nielson. Multi-level lambda-calculus: an algebraic description. In O. Danvy, R. Glück, P. Thiemann (eds.), Partial Evaluation. LNCS 1110, Springer-Verlag, 1996.Google Scholar
  17. 17.
    J. Palsberg, P. O'Keefe. A type system equivalent to flow analysis. TOPLAS, 17(4):576–599, 1995.Google Scholar
  18. 18.
    J. Rehof. Polymorphic dynamic typing. Master's thesis, Univ. of Copenhagen, Denmark, 1995.Google Scholar
  19. 19.
    R. Tarjan. Data Structures and Network Flow Algorithms, vol. CMBS 44 of Regional Conference Series in Applied Mathematics. SIAM, 1983.Google Scholar
  20. 20.
    P. Thiemann. Cogen in six lines. In International Conference on Functional Programming. 180–189, ACM Press, 1996.Google Scholar
  21. 21.
    M. Wand. Specifying the correctness of binding-time analysis. J of Functional Programming, 3(3):365–387, 1993.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Robert Glück
    • 1
  • Jesper Jørgensen
    • 2
  1. 1.Dept. of Computer ScienceUniversity of CopenhagenCopenhagenDenmark
  2. 2.Dept. of Computer ScienceKatholieke Universiteit LeuvenHeverleeBelgium

Personalised recommendations