Advertisement

Type inference for late binding: The SmallEiffel Compiler

  • Suzanne Collin
  • Dominique Colnet
  • Olivier Zendra
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1204)

Abstract

The SmallEiffel compiler uses a simple type inference mechanism to translate Eiffel source code to C code. The most important aspect in our technique is that many occurrences of late binding are replaced by static binding. Moreover, when dynamic dispatch cannot be removed, inlining is still possible. The advantage of this approach is that it speeds up execution time and decreases considerably the amount of generated code. SmallEiffel compiler source code itself is a large scale benchmark used to show the quality of our results. Obviously, this efficient technique can also be used for class-based languages without dynamic class creation: for example, it is possible for C++[10] or Java and not possible for Smalltalk.

Keywords

Garbage Collection Type Inference Type Array Direct Call Class Animal 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ole Agesen. The Cartesian Product Algorithm: Simple and Precise Type Inference of Parametric Polymorphism. In Proceedings of the 9th European Conference on Object-Oriented Programming (ECOOP'95), pages 2–26, 1995.Google Scholar
  2. 2.
    Ole Agesen. Concrete Type Inference: Delivering Object-Oriented Applications. PhD thesis, Department of Computer Science of Standford University, Published by Sun Microsystem Laboratories (SMLI TR-96-52), 1996.Google Scholar
  3. 3.
    A.V. Aho and J.D. Ullman. Principles of Compiler Design. Addison-Wesley, Reading, Massachusetts, 1977.Google Scholar
  4. 4.
    Diane Corney and John Gough. Type Test Elimination using Typeflow Analysis. In PLSA 1994 International Conference, Zurich. Volume 782 of Lecture Notes in Computer Sciences, Springer-Verlag, pages 137–150, 1994.Google Scholar
  5. 5.
    J. Graver and R. Johnson. A Type System for Smalltalk. In Proceedings of POPL, pages 139–150, 1990.Google Scholar
  6. 6.
    G. Masini, A. Napoli, D. Colnet, D. Léonard, and K. Tombre. Object Oriented Languages. Academic Press Limited, London, 1991.Google Scholar
  7. 7.
    B. Meyer. Eiffel, The Language. Prentice Hall, 1994.Google Scholar
  8. 8.
    R. Milner. A Theory of Type Polymorphism in Programming. In Journal of Computer and System Sciences, pages 348–375, 1978.Google Scholar
  9. 9.
    Jens Palsberg and Michael I. Schwartzbach. Object-Oriented Type Inference. In Proceedings of 6th Annual ACM Conference on Object-Oriented Programming Systems, Languages and Applications(OOPSLA'91), pages 146–161, 1991.Google Scholar
  10. 10.
    B. Stroustrup. The C++ Programming Language. Addison-Wesley Series in Computer Science, 1986.Google Scholar
  11. 11.
    N. Suzuki. Inferring Types in Smalltalk. In Eighth Symposium on Principles of Programming Languages, pages 187–199, 1981.Google Scholar
  12. 12.
    N. Suzuki and M. Terada. Creating Efficient System for Object-Oriented Languages. In Eleventh Annual ACM Symposium on the Principles of Programming Languages, pages 290–296, 1984.Google Scholar
  13. 13.
    J. VitekN, N. Horspool, and J.S. Uhl. Compile-Time Analysis of Object-Oriented Programs. In International Conference on Compiler Construction. Volume 641 of Lecture Notes in Computer Sciences, Springer-Verlag, pages 237–250, 1992.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Suzanne Collin
    • 1
    • 2
  • Dominique Colnet
    • 1
    • 2
  • Olivier Zendra
    • 1
  1. 1.Campus ScientifiqueBâtiment LORIAVandoeuvre-lès-Nancy CedexFrance
  2. 2.Centre de Recherche en Informatique de NancyFrance

Personalised recommendations