comp.lang.ada
 help / color / mirror / Atom feed
From: Chris Morgan <mihalis@ix.netcom.com>
Subject: Re: Icon Co-Expressions in Ada
Date: 1998/12/17
Date: 1998-12-17T13:08:10-06:00	[thread overview]
Message-ID: <87iufaegaw.fsf@mihalis.ix.netcom.com> (raw)
In-Reply-To: 36794F71.762920E4@elca-matrix.ch

Mats Weber <Mats.Weber@elca-matrix.ch> 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 <mihalis at ix.netcom.com>		http://www.mihalis.net




  parent reply	other threads:[~1998-12-17  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  0:00 Icon Co-Expressions in Ada Ehud Lamm
1998-12-16  0:00 ` Stephen Leake
1998-12-16  0:00   ` Al Christians
1998-12-17  0:00   ` Mats Weber
1998-12-17  0:00     ` Ehud Lamm
1998-12-17  0:00   ` Ehud Lamm
1998-12-17  0:00     ` Mats Weber
1998-12-17  0:00       ` Ehud Lamm
1998-12-17  0:00       ` Chris Morgan [this message]
1998-12-17  0:00     ` Stephen Leake
1998-12-17  0:00       ` Ehud Lamm
1998-12-16  0:00 ` dennison
replies disabled

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