|
ABSTRACT
The dispatching problem can be solved very efficiently in the single-inheritance~(SI) setting. In this paper we show how to extend one such solution to the multiple-inheritance~(MI) setting. This generalization comes with an increase to the space requirement by a small factor of κ This factor can be thought of as a metric of the complexity of the topology of the inheritance hierarchy.On a data set of~35 hierarchies totaling some~64 thousand types, our dispatching data structure, based on a novel type slicing technique, exhibits very significant improvements over previous dispatching techniques, not only in terms of the time for creating the underlying data structure, but also in terms of total space used.The cost is in the dispatching time, which is no longer constant, but doubly logarithmic in the number of types. Conversely, by using a simple binary search, dispatching time is logarithmic in the number of different implementations. In practice dispatching uses one indirect branch and, on average, only~2.5 binary branches.Our results also have applications to the space-efficient implementation of the more general problem of dispatching multi-methods.A by-product of our type slicing technique is an incremental algorithm for constant-time subtyping tests with favorable memory requirements. (The incremental version of the subtyping problem is to maintain the subtyping data structure in presence of additions of types to the inheritance hierarchy.)
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
|
Rakesh Agrawal , Linda G. Demichiel , Bruce G. Lindsay, Static type checking of multi-methods, Conference proceedings on Object-oriented programming systems, languages, and applications, p.113-128, October 06-11, 1991, Phoenix, Arizona, United States
|
 |
2
|
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
|
| |
3
|
B. Alpern, A. Cocchi, and D. Grove. Dynamic type checking in Jalapeño. In J. Clifford, B. G. Lindsay, and D. Maier, editors, Java Virtual Machine Research and Technology Symposium, Monterey, California, Apr. 2001. USENIX.
|
 |
4
|
Eric Amiel , Olivier Gruber , Eric Simon, Optimizing multi-method dispatch using compressed dispatch tables, Proceedings of the ninth annual conference on Object-oriented programming systems, language, and applications, p.244-258, October 23-28, 1994, Portland, Oregon, United States
|
| |
5
|
|
| |
6
|
D. G. Bobrow, L. G. DeMichiel, R. P. Gabriel, S. E. Keene, G. Kiczales, and D. A. Moon. Common Lisp object system specification. X3J13 Document 88-002R, June 1988.
|
 |
7
|
Daniel G. Bobrow , Kenneth Kahn , Gregor Kiczales , Larry Masinter , Mark Stefik , Frank Zdybel, CommonLoops: merging Lisp and object-oriented programming, Conference proceedings on Object-oriented programming systems, languages and applications, p.17-29, September 29-October 02, 1986, Portland, Oregon, United States
|
| |
8
|
K. S. Booth and G. S. Leuker. Testing for the consecutive ones property, interval graphs, and graph planarity using PQ-tree algorithms. J. Comput. Sys. Sci., 13(3):335--379, Dec. 1976.
|
| |
9
|
C. Chambers. The Cecil language, specification and rationale. Technical Report TR-93-03-05, University of Washington, Seattle, 1993.
|
 |
10
|
Craig Chambers , Weimin Chen, Efficient multiple and predicated dispatching, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.238-255, November 01-05, 1999, Denver, Colorado, United States
|
| |
11
|
|
 |
12
|
|
| |
13
|
T. Cohen and J. Y. Gil. Self-calibration of metrics of Java methods. In Proceedings of the International Conference on Technology of Object-Oriented Languages and Systems, pages 94--106, Sydney, Australia, Nov. 20-23 2000. TOOLS Pacific 2000, Prentice-Hall.
|
| |
14
|
T. J. Conroy and E. Pelegri-Llopart. An Assessment of Method-Lookup Caches for Smalltalk-80 Implementations. Addison-Wesley, Menlo Park,CA 94025, 1983.
|
| |
15
|
|
 |
16
|
|
 |
17
|
|
 |
18
|
|
| |
19
|
|
 |
20
|
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
|
 |
21
|
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
|
| |
22
|
|
 |
23
|
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
|
 |
24
|
Karel Driesen , Urs Hölzle, The direct cost of virtual function calls in C++, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.306-323, October 06-10, 1996, San Jose, California, United States
|
| |
25
|
|
| |
26
|
|
| |
27
|
E. Dujardin. Efficient dispatch of multimethods in constant time using dispatch trees. Technical Report RR-2892, Inria, Institut National de Recherche en Informatique et en Automatique, 1996.
|
 |
28
|
|
| |
29
|
|
| |
30
|
ECOOP'91. Proceedings of the 5th European Conference on Object-Oriented Programming, number 512 in Lecture Notes in Computer Science, Geneva, Switzerland, July15--19 1991. Springer Verlag.
|
| |
31
|
ECOOP'94. Proceedings of the 8th European Conference on Object-Oriented Programming, number 821 in Lecture Notes in Computer Science, Bologna, Italy, July 4--8 1994. Springer Verlag.
|
| |
32
|
ECOOP'99. Proceedings of the 13th European Conference on Object-Oriented Programming, number 1628 in Lecture Notes in Computer Science, Lisbon, Portugal, June 14--18 1999. Springer Verlag.
|
| |
33
|
|
| |
34
|
|
| |
35
|
|
 |
36
|
Paolo Ferragina , S. Muthukrishnan , Mark de Berg, Multi-method dispatching: a geometric approach with applications to string matching problems, Proceedings of the thirty-first annual ACM symposium on Theory of computing, p.483-491, May 01-04, 1999, Atlanta, Georgia, United States
[doi> 10.1145/301250.301378]
|
 |
37
|
|
| |
38
|
|
 |
39
|
Peter F. Sweeney , Joseph (Yossi) Gil, Space and time-efficient memory layout for multiple inheritance, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.256-275, November 01-05, 1999, Denver, Colorado, United States
|
| |
40
|
|
| |
41
|
|
| |
42
|
W. Holst, D. Szafron, Y. Leontiev, and C. Pang. Multi-method dispatch using single-receiver projections. Technical Report TR-98-03, University of Alberta, Edmonton, Alberta, Canada, 1998.
|
| |
43
|
|
 |
44
|
|
 |
45
|
|
| |
46
|
|
 |
47
|
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
|
| |
48
|
A. Krall, J. Vitek, and R. N. Horspool. Near optimal hierarchical encoding of types. In Proceedings of the 11th European Conference on Object-Oriented Programming, number 1241 in Lecture Notes in Computer Science, pages 128--145, Jyväskylä, Finland, June 9-13 1997. ECOOP'97, Springer Verlag.
|
| |
49
|
|
| |
50
|
|
| |
51
|
|
 |
52
|
|
| |
53
|
OOPSLA'01. Proceedings of the 16th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications, Tampa Bay, Florida, Oct. 14--18 2001. ACM SIGPLAN Notices 36(10) Oct. 2001.
|
| |
54
|
OOPSLA'93. Proceedings of the 8th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications, Washington, DC, USA, Sept. 26 - Oct. 1 1993. ACM SIGPLAN Notices 28(10) Oct. 1993.
|
| |
55
|
OOPSLA'97. Proceedings of the 12th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications, Atlanta, Georgia, Oct. 5-9 1997. ACM SIGPLAN Notices 32(10) Oct. 1997.
|
| |
56
|
OOPSLA'99. Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications, Denver, Colorado, Nov.1--5 1999. ACM SIGPLAN Notices 34(10) Nov. 1999.
|
| |
57
|
|
| |
58
|
|
 |
59
|
Pascal André , Jean-Claude Royer, Optimizing method search with lookup caches and incremental coloring, conference proceedings on Object-oriented programming systems, languages, and applications, p.110-126, October 18-22, 1992, Vancouver, British Columbia, Canada
|
| |
60
|
|
| |
61
|
|
 |
62
|
|
| |
63
|
P. van Emde Boas. Preserving order in a forest in less than logarithmic time and linear space. Information Processing Letters, 6(3):80--82, 1977.
|
| |
64
|
P. van Emde Boas, R. Kaas, and E. Zijlstra. Design and implementation of an efficient priority queue. Math. Systems Theory, 10:99--127, 1977.
|
| |
65
|
J. Vitek. Compact dispatch tables for dynamically typed programming languages. Master's thesis, University of Victoria, 1995.
|
| |
66
|
|
| |
67
|
|
| |
68
|
|
 |
69
|
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
|
| |
70
|
Y. Zibin and J. Y. Gil. Theory and practice of incremental subtyping tests and message dispatching. http://www.cs.technion.ac.il/~zyoav. Manuscript.
|
 |
71
|
Yoav Zibin , Joseph Yossi Gil, Efficient subtyping tests with PQ-encoding, Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, p.96-107, October 14-18, 2001, Tampa Bay, FL, USA
|
CITED BY 11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sébastien Baehni , João Barreto , Patrick Eugster , Rachid Guerraoui, Efficient distributed subtyping tests, Proceedings of the 2007 inaugural international conference on Distributed event-based systems, June 20-22, 2007, Toronto, Ontario, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|