comp.lang.ada
 help / color / mirror / Atom feed
From: bseymour@potpourri.UUCP (Burch Seymour)
Subject: Re: Telegen Ada guard evaluation
Date: 10 Jun 88 14:27:28 GMT	[thread overview]
Message-ID: <1181@potpourri.UUCP> (raw)
In-Reply-To: 27110@clyde.ATT.COM

in article <27110@clyde.ATT.COM>, rds@moss.ATT.COM says:
> From Dave Stein...
> 
> Our programs have concurrent tasks, and it seems that the TeleGen compiler
> is faulty.  For one thing, it seems that guards (i.e. when statements)
> on accept statements simply do not get evaluated sometimes.
> 
I am replacing the program fragment with the entire test program which
I ran.  Gould is using the Telesoft Telegen II compiler which was just
validated under the 1.9 test suite a couple of weeks ago. It works
correctly. That is it prints "can't accept yet" 11 times then the
"we made it" and exits. Here's my program:

with text_io; use text_io;

procedure tg is

task tgtask is
  entry maybe;
end;

task body tgtask is

 x : integer := 0;
    begin
      loop
	    select
		when (x > 10) =>
		    accept maybe do
			put_line ("we made it");
		    end;
                    exit;
	    or				-- XXX
                delay 1.0;
		x := x + 1;
		put_line ("can't accept yet");
	    end select;
       end loop;
end tgtask;

begin

put_line("Start test.");
 tgtask.maybe;
put_line("Ending test.");

end tg;

> it prints "can't accept yet" 9 times, then prints "we made it" and exits.

Since the original posting had only a part of the code, I don't know
what initial value x had, but if it started at zero and the test for the
accept is x>10 then the message should be printed 11 times. Only 9 messages
would indicate a starting value of x := 2; Seems like an odd place to
start, unless there was an uninitialized x variable involved which could
explain why the original test didn't work as expected on the Telegen
compiler.

-Burch Seymour- Gould CSD  FtLauderdale, Fla 
 ...uunet!gould!bseymour  or any of a host of other possibilities
------------------------------------------------------------------------

      reply	other threads:[~1988-06-10 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-05-26 17:57 Telegen Ada guard evaluation rds
1988-06-10 14:27 ` Burch Seymour [this message]
replies disabled

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