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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4e39e3650a0d633 X-Google-Attributes: gid103376,public From: Chris Morgan Subject: Re: Icon Co-Expressions in Ada Date: 1998/12/17 Message-ID: <87iufaegaw.fsf@mihalis.ix.netcom.com>#1/1 X-Deja-AN: 423341108 Sender: cm@mihalis.ix.netcom.com References: <36794F71.762920E4@elca-matrix.ch> Organization: Linux Hackers Unlimited X-NETCOM-Date: Thu Dec 17 1:08:10 PM CST 1998 Newsgroups: comp.lang.ada Date: 1998-12-17T13:08:10-06:00 List-Id: Mats Weber writes: > This sounds like coroutines in other languages. The closest Ada has to > offer is tasks, but as Ada tasks can be called concurrently, you will > have a significant overhead over a simple coroutine mechanism. A standard technique in JSD is to map many theoretical processes or state machines in the design into one Ada task (often referred to as a group). In the toolset I use to work on this meant that the Ada for a particular process became a chunk of flat code with gotos and labels. In the design we worked as if the process ran concurrently with the other ones in the group and we could use loops and so on. This structure was "read-inverted" by the toolset so each process became just a procedure with an extra parameter of the state. The loops were simulated of course. I thought this made sense as we were taught to regard using a whole task as expensive. It often occurred to me how grotesque it was stepping through spaghetti machine generated code with gotos and labels, but that's the price for some of these high-concept design techniques with "automatic" code generation. Chris -- Chris Morgan http://www.mihalis.net