From: Bryan@SIERRA.STANFORD.EDU (Doug Bryan)
Subject: nested accepts ?
Date: Sat, 9-May-87 19:00:08 EDT [thread overview]
Date: Sat May 9 19:00:08 1987
Message-ID: <12301096303.22.BRYAN@Sierra.Stanford.EDU> (raw)
[ this is a retransmission of an earlier message for which I never received
an echo... thus, some nets may get this twice, sorry. doug ]
Dear Ada Fans,
Consider:
task T is
entry A;
entry B;
end T;
then within the body of T, the following is valid,
accept A do
accept B;
end A;
but NOT:
accept A do
accept A; -- illegal: RM 9.5(8)
end A;
Does anyone know why? What is the rationale for this restriction?
We have checked the draft of the Rationale, RM, Barnes, Cohen,
"Evaluating Ada", the Compiler Implementor's Guide, Language
Maintenance Committee Notes, *and* Booch. Did we miss something?
We have discussed this internally within our group here at Stanford
and some possible explanations follow.
David Rosenblum has suggested that:
"There must be a very subtle rationale for the rule disallowing
nested accepts for the same entry or entry family. It may be
a ramification of other rules. E.g., 8.1:3 says that a single
declarative region is formed by the text of an entry declaration
together with the corresponding accept statements. I.e., individual
accept statements are only part of a declarative region and do
not by themselves form a single declarative region. Nested
accepts for the same entry would in effect introduce multiple declarations,
i.e. homographs, of the same formal parameter names, within
the same declarative region; this is disallowed by 8.3:17. Allowing
nesting in the case of parameterless entries would be a messy
special case."
David Luckham has suggested that:
"There is no attempt in any book, or the incomplete rationale to explain it.
One possibility, is that
accept E1 do
accept E1;
end E1;
messes up the FIFO discipline for accepting calls, since the later (inner
accept) releases a later caller before an earlier one."
Any more clues would be appreciated.
doug and geoff
-------
next reply other threads:[~1987-05-09 23:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1987-05-09 23:00 Doug Bryan [this message]
1987-05-11 15:31 ` nested accepts ? John Goodenough
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox