comp.lang.ada
 help / color / mirror / Atom feed
From: armstron@sjuvax.UUCP (L. Armstrong)
Subject: Ada expression resolvers
Date: Thu, 23-May-85 12:15:08 EDT	[thread overview]
Date: Thu May 23 12:15:08 1985
Message-ID: <1161@sjuvax.UUCP> (raw)

*** REPLACE THIS LINE WITH YOUR MESSAGE ***

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
just what I mean.  If we had the following code :

	procedure P is
	    x : int;
	    y : int;
	    x : float;
	begin
	    x := y;
	end P;

Then the resolver would determine that we wish to use the integer x, and not t
the float x.  However in the program :

	procedure P is
	    procedure Q;
	    x : <type 1>
	    y : <type 2>
	    z : <type 1>
	    procedure Q is
		x : <type 1>
		y : <type 1>
		z : <type 3>
	    begin
		x := y + z;
	    end Q;
	begin
	    <statements in P>
	end P;

You can see, our problem is expanded, and the resolver would have to 
determine that we want to use the x and y of type 1 from Q, and the 
z of type 1 from P.

And the problems can go on and on.  Also, there may be cases which 
simply cannot be resolved, as in the case of :

	procedure P is
	    x, y, z : float;
	    x, y, z : integer;
	begin
	    x := y + z;
	end P;

I am currently tring to implement a good method of resolving these
expressions, and if anyone can offer suggestion how such a situation 
might be handled, it would be greatly appreciated.

					Thanx,

						-- Len

P.S. The Ada code may not be syntactically perfect -- sorry if it's not.

-- 

					Len Armstrong
					St. Joseph's University
	             {astrovax | bpa | burdvax | allegra }!sjuvax!armstron

             reply	other threads:[~1985-05-23 16:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1985-05-23 16:15 L. Armstrong [this message]
  -- strict thread matches above, loose matches on Subject: below --
1985-05-24 14:28 Ada expression resolvers Gordon V. Cormack
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox