comp.lang.ada
 help / color / mirror / Atom feed
From: madmats@elcgl.epfl.ch
Subject: Re: Hiding Concurrency
Date: 16 Apr 91 15:28:28 GMT	[thread overview]
Message-ID: <1991Apr16.162828.1@elcgl.epfl.ch> (raw)
In-Reply-To: 1991Apr15.211346.15760@cs.odu.edu

In article <1991Apr15.211346.15760@cs.odu.edu>, zeil@cs.odu.edu (Steven J. Zeil) writes:
> 
> My conclusion is that hiding concurrency control among operations with
> "in out" parameters behind a procedural interface is generally
> "erroneous" (in the sense that LRM 6.2.7 declares all program
> executions erroneous whose "effect depends on which [parameter
> passing] mechanism is selected by the implementation.")
> 
Yes, you are absolutely right. Using semaphores embedded within ADTs is
erroneous because it depends on the parameter passing mechanism selected
by the implementation. This makes all of Booch's concurrent components 
erroneous. A recent paper in Ada Letters has already shown that problem:

[Gonzales 90] Dean W. Gonzales, "Multitasking Software Components", Ada
Letters Vol. X, No. 2, January/February 1990.

The best solution I can imagine to that problem is to put all data 
implementing the ADT into a task and access it through entries, one for each
operation. The problem with this solution, however, is that entries are not
enough for specifying all operations you need on your ADT: entries cannot be
functions and cannot be generic, which makes it difficult to write iterators.

I am currently working on extensions to the Ada language that should solve this
problem: I will propose a package type construct equivalent to the task type
construct, which I will enhance so that it can include generic entries. Package
and task types would then be equivalent except for concurrency. Then, through
inheritance, a package implementing a non-concurrent ADT can be made into a
concurrent one with minimal change.

Mats Weber
Swiss Federal Institute of Technology
EPFL DI LGL
1015 Lausanne
Switzerland

E-mail : madmats@elcgl.epfl.ch
phone  : +41 21 693 52 92
fax    : +41 21 693 39 09

  reply	other threads:[~1991-04-16 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-04-15 21:13 Hiding Concurrency Steven J. Zeil
1991-04-16 15:28 ` madmats [this message]
1991-04-18  5:05 ` Jim Showalter
1991-04-19  2:11   ` madmats
     [not found] <671951147@<jls>
1991-04-21 21:09 ` stt
replies disabled

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