|
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
|
Bowen Alpern , Anthony Cocchi , Stephen Fink , David Grove, Efficient implementation of Java interfaces: Invokeinterface considered harmless, Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, p.108-124, October 14-18, 2001, Tampa Bay, FL, USA
|
| |
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
|
Yves Caseau, Efficient handling of multiple inheritance hierarchies, Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, p.271-287, September 26-October 01, 1993, Washington, D.C., United States
|
 |
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
|
R. Dixon , T. McKee , M. Vaughan , P. Schweizer, A fast method dispatcher for compiled languages with multiple inheritance, Conference proceedings on Object-oriented programming systems, languages and applications, p.211-214, October 02-06, 1989, New Orleans, Louisiana, United States
|
| |
17
|
Driesen, K. 1993a. Method lookup strategies in dynamically typed object-oriented programming languages. M.S. dissertation, Vrije Universiteit Brussel.
|
 |
18
|
Karel Driesen, Selector table indexing & sparse arrays, Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, p.259-270, September 26-October 01, 1993, Washington, D.C., United States
|
| |
19
|
|
 |
20
|
Karel Driesen , Urs Hölzle, Minimizing row displacement dispatch tables, Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications, p.141-155, October 15-19, 1995, Austin, Texas, United States
|
| |
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
|
Raymond Klefstad , Arvind S. Krishna , Douglas C. Schmidt, Design and Performance of a Modular Portable Object Adapter for Distributed, Real-Time, and Embedded CORBA Applications, On the Move to Meaningful Internet Systems, 2002 - DOA/CoopIS/ODBASE 2002 Confederated International Conferences DOA, CoopIS and ODBASE 2002, p.549-567, October 30-November 01, 2002
|
| |
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
|
Andrew C. Myers, Bidirectional object layout for separate compilation, Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications, p.124-139, October 15-19, 1995, Austin, Texas, United States
|
| |
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
|
L. K. Schubert , M. A. Papalaskaris , J. Taugher, Determining Type, Part, Color, and Time Relationships, Computer, v.16 n.10, p.53-60, October 1983
[doi> 10.1109/MC.1983.1654198]
|
| |
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
|
Jan Vitek , R. Nigel Horspool , Andreas Krall, Efficient type inclusion tests, Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.142-157, October 05-09, 1997, Atlanta, Georgia, United States
|
| |
77
|
|
| |
78
|
|
| |
79
|
|
 |
80
|
Olivier Zendra , Dominique Colnet , Suzanne Collin, Efficient dynamic dispatch without virtual function tables: the SmallEiffel compiler, Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.125-141, October 05-09, 1997, Atlanta, Georgia, United States
|
 |
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.
|
INDEX TERMS
Primary Classification:
D.
Software
D.3
PROGRAMMING LANGUAGES
D.3.2
Language Classifications
Subjects:
Object-oriented languages
Additional Classification:
D.
Software
D.3
PROGRAMMING LANGUAGES
D.3.2
Language Classifications
Nouns:
C++;
Java
D.3.3
Language Constructs and Features
Subjects:
Classes and objects;
Inheritance
D.3.4
Processors
Subjects:
Run-time environments
E.
Data
E.2
DATA STORAGE REPRESENTATIONS
Subjects:
Hash-table representations;
Object representation
General Terms:
Experimentation,
Languages,
Measurement,
Performance
Keywords:
Casting,
coloring,
downcast,
dynamic loading,
interfaces,
method tables,
multiple inheritance,
multiple subtyping,
perfect hashing,
single inheritance,
subtype test,
virtual function tables
|