Skip to main content

A Quasi Optimal Bit-Vector Encoding of Tree Hierarchies. Application to Efficient Type Inclusion Tests

  • Conference paper
  • First Online:
ECOOP 2001 — Object-Oriented Programming (ECOOP 2001)

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

Included in the following conference series:

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

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

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

    Article  Google Scholar 

  2. A. Bouchet. Codages et dimensions de relations binaires. Annals of Discrete Mathematics 23, Ordres: Description and Roles, (M. Pouzet, D. Richard eds), 1984.

    Google Scholar 

  3. Yves Caseau. Efficient handling of multiple inheritance hierarchies. In OOPSLA’ 93, pages 271–287, 1993.

    Google Scholar 

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

    Google Scholar 

  5. A. Fall. The foundations of taxomic encoding. in International KRUSE Symposium: Knowledge Retrieval, Use and Storage for Efficiency, University of Santa-Cruz., August 1995.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  9. A. Krall, J. Vitek, and R.N. Horspool. Near optimal hierarchical encoding of types. In Ecoop’97, LNCS, number 1241, pages 128–145.

    Google Scholar 

  10. G. Markowsky. The representation of posets and lattices by sets. Algebra Universalis, 11:173–192, 1980.

    Article  MATH  MathSciNet  Google Scholar 

  11. N.H. Cohen. Type-extension type tests can be performed in constant time. Programming languages and systems, 13(4):626–629, July 1991.

    Article  Google Scholar 

  12. C. Quiennec. Fast and compact dispatching for dynamic object-oriented languages. Information Processing Letters (accepted for publication), 1997.

    Google Scholar 

  13. O. Raynaud and E. Thierry. Calcul de la 2-dimension d’un ensemble ordonn. Research Report 00082, LIRMM, Montpellier, France, 2000.

    Google Scholar 

  14. M. Skorsky. Endliche Verbnde Diagramme und Eigenschaften. PhD thesis, (written in English) Darmstadt, Germany, 1992.

    Google Scholar 

  15. J. Stahl and R. Wille. Preconcepts of contexts. in Proc. Universal Algebra (Sienna), 1984.

    Google Scholar 

  16. WilliamT. Trotter. Embedding finite posets in cubes. Discrete Mathematics, 12:165–172, 1975.

    Article  MATH  MathSciNet  Google Scholar 

  17. J. Vitek, R.N. Horspool, and A. Krall. Efficient type inclusion tests. In OOPSLA’ 97, number 1241, pages 128–145.

    Google Scholar 

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

    Google Scholar 

  19. M. Habib Y. Caseau, L. Nourine, and O. Raynaud. Encoding of mutiple inheritance hierarchie and partial orders. Computational Intelligence, 15:50–62, N1, 1999.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics