Computer Science Department
School of Computer Science, Carnegie Mellon University
Overload Resolution in Ada+
Robert G. Stockton
This paper describes one technique for performing Ada overload resolution. It involves a bottom-up scan of an attributed syntax tree which examines all possible interpretations of an expression and filters out all invalid interpretations.
One of the many useful features of the Ada programming language is the capability to overload various symbols. Although this can contribute immensely to the readability of programs, it places a much greater burden upon the compiler, since the meaning of a symbol can not always be uniquely determined based upon its name. In fact, in some cases there might be several equally valid interpretations of the given symbol. The compiler must determine, based on the context of the symbol, which of the possible interpretations is the correct one. This document is an attempt to describe the way in which the Ada+ compiler accomplishes this task.