Advertisement

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

  • Olivier Raynaud
  • Eric Thierry
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2072)

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

Keywords

Binary Tree Encode Algorithm Type Inclusion Object Oriented Language Multiple Subtyping 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [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.CrossRefGoogle Scholar
  2. [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. [3]
    Yves Caseau. Efficient handling of multiple inheritance hierarchies. In OOPSLA’ 93, pages 271–287, 1993.Google Scholar
  4. [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. [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. [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. [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. [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. [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. [10]
    G. Markowsky. The representation of posets and lattices by sets. Algebra Universalis, 11:173–192, 1980.zbMATHCrossRefMathSciNetGoogle Scholar
  11. [11]
    N.H. Cohen. Type-extension type tests can be performed in constant time. Programming languages and systems, 13(4):626–629, July 1991.CrossRefGoogle Scholar
  12. [12]
    C. Quiennec. Fast and compact dispatching for dynamic object-oriented languages. Information Processing Letters (accepted for publication), 1997.Google Scholar
  13. [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. [14]
    M. Skorsky. Endliche Verbnde Diagramme und Eigenschaften. PhD thesis, (written in English) Darmstadt, Germany, 1992.Google Scholar
  15. [15]
    J. Stahl and R. Wille. Preconcepts of contexts. in Proc. Universal Algebra (Sienna), 1984.Google Scholar
  16. [16]
    WilliamT. Trotter. Embedding finite posets in cubes. Discrete Mathematics, 12:165–172, 1975.zbMATHCrossRefMathSciNetGoogle Scholar
  17. [17]
    J. Vitek, R.N. Horspool, and A. Krall. Efficient type inclusion tests. In OOPSLA’ 97, number 1241, pages 128–145.Google Scholar
  18. [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. [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.CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Olivier Raynaud
    • 1
  • Eric Thierry
    • 1
  1. 1.LIRMMMontpellier Cedex 5France

Personalised recommendations