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-19 09:24:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!nycmny1-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: <3BF93F0F.D5E4D0B7@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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 19 Nov 2001 11:19:12 -0600 NNTP-Posting-Host: 192.27.48.44 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1006190435 192.27.48.44 (Mon, 19 Nov 2001 11:20:35 CST) NNTP-Posting-Date: Mon, 19 Nov 2001 11:20:35 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:16691 Date: 2001-11-19T11:19:12-06:00 List-Id: Matthew Heaney wrote: > "Simon Wright" wrote in message > news:x7vd72gi0zm.fsf@smaug.pushface.org... > > If there is a real-world circularity between doctor and patient, and > > our software engineering tools can't cope with it, it's the tools that > > have failed and not the real world! > [snip] > Simon argued that my solution was inadequate, because there was no simple > way to a automatically generate my code from the UML diagram. Having done code generation from diagrams before - I guess I don't understand why there is no "simple way to automatically generate code" in this case. I see at least two "simple solutions" that are not mutually exclusive: - annotate the drawing to "break the circular dependency here" - recognize patterns of circular dependencies and generate code that automatically generates the new packages (and report such changes to the user) We were taking data flow and control flow diagrams to generate the code for an aircraft simulator. Loops appeared all over the place as systems interact with each other. However, we had to "pick one" to run first (on a single CPU). The code generator sorted the blocks based on how "close" the block was to an external input. Direct connections were "1", blocks connected to "1's" were "2", and so on. The precise order the blocks executed was deferred to run time - we ran all blocks directly connected to inputs that *changed* first, then all blocks connected to first level outputs, and so on using the order described above. That tended to minimize latency in our system - which we considered a *good thing*. In a similar manner, you would probably want to do both simple solutions and use the user directed solution in preference to an automatic one [that may be less optimal for some reason]. This is because you will do all this in a static manner - unlike the simulator example. The "how to annotate" the drawing is left as an exercise to the developer of the code generator. In our system, there was some control data that we imported separately from the drawings & data dictionary. Mostly a big table that we entered in Excel and exported to columns in a tab separated text file. --Mark