Abstract
Type inclusion tests consist in determining whether a type is a subtype of another. An efficient implementation of type inclusion an important feature of object oriented programming languages. A well-known method to achieve these tests is to associate to each type a subset of a set S = {1, . . . , k} such that type inclusion coincides with subset inclusion. Such an embedding of types into 2S (the lattice of all subsets of S) is called a bit-vector encoding of the type hierarchy. These encodings are known for several interesting features. Bit-vector encodings are perfectly appropriate for hierarchies with single subtyping as well as hierarchies with multiple subtyping. Subset inclusion tests can be performed very efficiently.
Several works have studied bit-vector encodings froma theoretical point of view ([6], [7], [10], [14], [16], [18], [19]) and froma practical point of view ([3], [8], [9], [17]), in particular in order to minimize the size of the encoding, i.e. the size of S.
In this article, we present a new algorithmw hich computes bit-vector encodings for single subtyping hierarchies, also called tree hierarchies. Our algorithm is simple, it computes the bit-vector encoding very quickly and gives good results for the size of the encoding. In particular, we have significantly improved the best bounds known for the encoding sizes of some benchmarks presented in [9].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
H. At-Kaci, R. Boyer, P. Lincoln, and R. Nasr. Efficient implementation of lattice operations. ACM Transactions on Programming Langages and Systems, 11(1):115–146, january 1989.
A. Bouchet. Codages et dimensions de relations binaires. Annals of Discrete Mathematics 23, Ordres: Description and Roles, (M. Pouzet, D. Richard eds), 1984.
Yves Caseau. Efficient handling of multiple inheritance hierarchies. In OOPSLA’ 93, pages 271–287, 1993.
G. Ellis. Efficient retrieval from hierarchies of objects using lattice operations. In Conceptual Graphs for knowledge representation, (Proc. International conference on Conceptual Structures, Quebec City, Canada, August 4-7, 1993), G. W. Mineau, B. Moulin and J. Sowa, Eds,Lecture Notes in Artificial Intelligence 699, Springer, Berlin, 1993.
A. Fall. The foundations of taxomic encoding. in International KRUSE Symposium: Knowledge Retrieval, Use and Storage for Efficiency, University of Santa-Cruz., August 1995.
M. Habib, M. Huchard, and L. Nourine. Embedding partially ordered sets into chain-products. In International KRUSE Symposium: Knowledge Retrieval, Use and Storage for Efficiency. University of Santa-Cruz., pages 147–161, August 1995.
M. Habib and L. Nourine. Bit-vector encoding for partially ordered sets. In Proc. of International Workshop ORDAL’94, editor, Orders, Algorithms and Applications, number 831, pages 1–12, Lyon, France, July 1994. LNCS.
M. Habib, L. Nourine, and O. Raynaud. A new lattice-based heuristic for taxonomy encoding. In International KRUSE Symposium: Knowledge Retrieval, Use and Storage for Efficiency. Vancouver., pages 60–71, August 1997.
A. Krall, J. Vitek, and R.N. Horspool. Near optimal hierarchical encoding of types. In Ecoop’97, LNCS, number 1241, pages 128–145.
G. Markowsky. The representation of posets and lattices by sets. Algebra Universalis, 11:173–192, 1980.
N.H. Cohen. Type-extension type tests can be performed in constant time. Programming languages and systems, 13(4):626–629, July 1991.
C. Quiennec. Fast and compact dispatching for dynamic object-oriented languages. Information Processing Letters (accepted for publication), 1997.
O. Raynaud and E. Thierry. Calcul de la 2-dimension d’un ensemble ordonn. Research Report 00082, LIRMM, Montpellier, France, 2000.
M. Skorsky. Endliche Verbnde Diagramme und Eigenschaften. PhD thesis, (written in English) Darmstadt, Germany, 1992.
J. Stahl and R. Wille. Preconcepts of contexts. in Proc. Universal Algebra (Sienna), 1984.
WilliamT. Trotter. Embedding finite posets in cubes. Discrete Mathematics, 12:165–172, 1975.
J. Vitek, R.N. Horspool, and A. Krall. Efficient type inclusion tests. In OOPSLA’ 97, number 1241, pages 128–145.
R. Wille. Restructuring lattice theory: An approach based on hierarchies of contexts. in Ordered sets, I. Rival, Eds. NATO ASI No 83, Reidel, Dordecht, Holland, pages 445–470, 1982.
M. Habib Y. Caseau, L. Nourine, and O. Raynaud. Encoding of mutiple inheritance hierarchie and partial orders. Computational Intelligence, 15:50–62, N1, 1999.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Raynaud, O., Thierry, E. (2001). A Quasi Optimal Bit-Vector Encoding of Tree Hierarchies. Application to Efficient Type Inclusion Tests. In: Knudsen, J.L. (eds) ECOOP 2001 — Object-Oriented Programming. ECOOP 2001. Lecture Notes in Computer Science, vol 2072. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45337-7_10
Download citation
DOI: https://doi.org/10.1007/3-540-45337-7_10
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42206-8
Online ISBN: 978-3-540-45337-6
eBook Packages: Springer Book Archive