Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1094811.1094849acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

PolyD: a flexible dispatching framework

Published: 12 October 2005 Publication History

Abstract

The standard dispatching mechanisms built into programming languages are sometimes inadequate to the needs of the programmer. In the case of Java, the need for more flexibility has led to the development of a number of tools, including visitors and multi-method extensions, that each add some particular functionality, but lack the generality necessary to support user-defined dispatching mechanisms. In this paper we advocate a more modular approach to dispatching, and we present a tool, PolyD, that allows the programmer to design custom dispatching strategies and to parametrize many aspects of the dispatching process. PolyD exhibits excellent performance and compares well against existing tools.

References

[1]
R. Agrawal, L. G. DeMichiel, and B. G. Lindsay. Static type checking of multi-methods. In A. Paepcke, editor, OOPSLA '91 Conference Proceedings, volume 26(11) of ACM SIGPLAN Notices, pages 113--128, New York, NY, Nov. 1991. ACM.]]
[2]
The AspectJ home page. http://http://eclipse.org/aspectj.]]
[3]
J. Baker and W. C. Hsieh. Maya: Multiple-dispatch syntax extension in Java. In Proceeding of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, volume 37(5) of SIGPLAN Notices, pages 270--281. ACM, May 2002.]]
[4]
K. Barrett, B. Cassels, P. Haahr, D. A. Moon, K. Playford, and P. T. Withington. A monotonic superclass linerization for Dylan. In Proceedings OOPSLA '96 Conference on Object-Oriented Programming Systems, Languages, and Applications, volume 31 of ACM SIGPLAN Notices, pages 69--82. ACM, Oct. 1996.]]
[5]
G. Baumgartner, M. Jansche, and K. Läufer. Half & Half: Multiple dispatch and retroactive abstraction for Java. Technical Report OSU-CISRC-5/01-TR08, Department of Computer Science, The Ohio State University, Mar. 2002.]]
[6]
D. G. Bobrow, L. G. DeMichiel, R. P. Gabriel, S. E. Keene, G. Kiczales, and D. A. Moon. Common Lisp Object System specification. SIGPLAN Not., 23(SI):1--142, 1988.]]
[7]
F. Bourdoncle and S. Merz. Type-checking higher-order polymorphic multi-methods. In Conference Record of POPL '97: the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 302--315, New York, NY, 1997. ACM.]]
[8]
J. Boyland and G. Castagna. Parasitic methods: an implementation of multi-methods for Java. In Conference Proceedings of OOPSLA '97, volume 32(10) of ACM SIGPLAN Notices, pages 66--76, New York, NY, Oct. 1997. ACM.]]
[9]
M. Bravenboer and E. Visser. Guiding visitors: Separating navigation from computation. Technical Report UU-CS-2001-42, Institute of Information and Computing Sciences, Utrecht University, 2001.]]
[10]
É. Bruneton, R. Lenglet, and T. Coupaye. ASM: a code manipulation tool to implement adaptable systems. In Proceedings of the ASF (ACM SIGOPS France) Journées Composants 2002 : Systèmes à composants adaptables et extensibles (Adaptable and extensible component systems), Grenoble, France, Nov. 2002.]]
[11]
F. Büttner, O. Radfelder, A. Lindow, and M. Gogolla. Digging into the visitor pattern. In Proceedings of the Sixteenth International Conference on Software Engineering & Knowledge Engineering (SEKE'2004), Banff, Alberta, Canada, pages 135--141, June 2004.]]
[12]
C. Chambers. Object-oriented multi-methods in Cecil. In ECOOP '92, European Conference on Object-Oriented Programming, Utrecht, The Netherlands, volume 615 of Lecture Notes in Computer Science, pages 33--56. Springer-Verlag, 1992.]]
[13]
C. Chambers and W. Chen. Efficient multiple and predicate dispatching. In Proceedings of the 1999 ACM Conference on Object-Oriented Programming Languages, Systems, and Applications (OOPSLA '99), volume 34(10) of ACM SIGPLAN Notices, pages 238--255, New York, NY, November 1999. ACM.]]
[14]
C. Chambers and G. T. Leavens. Typechecking and modules for multi-methods. In OOPSLA '94 Conference Proceedings, volume 29(10) of ACM SIGPLAN Notices, pages 1--15, Oct. 1994.]]
[15]
C. Clifton. MultiJava: Design, implementation, and evaluation of a Java-compatible language supporting modular open classes and symmetric multiple dispatch. Technical Report 01-10, Department of Computer Science, Iowa State University, Ames, Iowa, 50011, Nov. 2001. Available from www.multijava.org.]]
[16]
C. Clifton, G. T. Leavens, C. Chambers, and T. Millstein. MultiJava: Modular open classes and symmetric multiple dispatch for Java. In OOPSLA 2000 Conference on Object-Oriented Programming, Systems, Languages, and Applications, volume 35(10) of ACM SIGPLAN Notices, pages 130--145, New York, NY, Oct. 2000. ACM.]]
[17]
C. Clifton, G. T. Leavens, C. Chambers, and T. Millstein. MultiJava: Design rationale, compiler implementation, and user experience. Technical Report 04-01, Iowa State University, Dept. of Computer Science, Jan. 2004. Submitted for publication.]]
[18]
M. Cutumisu. MCI-Java: A modified Java virtual machine approach to multiple code inheritance. In Virtual Machine Research and Technology Symposium, pages 13--28. USENIX, 2004.]]
[19]
L. G. DeMichiel and R. P. Gabriel. The Common Lisp Object System: An overview. In ECOOP '87, European Conference on Object-Oriented Programming, Paris, France, pages 151--170. Springer-Verlag, June 1987. Lecture Notes in Computer Science, Volume 276.]]
[20]
C. Dutchyn, P. Lu, D. Szafron, S. Bromling, and W. Holst. Multi-Dispatch in the Java Virtual Machine: Design and Implementation. In Proceedings of 6th Usenix Conference on Object-Oriented Technologies and Systems (COOTS'2001), pages 77--92, 2001.]]
[21]
M. D. Ernst, C. Kaplan, and C. Chambers. Predicate dispatching: A unified theory of dispatch. In ECOOP '98: 12th European Conference on Object-Oriented Programming, Brussels, Belgium, volume 1445 of Lecture Notes in Computer Science, pages 186--211, New York, NY, 1998. Springer-Verlag.]]
[22]
R. B. Findler and M. Flatt. Modular object-oriented programming with units and mixins. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming (ICFP '98), volume 34(1) of ACM SIGPLAN Notices, pages 94--104, New York, NY, June 1999. ACM.]]
[23]
M. Flatt, S. Krishnamurthi, and M. Felleisen. A programmer's reduction semantics for classes and mixins. In Formal Syntax and Semantics of Java, volume 1523 of Lecture Notes in Computer Science, pages 241--269. Springer, 1999.]]
[24]
B. Foote, R. E. Johnson, and J. Noble. Efficient multimethods in Smalltalk-80. In Proceedings of the European Conference on Object-Oriented Programming, Glasgow, Scotland, July 2005.]]
[25]
R. Forax, E. Duris, and G. Roussel. Java Multi-Method Framework. In International Conference on Technology of Object-Oriented Languages and Systems (TOOLS '00), Sydney, Australia, Los Alamitos, California, Nov. 2000. IEEE Computer Society Press.]]
[26]
R. Forax, E. Duris, and G. Roussel. Reflection-based implementation of Java extensions: The double-dispatch use-case. In Proceedings of the 2005 ACM symposium on applied computing, New York, 2005.]]
[27]
R. Forax and G. Roussel. Recursive types and pattern-matching in Java. In GCSE, volume 1799 of Lecture Notes in Computer Science, pages 147--164. Springer, 1999.]]
[28]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, Mass., 1995.]]
[29]
C. Grothoff. Walkabout revisited: The Runabout. In L. Cardelli, editor, Proceedings of ECOOP '03, volume 2743 of LNCS, pages 103--125. Springer-Verlag, July 2003.]]
[30]
C. Grothoff, J. Palsberg, and J. Vitek. Encapsulating objects with confined types. In Proceedings of OOPSLA '01, pages 241--255. ACM Press, Nov 2001.]]
[31]
W. Holst and D. Szafron. A general framework for inheritance management and method dispatch in object-oriented languages. In Proceedings of ECOOP '97: European Conference on Object-Oriented Programming, pages 276--301, 1997.]]
[32]
The Kiev language home page. http://kiev.forestro.com.]]
[33]
S. Krishnamurthi, M. Felleisen, and D. P. Friedman. Synthesizing object-oriented and functional design to promote re-use. In ECOOP'98, volume 1445 of Lecture Notes in Computer Science, pages 91--113, Brussels, Belgium, July 1998. Springer-Verlag.]]
[34]
G. T. Leavens and T. D. Millstein. Multiple dispatch as dispatch on tuples. In Proceedings of OOPSLA '98, volume 33(10) of ACM SIGPLAN Notices, pages 374--387. ACM, Oct. 1998.]]
[35]
T. Millstein. Practical predicate dispatch. In Proceedings of OOPSLA '04, volume 39(11) of ACM SIGPLAN Notices, pages 345--364. ACM, Oct. 2004.]]
[36]
T. Millstein, M. Reay, and C. Chambers. Relaxed MultiJava: Balancing extensibility and modular typechecking. In Proceedings of the 2003 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, volume 38(11) of ACM SIGPLAN Notices, pages 224--240, New York, NY, Nov. 2003. ACM.]]
[37]
T. D. Millstein and C. Chambers. Modular statically typed multimethods. Journal of Information and Computation, 175(1):76--118, 2002.]]
[38]
The Nice language home page. http://nice.sourceforge.net.]]
[39]
M. E. Nordberg III. Variations on the visitor pattern. In Proceedings of The Joint Pattern Languages of Programs (PLoP). Addison-Wesley, Sept. 1996.]]
[40]
D. Orleans. Incremental programming with extensible decisions. In First International Conference on Aspect-Oriented Software Development, Enschede, The Netherlands, 2002. ACM Press.]]
[41]
K. Palacz, J. Baker, C. Flack, C. Grothoff, H. Yamauchi, and J. Vitek. Engineering a customizable intermediate representation. In Proceedings of the ACM SIGPLAN Workshop on Interpreters, Virtual Machines and Emulators, (IVME'03), San Diego, California, June 2003.]]
[42]
J. Palsberg and C. B. Jay. The essence of the visitor pattern. In Proc. 22nd IEEE Int. Computer Software and Applications Conf., COMPSAC, Vienna, Austria, pages 9--15. IEEE, Aug. 1998.]]
[43]
M. Shonle, K. J. Lieberherr, and A. Shah. XAspects: An Extensible System for Domain Specific Aspect Languages. pages 28--37, Anaheim, California, 2003. ACM Press. Special Track on Domain-Driven Development.]]
[44]
B. Stroustrup. Multiple inheritance for C++. In Proceedings of the Spring 1987 European Unix Users Group Conference, Helsinki, 1987.]]
[45]
M. Torgersen. The expression problem revisited: Four new solutions using generics. In ECOOP '04 - Object-Oriented Programming European Conference, volume 3086, pages 123--143. Springer-Verlag, 2004.]]
[46]
T. VanDrunen and J. Palsberg. Visitor-oriented programming. In Proceedings of FOOL-11, the 11th ACM SIGPLAN International Workshop on Foundations of Object-Oriented Languages, Venice, Italy, January 2004.]]
[47]
M. Zenger and M. Odersky. Independently extensible solutions to the expression problem. Technical Report IC/2004/33, école Polytechnique Fédérale de Lausanne, 2004.]]

Cited By

View all
  • (2008)Multiple dispatch in practiceACM SIGPLAN Notices10.1145/1449955.144980843:10(563-582)Online publication date: 19-Oct-2008
  • (2008)The visitor pattern as a reusable, generic, type-safe componentACM SIGPLAN Notices10.1145/1449955.144979943:10(439-456)Online publication date: 19-Oct-2008
  • (2008)Multiple dispatch in practiceProceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications10.1145/1449764.1449808(563-582)Online publication date: 19-Oct-2008
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '05: Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
October 2005
562 pages
ISBN:1595930310
DOI:10.1145/1094811
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 10
    Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming systems languages and applications
    October 2005
    531 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1103845
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 October 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Java
  2. dispatching
  3. multimethods
  4. visitor pattern

Qualifiers

  • Article

Conference

OOPSLA05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 09 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2008)Multiple dispatch in practiceACM SIGPLAN Notices10.1145/1449955.144980843:10(563-582)Online publication date: 19-Oct-2008
  • (2008)The visitor pattern as a reusable, generic, type-safe componentACM SIGPLAN Notices10.1145/1449955.144979943:10(439-456)Online publication date: 19-Oct-2008
  • (2008)Multiple dispatch in practiceProceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications10.1145/1449764.1449808(563-582)Online publication date: 19-Oct-2008
  • (2008)The RunaboutSoftware: Practice and Experience10.1002/spe.87838:14(1531-1560)Online publication date: 22-May-2008
  • (2007)User-friendly and reliable grid computing based on imperfect middlewareProceedings of the 2007 ACM/IEEE conference on Supercomputing10.1145/1362622.1362668(1-11)Online publication date: 16-Nov-2007

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media