Abstract
We describe λinkς (pronounced “links”), a low-level calculus designed to serve as the basis for an intermediate representation in compilers for class-based object-oriented languages. The primitives in λinkς can express a wide range of class-based object-oriented language features, including various forms of inheritance, method override, and method dispatch. In particular, λinkς can model the object-oriented features of Moby, OCaml, and Loom, where subclasses may be derived from unknown base classes. λinkς can also serve as the intermediate representation for more conventional class mechanisms, such as Java’s. In this paper, we formally describe λinkς, give examples of its use, and discuss how standard compiler transformations can be used to optimize programs in the λinkς representation.
Chapter PDF
Similar content being viewed by others
Keywords
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
Abadi, M. and L. Cardelli. A Theory of Objects. Springer-Verlag, New York, NY, 1996.
Arnold, K. and J. Gosling. The Java Programming Language. Addison-Wesley, Reading, MA, 2nd edition, 1998.
Appel, A.W. and D. B. MacQueen. A Standard ML compiler. In FPCA’87, vol. 274 of LNCS, NewYork, NY, September 1987. Springer-Verlag, pp. 301–324.
Appel, A.W. Compiling with Continuations. Cambridge University Press, Cambridge, England, 1992.
Ancona, D. and E. Zucca. A primitive calculus for module systems. In PPDP’99, LNCS. Springer-Verlag, September 1999, pp. 62–79.
Barendregt, H. P. The Lambda Calculus, vol. 103 of Studies in Logic and the Foundations of Mathematics. North-Holland, revised edition, 1984.
Bruce, K. B., A. Fiech, and L. Petersen. Subtyping is not a good “match” for object-oriented languages. In ECOOP’97, vol. 1241 of LNCS, NewYork, NY, 1997. Springer-Verlag, pp. 104–127.
Bono, V., A. Patel, and V. Shmatikov. A core calculus of classes and mixins. In ECOOP’99, vol. 1628 of LNCS, NewYork, NY, June 1999. Springer-Verlag.
Cardelli, L. Program fragments, linking, and modularization. In POPL’97, January 1997, pp. 266–277.
Chambers, C. and W. Chen. Efficient predicate dispatching. Technical report, Department of Computer Science, University of Washington, 1998.
Dean, J., G. DeFouw, D. Grove, V. Litvinov, and C. Chambers. Vortex: An optimizing compiler for object-oriented languages. In OOPSLA’96, October 1995, pp. 83–100.
Drossopoulou, S., S. Eisenbach, and D. Wragg. A fragment calculus — towards a model of separate compilation, linking and binary compatibility. In LICS-14, June 1999, pp. 147–156.
Dean, J., D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In ECOOP’95, August 1995.
Driesen, K. and U. Hölzle. Minimizing row displacement dispatch tables. In OOPSLA’95, October 1995, pp. 141–155.
Deutsch, L. P. and A. M. Schiffman. Efficient implementation of the Smalltalk-80 system. In POPL’84, January 1984, pp. 297–302.
Felleisen, M. and D. P. Friedman. Control operators, the SECD-machine, and the λ-calculus. In M. Wirsing (ed.), Formal Description of Programming Concepts-III, pp. 193–219. North-Holland, NewYork, N.Y., 1986.
Flatt, M. and M. Felleisen. Units: Cool modules for HOT languages. In PLDI’98, June 1998, pp. 236–248.
Flatt, M., S. Krishnamurthi, and M. Felleisen. Classes and mixins. In POPL’98, January 1998, pp. 171–183.
Fisher, K. and J. Reppy. The design of a class mechanism for Moby. In PLDI’99, May 1999, pp. 37–49.
Fisher, K. and J. Reppy. Foundations for Moby classes. Technical Memorandum, Bell Labs, Lucent Technologies, Murray Hill, NJ, February 1999.
Flanagan, C., A. Sabry, B. F. Duba, and M. Felleisen. The essence of compiling with continuations. In PLDI’93, June 1993, pp. 237–247.
Grove, D., J. Dean, C. Garrett, and C. Chambers. Profile-guided receiver class prediction. In OOPSLA’95, October 1995, pp. 108–123.
Girard, J.-Y., Y. Lafont, and P. Taylor. Proofs and Types. Cambridge University Press, Cambridge, England, 1989.
Glew, N. and G. Morrisett. Type-safe linking and modular assembly language. In POPL’99, January 1999, pp. 250–261.
Leroy, X. The Objective Caml System (release 2.00), August 1998. Available from http://pauillac.inria.fr/caml.
League, C., Z. Shao, and V. Trifonov. Representing Java classes in a typed intermediate language. In ICFP’99, September 1999, pp. 183–196.
Oliva, D. P. and A. P. Tolmach. From ML to Ada: Strongly-typed language interoperability via source translation. JFP, 8(4), July 1998, pp. 367–412.
Ramsey, N. Relocating machine instructions by currying. In PLDI’96, May 1996, pp. 226–236.
Rémy, D. Efficient representation of extensible records. In ML’92 Workshop, San Francisco, USA, June 1992. pp. 12–16.
Riecke, J. G. and C. Stone. Privacy via subsumption. In FOOL5, January 1998. A longer version will appear in Information and Computation.
Rémy, D. and J. Vouillon. Objective ML: An effective object-oriented extension to ML. TAPOS, 4, 1998, pp. 27–50.
Stroustrup, B. The Design and Evolution of C ++. Addison-Wesley, Reading, MA, 1994.
Stroustrup, B. The C ++ Programming Language. Addison-Wesley, Reading, MA, 3rd edition, 1997.
Tarditi, D. Design and implementation of code optimizations for a type-directed compiler for Standard ML. Ph.D. dissertation, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, December 1996. Available as Technical Report CMU-CS-97-108.
Vanderwaart, J. C. Typed intermediate representations for compiling object-oriented languages, May 1999. Williams College Senior Honors Thesis.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Fisher, K., Reppy, J., Riecke, J.G. (2000). A Calculus for Compiling and Linking Classes. In: Smolka, G. (eds) Programming Languages and Systems. ESOP 2000. Lecture Notes in Computer Science, vol 1782. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46425-5_9
Download citation
DOI: https://doi.org/10.1007/3-540-46425-5_9
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67262-3
Online ISBN: 978-3-540-46425-9
eBook Packages: Springer Book Archive