An ambiguity resolution algorithm
Compilers for object-oriented languages must traverse an inheritance graph to locate the class to which an attribute belongs. The algorithm presented in this paper performs the ambiguity resolution check in one single traversal of the inheritance graph. It uses the dominates-set data structure which represents the dominance relationship between a derived class and its bases. The algorithm uses the dominates-set data structure to visit as few classes as possible in its search for the member.
KeywordsAmbiguity multiple inheritance base class derived class dominance dominates set inheritance graph virtual classes most-derivedclass
Unable to display preview. Download preview PDF.
- [AHG93]H. M. Al-Haddad and K. M. George. An implementation inheritance model for object-oriented programming. In The Journal of Systems and Software. North-Holland, January 1993.Google Scholar
- [BG90]Carre B. and Jean-Marc Geib. The point of view notion for multiple inheritance. In OOPSLA-ECOOP'90. ACM Press, 1990.Google Scholar
- [Boo93]Grady Booch. Object-Oriented Design with Applications. Benjamin Cummings, 2 edition, 1993.Google Scholar
- [CJ89]William R. Cook and Palsberg Jens. A denotational semantics of inheritance and its correctness. In OOPSLA-89, 1989.Google Scholar
- [GR89]Adele Goldberg and D. Robson. Smalltalk-80: The Language. Addison-Wesley, 1989.Google Scholar
- [Mey88]Bertrand Meyer. Object-Oriented Software Construction. Prentice Hall, 1 edition, 1988.Google Scholar
- [Shr92]Chandra Shrivastava. Ambiguity resolution. Technical Report, Dept. Computer Science, LSU., May 1992.Google Scholar
- [Sny87]Alan Snyder. Inheritance and the development of encapsulated software components. Research Directions in Object-Oriented Programming, 1987.Google Scholar
- [Str91]Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley, 2 edition, 1991.Google Scholar
- [Weg87]Peter Wegner. Object-oriented classification. Research Directions in Object-Oriented Programming, 1987.Google Scholar