[comp.lang.ada] "Ada and C++", from comp.software-eng

pattis@june.cs.washington.edu (Richard Pattis) (04/26/91)

FYI

> 
> Article 5666 of comp.software-eng:
> From: rlw@ida.org (Richard Wexelblat)
> Subject: Tools to aid c++ development
> Reply-To: hook@ida.org 
> Date: Thu, 25 Apr 91 16:52:47 GMT
> 
> As I am sure you know, the U.S. Department of Defense is hooked on Ada
> and cannot get off.  So it was not a surprise when the Air Force came
> to us and asked us to build for them a catalog of commercially available
> Ada compilers and CASE support tools.  It WAS a surprise when they
> asked us to include c++ compilers and tools, too.  
> 
> Making a long story short, it turns out that c++ is the Lord High
> Substitute for Ada and there is a rather large class of applications for
> which c++ may well turn out to be the preferred substitute.  (I know,
> that class probably includes 100% of the applications, but this is the
> Air force, Mr. Jones!)
> 
>  ...
>
> --Dick Wexelblat  (rlw@ida.org) 703 845 6601
>  Can you accept an out of state sanity check?


-- 
------------------------------------------------------------------------------
  Richard E. Pattis			"Programming languages are like
  Department of Computer Science	 pizzas - they come in only "too"
    and Engineering			 sizes: too big and too small."

jls@rutabaga.Rational.COM (Jim Showalter) (04/27/91)

>> Making a long story short, it turns out that c++ is the Lord High
>> Substitute for Ada and there is a rather large class of applications for
>> which c++ may well turn out to be the preferred substitute.  (I know,
>> that class probably includes 100% of the applications, but this is the
>> Air force, Mr. Jones!)

Yeah, right. First of all, C++ isn't even a fucking standard, so any
hope of validation is a writeoff. Second of all, of the N features
C++ rather gracelessly grafts onto C, N-2 of them are already available
in Ada (e.g. strong typing, private types, spec/body separation,
exceptions, generics, etc etc etc). The missing two are user-defined
initialization/finalization stuff, and inheritance, and both of these
are being addressed in Ada 9x. Third, C++ is
new enough that it has no industrial strength tools available for
it: no smart compilers (and lord knows you're gonna need em when
changing base classes), no decent architectural level tools, etc.
Fourth, it has no proven track record on anything approaching a
real system (e.g. hard realtime, life-critical, very big, very
complex); I've seen lots and lots of research toys written in it,
but so what?--I've seen research toys written in CLOS, Flavors,
Actor, Loops, SETL, Smalltalk-80, etc etc etc etc.

To override the
Ada mandate and deliberately adopt C++ on a real project would be
lunacy of the highest order--and probably constitutes criminal
negligence.
--
* "Beyond 100,000 lines of code, you should probably be coding in Ada." *
*      - P.G. Plauger, Convener and Secretary of the ANSI C Committee   *
*                                                                       *
*                The opinions expressed herein are my own.              *

enag@ifi.uio.no (Erik Naggum) (04/30/91)

In article <jls.672697686@rutabaga> jls@rutabaga.Rational.COM (Jim Showalter) writes:

   Fourth, it has no proven track record on anything approaching a
   real system (e.g. hard realtime, life-critical, very big, very
   complex); I've seen lots and lots of research toys written in it,
   but so what?--I've seen research toys written in CLOS, Flavors,
   Actor, Loops, SETL, Smalltalk-80, etc etc etc etc.

   To override the Ada mandate and deliberately adopt C++ on a real
   project would be lunacy of the highest order--and probably
   constitutes criminal negligence.

Jim, I suggest you relax a bit.

As to the fourth claim of yours, you could try getting in touch with
Bjarne Stroustrup and ask him about places it's being used.  Last time
I heard, central telephone switching gear (the size of 5ESS) is coded
in C++.  After all, this _is_ AT&T...  These animals implement CCITT
Signalling System number 7.  The specs are 1500 (A-sized) pages of
gory details and 500 pages of verification and validation suites.  I
posted the table of contents of SS7 to comp.std.internat some time
ago.

Telephone exchanges are "hard realtime, life-critical, very big, very
complex" to check off your list.

I'm not particularly interested in arguing with you, so this is only
for the benefit of those who would otherwise tend to believe you.

--
[Erik Naggum]           Professional Programmer        <enag@ifi.uio.no>
Naggum Software             Electronic Text          <erik@naggum.uu.no>
0118 OSLO, NORWAY       Computer Communications            +47-2-836-863

abdlm@dftsrv.gsfc.nasa.gov (04/30/91)

Erik Naggum writes

>>Jim, I suggest you relax a bit.
>>
>>As to the fourth claim of yours, you could try getting in touch with
>>Bjarne Stroustrup and ask him about places it's being used.  Last time
>>I heard, central telephone switching gear (the size of 5ESS) is coded
>>in C++.  After all, this _is_ AT&T...  These animals implement CCITT
>>Signalling System number 7.  The specs are 1500 (A-sized) pages of
>>gory details and 500 pages of verification and validation suites.  I
>>posted the table of contents of SS7 to comp.std.internat some time
>>ago.


Wasn't this the system (or one similar to it) that took out the whole east 
coast of the U.S. with a pointer bug last year. Chalk up another victory for
the power of pointers and C++. With so much of the world economy riding on
the telecomunications networks, wouldn't it make sense to build these 
systems with tools (read languages) that were designed for reals time systems.

Any cost sagings AT&T realized by using their in house language (C++,C) which 
might or might not be faster than Ada were probably lost in the first few hours 
of the service outage. That was an expensive lesson.

-D. Miller, Goddard robotics Laboratory.
--My opinions arn't my employers.

neeri@iis.ethz.ch (Matthias Ulrich Neeracher) (04/30/91)

In article <5148@dftsrv.gsfc.nasa.gov>, abdlm@dftsrv.gsfc.nasa.gov writes:
>Wasn't this the system (or one similar to it) that took out the whole east 
>coast of the U.S. with a pointer bug last year. Chalk up another victory for
>the power of pointers and C++. With so much of the world economy riding on
>the telecomunications networks, wouldn't it make sense to build these 
>systems with tools (read languages) that were designed for reals time systems.

Are you implying that Ada programs are absolutely bug-free ? It seems to
me that these telecommunications applications have quite few failures.

>Any cost sagings AT&T realized by using their in house language (C++,C) which 
>might or might not be faster than Ada were probably lost in the first few hours 
>of the service outage. That was an expensive lesson.

So what exactly was the lesson ? That real systems, as opposed to their
specifications and their vaporware counterparts, sometimes fail ?

>-D. Miller, Goddard robotics Laboratory.

Matthias

-- 
Matthias Neeracher                                      neeri@iis.ethz.ch
   "These days, though, you have to be pretty technical before you can 
    even aspire to crudeness." -- William Gibson, _Johnny Mnemonic_

gtephx (Tim Barrios) (05/02/91)

In article <5148@dftsrv.gsfc.nasa.gov>, abdlm@dftsrv.gsfc.nasa.gov writes:
> Erik Naggum writes
> >>As to the fourth claim of yours, you could try getting in touch with
> >>Bjarne Stroustrup and ask him about places it's being used.  Last time
> >>I heard, central telephone switching gear (the size of 5ESS) is coded
> >>in C++.  After all, this _is_ AT&T...  These animals implement CCITT
> >>Signalling System number 7.  The specs are 1500 (A-sized) pages of
> >>gory details and 500 pages of verification and validation suites.  I
> >>posted the table of contents of SS7 to comp.std.internat some time
> >>ago.
> 
> Wasn't this the system (or one similar to it) that took out the whole east 
> coast of the U.S. with a pointer bug last year. Chalk up another victory for
> the power of pointers and C++. With so much of the world economy riding on
> the telecomunications networks, wouldn't it make sense to build these 
> systems with tools (read languages) that were designed for reals time systems.

i don't think much (any?) of the #5ESS switching system is written in
C++.  it's generally written in C.  i work for a company that develops
a competing product (GTD-5) that is written in a specialized,
real-time, embedded version of Pascal (sort of pre-Ada, Ada; a "real
language"). [we used to be a competitor to AT&T but now we're part of
them since are now a JV between AT&T and GTE]

the bug that brought down the switch which "took out the whole east
coast" was related to a C 'switch' statement that was missing a
'break'.  so, when the code jumped to the particular case, it
continued into the next 'case'.  not being a big fan of C, i found it
quite amusing.

i have heard it said that the cost of maintaining our switch tends to
be less than that of AT&T.  could it have anything to do with the
language used?  just a thought.

Disclaimer: these are my own personal views; certainly not the views
of my employer.
-- 
Tim Barrios, AG Communication Systems, Phoenix, AZ
UUCP: ...!{ncar!noao!asuvax | uunet!zardoz!hrc | att}!gtephx!barriost
Internet: gtephx!barriost@asuvax.eas.asu.edu
voice: (602) 582-7101        fax:   (602) 581-4022

crocker@motcid.UUCP (Ronald T. Crocker) (05/07/91)

In article <5148@dftsrv.gsfc.nasa.gov> abdlm@robots.span.nasa.gov writes:
>Wasn't this the system (or one similar to it) that took out the whole east 
>coast of the U.S. with a pointer bug last year. Chalk up another victory for
>the power of pointers and C++. 
>
>-D. Miller, Goddard robotics Laboratory.
>--My opinions arn't my employers.

The root cause was a missing break statement in a switch statement.


-- 
Ron Crocker
Motorola Radio-Telephone Systems Group, Cellular Infrastructure Group
(708) 632-4752 [FAX: (708) 632-4430]
crocker@mot.com or uunet!motcid!crocker

jls@netcom.COM (Jim Showalter) (05/09/91)

>Jim, I suggest you relax a bit.

You'll note I posted an apology for my zeal.

>Last time
>I heard, central telephone switching gear (the size of 5ESS) is coded
>in C++.  After all, this _is_ AT&T...

Actually, the 5ESS is still written in C. They tried to migrate to C++,
but ran into all sorts of problems (paradigm shift, tool maturity,
infrastructure, etc). [Not that this is a phenomenon limited to C++:
I can think of some Ada failures too...especially early in Ada's
history.]

jls@netcom.COM (Jim Showalter) (05/09/91)

>the bug that brought down the switch which "took out the whole east
>coast" was related to a C 'switch' statement that was missing a
>'break'.

If you leave out 'break', that's exactly what happens!

koehnema@ENUXHA.EAS.ASU.EDU (Harry Koehnemann) (05/09/91)

In article <1991May9.061021.1941@netcom.COM> jls@netcom.COM (Jim Showalter) writes:
>>the bug that brought down the switch which "took out the whole east
>>coast" was related to a C 'switch' statement that was missing a
>>'break'.
>
>If you leave out 'break', that's exactly what happens!

I heard (Software Engineering Notes) that the error was not a forgotten
break, but thatthe programmer was trying to exit the middle  of an if
statement by using a break (the fool he was..).  That statement (break)
does not work in that manner and it terminated the switch instead.
They didn't forget a break, they used it inappropriately.

For what its worth....

enag@ifi.uio.no (Erik Naggum) (05/12/91)

In article <ENAG.91Apr29213154@maud.ifi.uio.no>, I wrote:

    Last time I heard, central telephone switching gear (the size of
    5ESS) is coded in C++.

Seems that the first retractory article I made about this never made
it to the world.  Sorry that it took so long for me to notice that.

I received a note from a very reliable source informing me that 5ESS
has yet to be "conquered" by C++.  So, I'm sorry to say that what I
had heard turned out to be unfounded rumor.

Whatever you have to say about pointer faults taking out major parts
of the U.S. network isn't due to C++.

--
[Erik Naggum]           Professional Programmer        <enag@ifi.uio.no>
Naggum Software             Electronic Text          <erik@naggum.uu.no>
0118 OSLO, NORWAY       Computer Communications            +47-2-836-863