comp.lang.ada
 help / color / mirror / Atom feed
* Re: Unbounded strings (Was: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation))
@ 1996-11-25  0:00 Franco Mazzanti
  1996-11-25  0:00 ` Robert A Duff
  0 siblings, 1 reply; 29+ messages in thread
From: Franco Mazzanti @ 1996-11-25  0:00 UTC (permalink / raw)



Robert A. Duff wrote:

">And of course it is quite clear that two writes to the same file using
 >Put_Line with a file argument are NOT covered by paragraph 3. So that's
 >mightly curious:
  >
 >    Put_Line (Standard_Output, "xxxx");
 >
 >appearing in two tasks is not covered, and could be erroneous, but
 >
 >    Put_Line ("xxxx");
 >
 >is OK. That seems quite weird to me, ...

 Agreed.  In my opinion, both of the above should be considered
 erroneous.  I said that in another article, and I also admitted that the
 RM doesn't clearly say so.  As you say, if one thinks the above should
 work, then one needs to worry about the granularity of interleaving."


I know I am an heretic for my views on this subject. 

However I think that it is quite incorrect to consider "Standard_Output"
as a shared variable. "Standard_Output" is a function call, and it very likely
to return an anonymous temporary object. AT least this is what one would
expect by reading the RM (unless File_Type is a "return-by-reference" type).

Only if we make use of the version of "Standard_Output" which returns a
"File_Access" object, then in two concurrent calls of

   Put_Line (Standard_Output.all, "xxxx"); 

we would really use a shared variable.

However, even in this case, the erroneousnees is not clearly implied by the
reference manual because the File_Type argument has mode IN. So, we have
sharing, but this sharing is safe because it is "read only".

The picture which the RM naturally provides (at least to a naive reader) is
the only two concurrent Close, Delete, Reset, Flush operations on the same
File_Type variable are erroneous for 9.10 (or the execution of any of
these
operations bin parallel with a Get_Line, Put_Line, ...) because these 
operations actually take a File_Type parameter of mode IN OUT.

I agree that some attributes associated to file objects are modified by get 
and put operations (file position information). However, this kind of data
is completely outside the user view, is part of the underlying implementation
of the I/O system and A(3) seem really to imply that concurrent calls of
Put_line should be thread-safe.

With the respect to the granularity of the interleaving, I do not think that
one needs to worry about it. 
Once it is stated clearly that the effects of Put_line need not be atomic 
(with respect to the externel effect and the update of the file position
attributes) it is perfectly acceptable that the EXTERNAL effect of two 
put_line operations results in some unspecified interleaving of the data.

But this is very different from allowing the concurrent execution of even 
the operations:

   Put_Line(My_file, "my-string");
   V:Count := Col(F);

to be erroneous and "thrash my hard disk".

Franco Mazzanti




^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: Once again, Ada absent from DoD SBIR solicitation
@ 1996-10-09  0:00 Stanley R. Allen
  1996-11-14  0:00 ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Robert Dewar
  0 siblings, 1 reply; 29+ messages in thread
From: Stanley R. Allen @ 1996-10-09  0:00 UTC (permalink / raw)



Bill Nielsen wrote:
> 
> After following up on a post I made last week ("Future of the Ada mandate")
> talking to  program managers involved DoD procurements, one thing is clear:
> The Ada mandate (which is written into law) is being widely ignored. In
> most cases, waivers are not even sought. This includes not just R&D
> software, but fieldable operational software that supports military
> missions for which Ada is expressly designed.
> 

From where I sit, it looks like Bill & Gregory are
right about the DoD.

My company's job is building big simulators, and the
new DoD *mandate* (sound familiar?) for simulations is
called HLA (High Level Architecture), which is being
developed by the Defense Modeling and Simulation
Office (DMSO)  See http://www.dmso.mil/projects/hla/
for some interesting overview and mandate stuff.

It's a good idea. It's time has come.  But the first
cut of the HLA API is given in .... C++ !  No mention
of Ada anywhere.  No justification is given for
avoiding the Ada madate.  And HLA is a *big* *deal*.
All the major DoD simulator contractors are hankering
after this work. 

So, two DoD mandates mitigate against one another.
(Homework: ask yourself seriously which one will win.)
Note that HLA-compliance for simulators must be
considered new development; there is no such thing
as a COTS HLA-based system.  It's too new.  So, the
COTS excuse is no reason.

C++ is still not ISO standardized, but many in the C++
community expect that it will be either this year or
early next.  When this happens, the DoD Ada mandate 
will lose one of its most important contentions --
that Ada is the best choice because of its inter-
national standardization, which no other OO language
currently has.

C++ still seems like a hoax.  Every other article or
book I read about C++ (written by members of the C++
community!) decries the complexity of the language,
how hard it is to maintain, how many "gotcha's" there
are, how difficult it is to build large systems which
don't have pathological dependency and fragility
problems, etc.

If you are a DoD Ada programmer, this could be your
future.  And don't kid yourself into thinking that Java
will be much better.  Java was designed for small
"applets" (the diminutive of "applications"); the Java
code I have seen so far isn't much of an advance in
readability over C++.  And the mindset of the two
language cultures is the same.  I shudder to think
of what a large system in Java will look like.

Imagine the Boeing 777 in C++ or Java.  I wouldn't
want to ride in it.

If you believe in the promise of Ada (as I do), you
could do yourself a favor by listening to Gregory
Aharonian.  And then doing something about it.


-- 
Stanley Allen
s_allen@hso.link.com
(713) 280-4445
-- my opinions only




^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~1996-11-29  0:00 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-25  0:00 Unbounded strings (Was: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation)) Franco Mazzanti
1996-11-25  0:00 ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1996-10-09  0:00 Once again, Ada absent from DoD SBIR solicitation Stanley R. Allen
1996-11-14  0:00 ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Robert Dewar
1996-11-16  0:00   ` Robert A Duff
1996-11-16  0:00     ` Robert Dewar
1996-11-17  0:00       ` Unbounded strings (Was: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation)) Robert A Duff
1996-11-18  0:00         ` Robert Dewar
1996-11-19  0:00           ` Joel VanLaven
1996-11-23  0:00             ` Robert Dewar
1996-11-19  0:00           ` Robert A Duff
1996-11-23  0:00             ` Robert Dewar
1996-11-24  0:00               ` Robert A Duff
1996-11-25  0:00               ` Norman H. Cohen
1996-11-27  0:00                 ` Robert Dewar
1996-11-21  0:00         ` Robert I. Eachus
1996-11-24  0:00           ` Robert Dewar
1996-11-24  0:00             ` Fergus Henderson
1996-11-24  0:00               ` Robert Dewar
1996-11-25  0:00             ` Kevin D. Heatwole
1996-11-25  0:00               ` Robert A Duff
1996-11-26  0:00                 ` Kevin D. Heatwole
1996-11-26  0:00                   ` Robert A Duff
1996-11-26  0:00                     ` Larry Kilgallen
1996-11-27  0:00                     ` Robert Dewar
1996-11-27  0:00                     ` Norman H. Cohen
1996-11-29  0:00                       ` Fergus Henderson
1996-11-29  0:00                       ` Robert A Duff
1996-11-26  0:00               ` Geert Bosch
1996-11-26  0:00                 ` Robert Dewar
1996-11-25  0:00         ` Robert I. Eachus
1996-11-20  0:00       ` Jon S Anthony
1996-11-24  0:00         ` Robert Dewar

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