Abstract
Dynamic subtype tests are frequent operations in Java programs. Naive implementations can be costly in space and running time. The techniques that have been proposed to reduce these costs are either restricted in their ability to cope with dynamic class loading or may suffer from pathological performance degradation penalizing certain programming styles. We present R&B, a subtype test algorithm designed for time and space constrained environments such as Real-Time Java which require predictable running times, low space overheads and dynamic class loading. Our algorithm is constant-time, requires an average of 10.8 bytes per class of memory and has been shown to yield an average 2.5% speedup on a production virtual machine. The Real-Time Specification for Java requires dynamic scoped memory access checks on every reference assignment. We extend R&B to perform memory access checks in constant-time.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Aït-Kaci, H., Boyer, R., Lincoln, P., Nasr, R.: Efficient implementation of lattice operations. ACM Transactions on Programming Languages and Systems 11(1), 115–146 (1989)
Alpern, B., Cocchi, A., Grove, D.: Dynamic type checking in Jalapeno. In: Java Virutal Machine Research and Technology Symposium (April 2001)
Beebee Jr., W.S., Rinard, M.: An implementation of scoped memory for real-time Java. In: Henzinger, T.A., Kirsch, C.M. (eds.) EMSOFT 2001. LNCS, vol. 2211, p. 289. Springer, Heidelberg (2001)
Bollella, G., Gosling, J., Brosgol, B., Dibble, P., Furr, S., Turnbull, M.: The Real-Time Specification for Java. Java Series. Addison-Wesley, Reading (2000)
Caseau, Y.: Efficient handling of multiple inheritance hierarchies. In: Proc. Conference on Object Oriented Programming Systems, Languages & Applications, OOPSLA 1993, Published as SIGPLAN Notices, vol. 28(10), pp. 271–287. ACM Press, New York (1993)
Click, C., Rose, J.: Fast subtype checking in the HotSpot VM. In: Java Grande 2002 (November 2002)
Cohen, N.H.: Type-extension type tests can be performed in constant time. ACM Transactions on Programming Languages and Systems 13(4), 626–629 (1991)
Corsaro, A., Cytron, R.K.: Efficient memory-reference checks for realtime java. In: Proceedings of Languages, Compilers, and Tools for Embedded Systems, LCTES 2003 (2003)
Dean, J., DeFouw, G., Grove, D., Litvinov, V., Chambers, C.: Vortex: An optimizing compiler for object-oriented languages. In: Proc. Conference on Object Oriented Programming Systems, Languages & Applications, OOPSLA 1996. ACM Press, New York (1996)
Dijkstra, E.W.: Recursive programming. Numer. Programming (2), 312–318 (1960)
Habib, M., Nourine, L.: Tree structure for distributive lattices and its applications. Theoretical Computer Science 165, 391–405 (1996)
Higuera-Toledano, T., Issarny, V.: Analyzing the performance of memory management in rtsj. In: Proceedings of the Fifth International Symposium on Object-Oriented Real-Time Distributed Computing, ISORC 2002 (2002)
Krall, A., Grafl, R.: CACAO – a 64 bit JavaVM just-in-time compiler. In: Fox, G.C., Li, W. (eds.) PPoPP 1997 Workshop on Java for Science and Engineering Computation, Las Vegas. ACM, New York (1997)
Krall, A., Vitek, J., Nigel Horspool, R.: Near optimal hierarchical encoding of types. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 128–145. Springer, Heidelberg (1997)
Schubert, M.A., Papalaskaris, L.K., Taugher, J.: Determining type, part, colour, and time relationships. Computer (special issue on Knowledge Representation) 16, 53–60 (1983)
Tofte, M., Talpin, J.-P.: Region based memory management. Information & Computation 132(2), 109–176 (1997)
Vitek, J., Krall, A., Nigel Horspool, R.: Efficient type inclusion tests. In: Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 1997 (October 1997)
Wirth, N.: Type extensions. ACM Transactions on Programming Languages and Systems 10(2), 204–214 (1988)
Wirth, N.: Reply to “type-extension type tests can be performed in constant time”. ACM Transactions on Programming Languages and Systems 13(4), 630 (1991)
Zibin, Y., Gil, J.: Efficient subtyping tests with PQ-Encoding. In: Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 2001 (October 2001)
Zibin, Y., Gil, J.Y.: Fast algorithm for creating space efficient dispatching tables with application to multi-dispatching. In: Proceedings of the 17th ACM conference on Object-oriented programming, systems, languages, and applications (OOPSLA-2002), ACM SIGPLAN Notices, vol. 37(11), pp. 142–160. ACM Press, New York (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Palacz, K., Vitek, J. (2003). Java Subtype Tests in Real-Time. In: Cardelli, L. (eds) ECOOP 2003 – Object-Oriented Programming. ECOOP 2003. Lecture Notes in Computer Science, vol 2743. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45070-2_17
Download citation
DOI: https://doi.org/10.1007/978-3-540-45070-2_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40531-3
Online ISBN: 978-3-540-45070-2
eBook Packages: Springer Book Archive