From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watdaisy.UUCP Path: utzoo!watmath!watnot!watdaisy!gvcormack From: gvcormack@watdaisy.UUCP (Gordon V. Cormack) Newsgroups: net.lang.ada Subject: Re: Ada expression resolvers Message-ID: <7276@watdaisy.UUCP> Date: Fri, 24-May-85 10:28:15 EDT Article-I.D.: watdaisy.7276 Posted: Fri May 24 10:28:15 1985 Date-Received: Sat, 25-May-85 09:29:48 EDT Distribution: net Organization: U of Waterloo, Ontario List-Id: > Does anyone have any information on strategies that might be used to > resolve an assignment statement in Ada? > > I'm not sure if the term "resolve" is universally used, so let me explain > procedure P is > x : int; > y : int; > x : float; > begin > x := y; > end P; This requires a reasonably straightforward extension to any Ada overloading algorithm to allow variables as well as functions etc. to be overloaded. One has to treat := as an overloaded operator that is applicable to all non-limited types. An good entry into the literature on overload resolution is the introduction to T.P. Baker, "A one-pass algorithm for overload resolution in Ada", ACM TOPLAS 4:4 , 601-614. I should note that the above program is not legal in Ada; variables may not be overloaded. -- Gordon V. Cormack CS Department, University of Waterloo gvcormack@watdaisy.uucp gvcormack%watdaisy@waterloo.csnet