Supporting Explicit Disambiguation of Multi-Methods - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Reports (Research Report) Year : 1995

Supporting Explicit Disambiguation of Multi-Methods

Eric Amiel
  • Function : Author
Eric Dujardin
  • Function : Author


Multiple inheritance and multiple dispatching are two sources of ambiguities in object-oriented languages. Solving ambiguities can be performed automatical- ly, 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 ambiguiti- es can be left up to the explicit intervention of the programmer. The most common explicit disambiguation technique 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 show that there always exists a unique minimal set of method redefinitions to explicitly disambiguate a set of multi-methods. We propose an algorithm to compute the minimal disambiguation set, together with {\em ! explanations}: for each method that is to be added, the programmer is given the set of methods that caused the ambiguity.
Fichier principal
Vignette du fichier
RR-2590.pdf (193.69 Ko) Télécharger le fichier

Dates and versions

inria-00074093 , version 1 (24-05-2006)


  • HAL Id : inria-00074093 , version 1


Eric Amiel, Eric Dujardin. Supporting Explicit Disambiguation of Multi-Methods. [Research Report] RR-2590, INRIA. 1995. ⟨inria-00074093⟩
123 View
337 Download


Gmail Facebook X LinkedIn More