ACM Home Page
Please provide us with feedback. Feedback
Perfect hashing as an almost perfect subtype test
Full text PdfPdf (762 KB)
Source
ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 30 ,  Issue 6  (October 2008) table of contents
Article No. 33  
Year of Publication: 2008
ISSN:0164-0925
Author
Roland Ducournau  LIRMM--CNRS and Université Montpellier II, France
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 29,   Downloads (12 Months): 207,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1391956.1391960
What is a DOI?

ABSTRACT

Subtype tests are an important issue in the implementation of object-oriented programming languages. Many techniques have been proposed, but none of them perfectly fulfills the five requirements that we have identified: constant-time, linear-space, multiple inheritance, dynamic loading and inlining. In this article, we propose a subtyping test implementation that involves a combination of usual hashtables and Cohen's display, which is a well-known technique for single inheritance hierarchies. This novel approach is based on perfect hashing, that is, an optimized and truly constant-time variant of hashing that applies to immutable hashtables. We show that the resulting technique closely meets all five requirements. Furthermore, in the framework of Java-like languages—characterized by single inheritance of classes and multiple subtyping of interfaces—perfect hashing also applies to method invocation when the receiver is typed by an interface. The proposed technique is compared to some alternatives, including the proposal by Palacz and Vitek [2003]. Time-efficiency is assessed at the cycle level in the framework of Driesen's pseudo-code and the linear-space criterion is validated by statistical simulation on benchmarks consisting of large-scale class hierarchies.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
2
3
4
 
5
Alpern, B., Cocchi, A., and Grove, D. 2001b. Dynamic type checking in Jalapeño. In Proceedings of the USENIX JVM'01.
6
 
7
8
9
10
11
 
12
 
13
Czech, Z. J. 1998. Quasi-perfect hashing. Comput. J. 41, 416--421.
 
14
 
15
Dijkstra, E. W. 1960. Recursive programming. Numer. Math. 2, 312--318.
16
 
17
Driesen, K. 1993a. Method lookup strategies in dynamically typed object-oriented programming languages. M.S. dissertation, Vrije Universiteit Brussel.
18
 
19
20
 
21
 
22
Ducournau, R. 1991. Yet Another Frame-based Object-Oriented Language: YAFOOL Reference Manual. Sema Group, Montrouge, France.
 
23
Ducournau, R. 1997. La compilation de l'envoi de message dans les langages dynamiques. L'Objet 3, 3, 241--276.
 
24
Ducournau, R. 2002a. Implementing statically typed object-oriented programming languages. Rapport de Recherche 02-174, LIRMM, Université Montpellier 2.
 
25
Ducournau, R. 2002b. La coloration pour l'implémentation des langages à objets à typage statique. In Actes LMO'2002 in L'Objet vol. 8, M. Dao and M. Huchard, Eds. Lavoisier, 79--98.
 
26
 
27
Ducournau, R. 2006. Coloring, a versatile technique for implementing object-oriented languages. Rapport de Recherche 06-001, LIRMM, Université Montpellier 2.
 
28
 
29
Fall, A. 1995. Heterogeneous encoding. In Proceedings of the International Conference on Knowledge Retrieval and Storage for Efficiency (KRUSE'95). 162--167.
 
30
Fall, A. 1998. The foundations of taxonomic encoding. Computat. Intell. 14, 598--642.
 
31
 
32
33
 
34
35
 
36
Habib, M., Huchard, M., and Nourine, L. 1995. Embedding partially ordered sets into chain-products. In Proceedings of the International Conference on Knowledge Retrieval and Storage for Efficiency (KRUSE'95). 147--161.
 
37
 
38
Habib, M., Nourine, L., and Raynaud, O. 1997. A new lattice-based heuristic for taxonomy encoding. In Proceedings of the International Conference on Knowledge Retrieval and Storage for Efficiency (KRUSE'97). 60--71.
 
39
 
40
 
41
Jensen, T. R. and Toft, B. 1995. Graph Coloring Problems. Wiley, New York.
 
42
 
43
 
44
Knuth, D. E. 1973. The Art of Computer Programming, Sorting and Searching. Vol. 3. Addison-Wesley, Reading, MA.
 
45
Krall, A. and Grafl, R. 1997. CACAO—a 64 bits JavaVM just-in-time compiler. Concur: Pract. Exper. 9, 11, 1017--1030.
 
46
Krall, A., Vitek, J., and Horspool, R. 1997. Near optimal hierarchical encoding of types. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP'97), M. Aksit and S. Matsuoka, Eds. Lecture Notes in Computer Science, vol. 1241. Springer-Verlag, New York, 128--145.
 
47
 
48
Liskov, B., Curtis, D., Day, M., Ghemawat, S., Gruber, R., Johnson, P., and Myers, A. C. 1995. THETA reference manual. Technical report. MIT, Cambridge, MA.
 
49
 
50
 
51
 
52
 
53
Microsoft. 2001. C# Language specifications, v0.28. Technical report, Microsoft Corporation, Seattle, WA.
54
 
55
 
56
57
 
58
Odersky, M., Spoon, L., and Venners, B. 2008. Programming in Scala, A comprehensive step-by-step guide. Artima.
 
59
Palacz, K. and Vitek, J. 2003. Java subtype tests in real-time. In Proceedings of the 17th European Conference on Object-Oriented Programming (ECOOP'03). Lecture Notes in Computer Science, vol. 2743. Springer-Verlag, New York, 378--404.
 
60
Pfister, B. H. C. and Templ, J. 1991. Oberon technical notes. Tech. Rep. 156, Eidgenossische Techniscle Hochschule Zurich--Departement Informatik.
 
61
Privat, J. 2006. PRM, the language. version 0.2. Rapport de Recherche 06-029, LIRMM, Université Montpellier 2.
62
63
 
64
Pugh, W. and Weddell, G. 1993. On object layout for multiple inheritance. Tech. Rep. CS-93-22, University of Waterloo.
 
65
 
66
 
67
Schmidt, D. C. 1990. GPERF: A perfect hash function generator. In Proceedings of the USENIX C++ Conference. 87--102.
 
68
 
69
70
 
71
 
72
Stroustrup, B. 1998. The C++ Programming Language, 3e ed. Addison-Wesley, Reading, MA.
 
73
Taft, S. T., Duff, R. A., Brukardt, R. L., Ploedereder, E., and Leroy, P., Eds. 2006. Ada 2005 Reference Manual: Language and Standard Libraries. Lecture Notes in Computer Science, vol. 4348. Springer-Verlag, New York.
 
74
Takhedmit, P. 2003. Coloration de classes et de propriétés : étude algorithmique et heuristique. M.S. thesis, Université Montpellier 2.
75
76
 
77
 
78
 
79
80
81
 
82
Zibin, Y. and Gil, J. 2003b. Two-dimensional bi-directional object layout. In Proceedings of the 17th European Conference on Object-Oriented Programming. Lecture Notes in Computer Science, vol. 2743. Springer-Verlag, New York, 329--350.