Skip to main content

Supporting explicit disambiguation of multi-methods

  • Conference paper
  • First Online:
ECOOP ’96 — Object-Oriented Programming (ECOOP 1996)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1098))

Included in the following conference series:

Abstract

Multiple inheritance and multiple dispatching are two sources of ambiguities in object-oriented languages. Solving ambiguities can be performed automatically, using techniques such as totally ordering the supertypes of each type or taking the order of the methods' arguments into account. Such implicit disambiguation has the drawback of being difficult to understand by the programmer and hiding programming errors. Conversely, solving ambiguities can be left up to the explicit intervention of the programmer. The most common explicit disambiguation technique in existing systems consists in defining new methods for ambiguous invocations. However, finding ambiguities and adding as few methods as possible is a difficult task, especially in multi-method systems. In this paper, we propose a tool to help the programmer solve multi-methods ambiguities. We show that there always exists a unique minimal set of method redefinitions that explicitly disambiguate a set of multi-methods. The tool offers two modes: batch, directly yielding the disambiguation set, or interactive, one signature of the disambiguation set at a time, allowing the programmer to either accept the method redefinition or to solve the ambiguity in any other way, which restarts the disambiguation algorithm. In both modes, for each method that is to be added, the programmer is given the set of methods that caused the ambiguity as an explanation.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. O. Agesen, L. Bak, C. Chambers, B.-W. Chang, U. Hölzle, J. Maloney, R. B. Smith, D. Ungar, and M. Wolcsko. The Self 3.0 Programmer's Reference Manual. Sun Microsystems and Stanford University, 1993. Available by ftp from self.stanford.edu as /pub/Self-3.0/manuals/progRef.ps.gz.

    Google Scholar 

  2. E. Amiel, M.-J. Bellosta, E. Dujardin, and E. Simon. Supporting exceptions to schema consistency to ease schema evolution. In Proc. Intl. Conf. on VLDB, 1994.

    Google Scholar 

  3. A. Albano, R. Bergamini, G. Ghelli, and R. Orsini. An object data model with roles. In Proc. Intl. Conf. on Very Large Data Bases, 1993.

    Google Scholar 

  4. R. Agrawal, L. G. DeMichiel, and B. G. Lindsay. Static type checking of multi-methods. In Proc. OOPSLA, 1991.

    Google Scholar 

  5. E. Amiel, O. Gruber, and E. Simon. Optimizing multi-methods dispatch using compressed dispatch tables. In Proc. OOPSLA, 1994.

    Google Scholar 

  6. Apple Computer. Dylan Reference Manual, draft, September 1995. Available from the Dylan Home Page on the World-Wide Web at address http://www.cambridge.apple.com/dylan/dylan.html.

    Google Scholar 

  7. D. G. Bobrow, L. G. DeMichiel, R. P. Gabriel, S. Keene, G. Kiczales, and D. A. Moon. Common Lisp Object System specification. SIGPLAN Notices, 23, Sept. 1988.

    Google Scholar 

  8. A. H. Borning and D. H. H. Ingalls. Multiple inheritance in Smalltalk-80. In Proc. AAAI, 1982.

    Google Scholar 

  9. D. G. Bobrow, K. Kahn, G. Kiczales, L. Masinter, M. Stefik, and F. Zdybel. Common-Loops: Merging Lisp and object-oriented programming. In Proc. OOPSLA, 1986.

    Google Scholar 

  10. J. Banerjee, W. Kim, H.J. Kim, and H. F. Korth. Semantics and implementation of schema evolution in object-oriented databases. In Proc. ACM SIGMOD Intl. Conf. on Management Of Data, 1987.

    Google Scholar 

  11. Yves Caseau. Efficient handling of multiple inheritance hierarchies. In Proc. OOPSLA, 1993.

    Google Scholar 

  12. G. Curry, L. Baer, D. Lipkie, and B. Lee. Traits: An approach to multiple-inheritance subclassing. In Proc. ACM SIGOA Conference on Office Automation Systems, 1982.

    Google Scholar 

  13. B. Carré and J.-M. Geib. The point of view notion for multiple inheritance. In Proc. ECOOP/OOPSLA, 1990.

    Google Scholar 

  14. C. Chambers. Object-oriented multi-methods in Cecil. In Proc. ECOOP, 1992.

    Google Scholar 

  15. C. Chambers. The Cecil language, specification and rationale. Technical Report 93-03-05, Dept of Computer Science and Engineering, FR-35, University of Washington, March 1993.

    Google Scholar 

  16. Yves Caseau and Laurent Perron. Attaching second-order types to methods in an object-oriented language. In Proc. ECOOP, 1993.

    Google Scholar 

  17. C. Chambers, D. Ungar, B.-W. Chang, and U. Hoelzle. Parents are shared parts of objects: inheritance and encapsulation in SELF. Lisp and Symbolic Computation, 4(3), 1991.

    Google Scholar 

  18. L. G. DeMichiel, D. D. Chamberlin, B. G. Lindsay, R. Agrawal, and M. Arya. Polyglot: Extensions to relational databases for sharable types and functions in a multi-language environment. In Proc. Intl. Conf. on Data Engineering, 1993.

    Google Scholar 

  19. R. Ducournau and M. Habib. La multiplicité de l'héritage dans les langages à objets. Technique et Science Informatiques, January 1989.

    Google Scholar 

  20. R. Ducournau, M. Habib, M. Huchard, and M.L. Mugnier. Monotonic conflict resolution mechanisms for inheritance. In Proc. OOPSLA, 1992.

    Google Scholar 

  21. R. Ducournau, M. Habib, M. Huchard, and M.L. Mugnier. Proposal for a monotonic multiple inheritance linearization. In Proc. OOPSLA, 1994.

    Google Scholar 

  22. S. Danforth and E. Simon. The Next Generation of Information Systems — from Data to Knowledge, chapter A Data and Operation Model for Advanced Database Systems. Springer Verlag, 1992.

    Google Scholar 

  23. M. A. Ellis and B. Stroustrup. The annotated C++ reference manual. Addison-Wesley, Reading, Mass., 1992.

    Google Scholar 

  24. D. Knuth. The Art of Computer Programming, Fundamental Algorithms, Second Edition. Addison-Wesley, 1973.

    Google Scholar 

  25. C. Lecluse and P. Richard. Manipulation of structured values in object-oriented databases. In Proc. Intl. Workshop on Database Programming Languages, 1989.

    Google Scholar 

  26. B. Meyer. EIFFEL: The Language. Prentice Hall Intl., 1992.

    Google Scholar 

  27. José Meseguer, Joseph Goguen, and Gert Smolka. Order-sorted unification. Journal of Symbolic Computation, 8:383–413, 1989.

    Article  MathSciNet  MATH  Google Scholar 

  28. W. B. Mugridge, J. Hamer, and J. G. Hosking. Multi-methods in a statically-typed programming language. In Proc. ECOOP, 1991.

    Google Scholar 

  29. D. A. Moon. Object-oriented programming with Flavors. In Proc. OOPSLA, 1986.

    Google Scholar 

  30. O2 Technology. The O 2 User's Manual, 1992.

    Google Scholar 

  31. M. Stefik and D. G. Bobrow. Object-oriented programming: Themes and variations. The AI Magazine, 6(4), 1986.

    Google Scholar 

  32. C. Schaffert, T. Cooper, B. Bullis, M. Kilian, and C. Wilpot. An introduction to Trellis/Owl. In Proc. OOPSLA, 1986.

    Google Scholar 

  33. Self 3.0 — about this release. Available by ftp from self.stanford.edu as /pub/Self3.0/manuals/aboutThisRelease.ps.gz, 1993.

    Google Scholar 

  34. A. Snyder. CommonObjects: An overview. Sigplan Notices, 21(10), 1986.

    Google Scholar 

  35. A. Snyder. Encapsulation and inheritance in object-oriented programming languages. In Proc. OOPSLA, 1986.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre Cointe

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Amiel, E., Dujardin, E. (1996). Supporting explicit disambiguation of multi-methods. In: Cointe, P. (eds) ECOOP ’96 — Object-Oriented Programming. ECOOP 1996. Lecture Notes in Computer Science, vol 1098. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0053061

Download citation

  • DOI: https://doi.org/10.1007/BFb0053061

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-61439-5

  • Online ISBN: 978-3-540-68570-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics