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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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.
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.
A.V. Aho and J.D. Ullman. Principles of Compiler Design. Addison-Wesley, Reading, Massachusetts, 1977.
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.
J. Graver and R. Johnson. A Type System for Smalltalk. In Proceedings of POPL, pages 139–150, 1990.
G. Masini, A. Napoli, D. Colnet, D. Léonard, and K. Tombre. Object Oriented Languages. Academic Press Limited, London, 1991.
B. Meyer. Eiffel, The Language. Prentice Hall, 1994.
R. Milner. A Theory of Type Polymorphism in Programming. In Journal of Computer and System Sciences, pages 348–375, 1978.
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.
B. Stroustrup. The C++ Programming Language. Addison-Wesley Series in Computer Science, 1986.
N. Suzuki. Inferring Types in Smalltalk. In Eighth Symposium on Principles of Programming Languages, pages 187–199, 1981.
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.
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.
Author information
Authors and Affiliations
Editor information
Rights 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