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=1.1 required=5.0 tests=BAYES_40,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!umd5!uflorida!novavax!potpourri!bseymour From: bseymour@potpourri.UUCP (Burch Seymour) Newsgroups: comp.lang.ada Subject: Re: Telegen Ada guard evaluation Message-ID: <1181@potpourri.UUCP> Date: 10 Jun 88 14:27:28 GMT References: <27110@clyde.ATT.COM> Organization: Gould CSD, Fort Lauderdale, FL List-Id: 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 ------------------------------------------------------------------------