Advertisement

A Calculus for Link-Time Compilation

  • Elena Machkasova
  • Franklyn A. Turbak
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1782)

Abstract

We present a module calculus for studying a simple model of link-time compilation. The calculus is stratified into a term calculus, a core module calculus, and a linking calculus. At each level, we show that the calculus enjoys a computational soundness property: if two terms are equivalent in the calculus, then they have the same outcome in a small- step operational semantics. This implies that any module transformation justified by the calculus is meaning preserving. This result is interesting because recursive module bindings thwart confluence at two levels of our calculus, and prohibit application of the traditional technique for showing computational soundness, which requires confluence. We introduce a new technique, based on properties we call lift and project, that uses a weaker notion of confluence with respect to evaluation to establish computational soundness for our module calculus. We also introduce the weak distributivity property for a transformation T operating on modules D 1 and D 2 linked by ⊕: T(D 1D 2) = T(T(D 1) ⊕ T(D 2)). We argue that this property finds promising candidates for link-time optimizations.

Keywords

Operational Semantic Core Module Project Property Evaluation Step Lambda Calculus 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. AB97.
    Z. M. Ariola and S. Blom. Cyclic lambda calculi. In TACS 97, Sendai, Japan, 1997.Google Scholar
  2. AF97.
    Z. M. Ariola and M. Felleisen. The call-by-need lambda calculus. J. Funct. Prog., 3(7), May 1997.Google Scholar
  3. AFM+95.
    Z. M. Ariola, M. Felleisen, J. Maraist, M. Odersky, and P. Wadler. The call-by-need lambda calculus. In Conf. Rec. 22nd Ann. ACM Symp. Princ. of Prog. Langs., pp. 233–246, 1995.Google Scholar
  4. AK97.
    Z. M. Ariola and J. W. Klop. Lambda calculus with explicit recursion. Inf. & Comput., 139(2):154–233, 15 Dec. 1997.zbMATHCrossRefMathSciNetGoogle Scholar
  5. AZ99.
    D. Ancona and E. Zucca. A primitive calculus for module systems. In G. Nadathur, ed., Proc. Int’l Conf. on Principles and Practice of Declarative Programming, LNCS, Paris, France, 29 Sept.–1 Oct. 1999. Springer-Verlag.Google Scholar
  6. Ban97.
    A. Banerjee. A modular, polyvariant, and type-based closure analysis. In Proc. 1997 Int’l Conf. Functional Programming, 1997.Google Scholar
  7. Bar84.
    H. P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. North-Holland, revised edition, 1984.Google Scholar
  8. Car97.
    L. Cardelli. Program fragments, linking, and modularization. In POPL’ 97 [POPL97].Google Scholar
  9. CHP97.
    K. Crary, R. Harper, and S. Puri. What is a recursive module? In Proc. ACM SIGPLAN’ 97 Conf. Prog. Lang. Design & Impl., 1997.Google Scholar
  10. DEW99.
    S. Dossopoulou, S. Eisenbach, and D. Wragg. A fragment calculus — towards a model of separate compilation, linking, and binary compatibility. In Proc. 14th Ann. IEEE Symp. Logic in Computer Sci., July 1999.Google Scholar
  11. DS96.
    D. Duggan and C. Sourelis. Mixin modules. In Proc. 1996 Int’l Conf. Functional Programming, pp. 262–273, 1996.Google Scholar
  12. Fer95.
    M. F. Fernandez. Simple and effective link-time optimization of Modula-3 programs. In Proc. ACM SIGPLAN’ 95 Conf. Prog. Lang. Design & Impl., pp. 103–115, 1995.Google Scholar
  13. FF98.
    M. Flatt and M. Felleisen. Units: Cool modules for HOT languages. In Proc. ACM SIGPLAN’ 98 Conf. Prog. Lang. Design & Impl., 1998.Google Scholar
  14. FH92.
    M. Felleisen and R. Hieb. The revised report on the syntactic theories of sequential control and state. Theor. Comp. Sc., 102:235–271, 1992.CrossRefMathSciNetGoogle Scholar
  15. HL94.
    R. Harper and M. Lillibridge. A type-theoretic approach to higher-order modules with sharing. In POPL’ 94 [POPL94], pp. 123–137.Google Scholar
  16. Jim96.
    T. Jim. What are principal typings and what are they good for? In Conf. Rec. POPL’ 96: 23rd ACM Symp. Princ. of Prog. Langs., 1996.Google Scholar
  17. KW99.
    A. J. Kfoury and J. B. Wells. Principality and decidable type inference for _nite-rank intersection types. In Conf. Rec. POPL’ 99: 26th ACM Symp. Princ. of Prog. Langs., pp. 161–174, 1999.Google Scholar
  18. Ler94.
    X. Leroy. Manifest types, modules, and separate compilation. In POPL’ 94 [POPL94], pp. 109–122.Google Scholar
  19. Ler96.
    X. Leroy. A modular module system. Tech. Rep. 2866, INRIA, Apr. 1996.Google Scholar
  20. MT00.
    E. Machkasova and F. Turbak. A calculus for link-time compilation. Technical report, Comp. Sci. Dept., Boston Univ., 2000.Google Scholar
  21. PC97.
    M. P. Plezbert and R. K. Cytron. Is “just in time” = “better late than never”? In POPL’ 97 [POPL97], pp. 120–131.Google Scholar
  22. Plo75.
    G. D. Plotkin. Call-by-name, call-by-value and the lambda calculus. Theor. Comp. Sc., 1:125–159, 1975.zbMATHCrossRefMathSciNetGoogle Scholar
  23. POPL94.
    Conf. Rec. 21st Ann. ACM Symp. Princ. of Prog. Langs., 1994.Google Scholar
  24. POPL97.
    Conf. Rec. POPL’ 97: 24th ACM Symp. Princ. of Prog. Langs., 1997.Google Scholar
  25. SA93.
    Z. Shao and A. Appel. Smartest recompilation. In Conf. Rec. 20th Ann. ACM Symp. Princ. of Prog. Langs., 1993.Google Scholar
  26. WV99.
    J. B. Wells and R. Vestergaard. Confluent equational reasoning for linking with first-class primitive modules (long version). Full paper with three appendices for proofs, Aug. 1999Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Elena Machkasova
    • 1
  • Franklyn A. Turbak
    • 2
  1. 1.Boston UniversityBostonUSA
  2. 2.Wellesley CollegeWellesleyUSA

Personalised recommendations