Supporting explicit disambiguation of multi-methods

  • Eric Amiel
  • Eric Dujardin
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1098)


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.


method dispatch multi-methods multiple inheritance ambiguities 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [ABC+93]
    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 as /pub/Self-3.0/manuals/ Scholar
  2. [ABDS94]
    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. [ABGO93]
    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. [ADL91]
    R. Agrawal, L. G. DeMichiel, and B. G. Lindsay. Static type checking of multi-methods. In Proc. OOPSLA, 1991.Google Scholar
  5. [AGS94]
    E. Amiel, O. Gruber, and E. Simon. Optimizing multi-methods dispatch using compressed dispatch tables. In Proc. OOPSLA, 1994.Google Scholar
  6. [App95]
    Apple Computer. Dylan Reference Manual, draft, September 1995. Available from the Dylan Home Page on the World-Wide Web at address Scholar
  7. [BDG+88]
    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. [BI82]
    A. H. Borning and D. H. H. Ingalls. Multiple inheritance in Smalltalk-80. In Proc. AAAI, 1982.Google Scholar
  9. [BKK+86]
    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. [BKKK87]
    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. [Cas93]
    Yves Caseau. Efficient handling of multiple inheritance hierarchies. In Proc. OOPSLA, 1993.Google Scholar
  12. [CBLL82]
    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. [CG90]
    B. Carré and J.-M. Geib. The point of view notion for multiple inheritance. In Proc. ECOOP/OOPSLA, 1990.Google Scholar
  14. [Cha92]
    C. Chambers. Object-oriented multi-methods in Cecil. In Proc. ECOOP, 1992.Google Scholar
  15. [Cha93]
    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. [CP93]
    Yves Caseau and Laurent Perron. Attaching second-order types to methods in an object-oriented language. In Proc. ECOOP, 1993.Google Scholar
  17. [CUCH91]
    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. [DCL+93]
    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. [DH89]
    R. Ducournau and M. Habib. La multiplicité de l'héritage dans les langages à objets. Technique et Science Informatiques, January 1989.Google Scholar
  20. [DHHM92]
    R. Ducournau, M. Habib, M. Huchard, and M.L. Mugnier. Monotonic conflict resolution mechanisms for inheritance. In Proc. OOPSLA, 1992.Google Scholar
  21. [DHHM94]
    R. Ducournau, M. Habib, M. Huchard, and M.L. Mugnier. Proposal for a monotonic multiple inheritance linearization. In Proc. OOPSLA, 1994.Google Scholar
  22. [DS92]
    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. [ES92]
    M. A. Ellis and B. Stroustrup. The annotated C++ reference manual. Addison-Wesley, Reading, Mass., 1992.Google Scholar
  24. [Knu73]
    D. Knuth. The Art of Computer Programming, Fundamental Algorithms, Second Edition. Addison-Wesley, 1973.Google Scholar
  25. [LR89]
    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. [Mey92]
    B. Meyer. EIFFEL: The Language. Prentice Hall Intl., 1992.Google Scholar
  27. [MGS89]
    José Meseguer, Joseph Goguen, and Gert Smolka. Order-sorted unification. Journal of Symbolic Computation, 8:383–413, 1989.MathSciNetCrossRefzbMATHGoogle Scholar
  28. [MHH91]
    W. B. Mugridge, J. Hamer, and J. G. Hosking. Multi-methods in a statically-typed programming language. In Proc. ECOOP, 1991.Google Scholar
  29. [MOO86]
    D. A. Moon. Object-oriented programming with Flavors. In Proc. OOPSLA, 1986.Google Scholar
  30. [O292]
    O2 Technology. The O 2 User's Manual, 1992.Google Scholar
  31. [SB86]
    M. Stefik and D. G. Bobrow. Object-oriented programming: Themes and variations. The AI Magazine, 6(4), 1986.Google Scholar
  32. [SCB+86]
    C. Schaffert, T. Cooper, B. Bullis, M. Kilian, and C. Wilpot. An introduction to Trellis/Owl. In Proc. OOPSLA, 1986.Google Scholar
  33. [Se393]
    Self 3.0 — about this release. Available by ftp from as /pub/Self3.0/manuals/, 1993.Google Scholar
  34. [Sny86a]
    A. Snyder. CommonObjects: An overview. Sigplan Notices, 21(10), 1986.Google Scholar
  35. [Sny86b]
    A. Snyder. Encapsulation and inheritance in object-oriented programming languages. In Proc. OOPSLA, 1986.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Eric Amiel
    • 1
  • Eric Dujardin
    • 2
  1. 1.NatSoft, Air CenterGenèveSuisse
  2. 2.Projet RODININRIALe Chesnay CedexFrance

Personalised recommendations