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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99f33f51845a7793 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-20 06:44:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!paloalto-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3BFA6BDC.26E7557E@Raytheon.com> From: Mark Johnson X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: 'withing' problem [code generation] References: <3be27344$0$227$ed9e5944@reading.news.pipex.net> <3BE42900.7590E899@adaworks.com> <3be65f4c$0$237$ed9e5944@reading.news.pipex.net> <3BF6E4DF.FA47ACDB@adaworks.com> <3BF93F0F.D5E4D0B7@Raytheon.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 20 Nov 2001 08:42:37 -0600 NNTP-Posting-Host: 192.27.48.44 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1006267442 192.27.48.44 (Tue, 20 Nov 2001 08:44:02 CST) NNTP-Posting-Date: Tue, 20 Nov 2001 08:44:02 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:16719 Date: 2001-11-20T08:42:37-06:00 List-Id: Stephen Leake wrote: > Mark Johnson writes: > > > Matthew Heaney wrote: > > [snip] > > > - annotate the drawing to "break the circular dependency here" > > This is not "automatic", it's "manual". That's the point. > > > - recognize patterns of circular dependencies and generate code > > that automatically generates the new packages (and report such > > changes to the user) > > This may be possible. The problem is that the automatic recogition of > patterns may be unstable; small changes in the UML model may make > large changes in the new packages. > Exactly the reason I mentioned both solutions. If you *really care* about the structure of the packages, allow the author to specify that certain rules to be applied. The annotation I mentioned becomes a part of the standard you apply when using UML. I don't see why you consider that "manual" - the computer does everything based on your (now more complete) specification of the solution. I thought about this a little last night and you have the circular dependency problem in C if you are not careful. You get an infinite loop in the C preprocessor if doctor.h includes patient.h and vice versa. Almost everybody codes their header files to have some #ifundef that encloses the body of the header file. That way, each header is expanded only once. Even with that, you could have a subtle bug due to the different order of expansion - doctor before patient or patient before doctor. Icky, nasty problems to find and fix.. > [snip - description of execution order algorithm] > > That tended to minimize latency in our > > system - which we considered a *good thing*. > > This sounds like it could be a stable algorithm, as long as there are > not parallel paths from the first block to the nth block. Of course there were parallel paths. All the cautions you mentioned about small changes on the drawing making big changes in the way the code executed were true. Add a single line on a drawing and a block that was executing 4 steps later is now executing two steps previous. Even more - based on which inputs came in, the blocks executed in a different order. So what. We kept focused on the problem we were trying to solve and did not care so much on how beautiful or ugly the generated code was. A common problem in simulators is instability in the model due to excessive latency - our system never had that problem because the solution minimized latency in all cases. --Mark