Advertisement

Predicate dispatching: A unified theory of dispatch

  • Michael Ernst
  • Craig Kaplan
  • Craig Chambers
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1445)

Abstract

Predicate dispatching generalizes previous method dispatch mechanisms by permitting arbitrary predicates to control method applicability and by using logical implication between predicates as the overriding relationship. The method selected to handle a message send can depend not just on the classes of the arguments, as in ordinary object-oriented dispatch, but also on the classes of subcomponents, on an argument's state, and on relationships between objects. This simple mechanism subsumes and extends object-oriented single and multiple dispatch, ML-style pattern matching, predicate classes, and classifiers, which can all be regarded as syntactic sugar for predicate dispatching. This paper introduces predicate dispatching, gives motivating examples, and presents its static and dynamic semantics. An implementation of predicate dispatching is available.

Keywords

Pattern Match Class Test Abstract Syntax Truth Assignment Static Semantic 
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. [AGS94]
    Eric Amiel, Olivier Gruber, and Eric Simon. Optimizing multi-method dispatch using compressed dispatch tables. In Proceedings OOPSLA '94, pages 244–258, Portland, OR, October 1994.Google Scholar
  2. [BKK+86]
    Daniel G. Bobrow, Ken Kahn, Gregor Kiczales, Larry Masinter, Mark Stefik, and Frank Zdybel. Commonloops: Merging lisp and object-oriented programming. In Proceedings OOPSLA '86, pages 17-29, November 1986. Published as ACM SIGPLAN Notices, volume 21, number 11.Google Scholar
  3. [Cha92]
    Craig Chambers. Object-oriented multi-methods in Cecil. In O. Lehrmann Madsen, editor, Proceedings ECOOP '92, LNCS 615, pages 33–56, Utrecht, The Netherlands, June 1992. Springer-Verlag.Google Scholar
  4. [Cha93a]
    Craig Chambers. The Cecil language: Specification and rationale. Technical Report UW-CSE-93-03-05, Department of Computer Science and Engineering. University of Washington, March 1993.Google Scholar
  5. [Cha93b]
    Craig Chambers. Predicate classes. In O. Nierstrasz, editor, Proceedings ECOOP '93, LNCS 707, pages 268–296, Kaiserslautern, Germany, July 1993. Springer-Verlag.Google Scholar
  6. [CL95]
    Craig Chambers and Gary T. Leavens. Typechecking and modules for multi-methods. ACM Transactions on Programming Languages and Systems, 17(6):805–843, November 1995.CrossRefGoogle Scholar
  7. [CTK94]
    Weimin Chen, Volker Turau, and Wolfgang Klas. Efficient dynamic lookup strategy for multi-methods. In M. Tokoro and R. Pareschi, editors, Proceedings ECOOP '94, LNCS 821, pages 408–431, Bologna, Italy, July 1994. Springer-Verlag.Google Scholar
  8. [HHM90a]
    J. Hamer, J.G. Hosking, and W.B. Mugridge. A method for integrating classification within an object-oriented environment. Technical Report Auckland Computer Science Report No. 48, Department of Computer Science, University of Auckland, October 1990.Google Scholar
  9. [HHM90b]
    J.G. Hosking, J. Hamer, and W.B. Mugridge. Integrating functional and object-oriented programming. In Technology of Object-Oriented Languages and Systems TOOLS 3, pages 345–355, Sydney, 1990.Google Scholar
  10. [HJW+92]
    Paul Hudak, Simon Peyton Jones, Philip Wadler, Brian Boutel, Jon Fairbairn, Joseph Fasel, Maria Guzman, Kevin Hammond, John Hughes, Thomas Johnsson, Dick Kieburtz, Rishiyur Nikhil, Will Partain, and John Peterson. Report on the programming language Haskell, version 1.2. SIGP-LAN Notices, 27(5), May 1992.Google Scholar
  11. [KM89]
    Paris C. Kanellakis and John C. Mitchell. Polymorphic unification and ML typing. In ACM-SIGPLAN ACM-SIGACT, editor, Conference Record of the 16th Annual ACM Symposium on Principles of Programming Languages (POPL '89), pages 105–115, Austin, TX, USA, January 1989. ACM Press.Google Scholar
  12. [KR89]
    Gregor Kiczales and Luis Rodriguez. Efficient method dispatch in PCL. Technical Report SSL 89-95, Xerox PARC Systems Sciences Laboratory, 1989.Google Scholar
  13. [MHH91]
    Warwick B. Mugridge, John Hamer, and John G. Hosking. Multi-methods in a statically-typed programming language. In P. America, editor, Proceedings ECOOP '91, LNCS 512, pages 307–324, Geneva, Switzerland, July 15–19 1991. Springer-Verlag.Google Scholar
  14. [MTH90]
    Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, 1990.Google Scholar
  15. [OW97]
    Martin Odersky and Philip Wadler. Pizza into Java: Translating theory into practice. In Conference Record of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 146–159, January 1997.Google Scholar
  16. [Ste90]
    Guy L. Steele Jr. Common Lisp: The Language. Digital Press, Bedford, MA, 1990. Second edition.Google Scholar
  17. [Tai93]
    Antero Taivalsaari. Object-oriented programming with modes. Journal of Object-Oriented Programming, pages 25–32, June 1993.Google Scholar
  18. [Wad87]
    Philip Wadler. Views: A way for pattern matching to cohabit with data abstraction. In Proceedings of the Fourteenth Annual ACM Symposium on Principles of Programming Languages, pages 307–313, Munich, Germany, January 1987.Google Scholar
  19. [Zel93]
    John M. Zelle. Learning search-control heuristics for logic programs: Applications tospeed-up learning and languageacquisitions. Technical Report AI93-200, University of Texas, Austin, May 1, 1993.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Michael Ernst
    • 1
  • Craig Kaplan
    • 1
  • Craig Chambers
    • 1
  1. 1.Department of Computer Science and EngineeringUniversity of WashingtonSeattleUSA

Personalised recommendations