Skip to main content

Type inference for late binding: The SmallEiffel Compiler

  • Conference paper
  • First Online:
Modular Programming Languages (JMLC 1997)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1204))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  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. 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. A.V. Aho and J.D. Ullman. Principles of Compiler Design. Addison-Wesley, Reading, Massachusetts, 1977.

    Google Scholar 

  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. J. Graver and R. Johnson. A Type System for Smalltalk. In Proceedings of POPL, pages 139–150, 1990.

    Google Scholar 

  6. G. Masini, A. Napoli, D. Colnet, D. Léonard, and K. Tombre. Object Oriented Languages. Academic Press Limited, London, 1991.

    Google Scholar 

  7. B. Meyer. Eiffel, The Language. Prentice Hall, 1994.

    Google Scholar 

  8. R. Milner. A Theory of Type Polymorphism in Programming. In Journal of Computer and System Sciences, pages 348–375, 1978.

    Google Scholar 

  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. B. Stroustrup. The C++ Programming Language. Addison-Wesley Series in Computer Science, 1986.

    Google Scholar 

  11. N. Suzuki. Inferring Types in Smalltalk. In Eighth Symposium on Principles of Programming Languages, pages 187–199, 1981.

    Google Scholar 

  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. 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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hanspeter Mössenböck

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Collin, S., Colnet, D., Zendra, O. (1997). Type inference for late binding: The SmallEiffel Compiler. In: Mössenböck, H. (eds) Modular Programming Languages. JMLC 1997. Lecture Notes in Computer Science, vol 1204. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-62599-2_31

Download citation

  • DOI: https://doi.org/10.1007/3-540-62599-2_31

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-62599-5

  • Online ISBN: 978-3-540-68328-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics