comp.lang.ada
 help / color / mirror / Atom feed
From: Alan Brain <aebrain@dynamite.com.au>
Subject: Re: Ariane 5 failure
Date: 1996/09/29
Date: 1996-09-29T00:00:00+00:00	[thread overview]
Message-ID: <324F0E96.ADD@dynamite.com.au> (raw)
In-Reply-To: DyE738.Hzz@beaver.cs.washington.edu


Richard Pattis wrote:
> 
> As an instructor in CS1/CS2, this discussion interests me. I try to talk about
> designing robust, reusable code.... --->8----

> The Ariane falure adds a new view to robustness, having to do with future
> use of code, and mathematical proof vs "engineering" considerations..
> 
> Should a software engineer remove safety checks if he/she can prove - based on
> physical limitations, like a rocket not exceeding a certain speed - that they
> are unnecessary. Or, knowing that his/her code will be reused (in an unknown
> context, by someone who is not so skilled, and will probably not think to
> redo the proof) should such checks not be optimized out? What rule of thumb
> should be used to decide (e.g., what if the proof assumes the rocket speed
> will not exceed that of light)? Since software operates in the real world (not
> the world of mathematics) should mathematical proofs about code always yield
> to engineering rules of thumb to expect the unexpected.

> What is the rule of thumb about when should mathematics be believed?
> 

Firstly, I wish more there were more CS teachers like you. These are
excellent
Engineering questions.

Secondly, answers:
I tend towards the philosophy of "Leave every check in". In 12+ years of
Ada programming, I've never seen Pragma Suppress All Checks make the
difference
between success and failure. At best it gives a 5% improvement. This
means
in order to debug the code quickly, it's useful to have such checks,
even when
not strictly neccessary.

For re-use, you then often have the Ariane problem. That is, the
un-neccessary
checks you included coming around and biting you, as the assumptions you
were
making in the previous project become invalid.

So.... You make sure the assumptions/consequences get put into a
seperate package.
A system-specific package, that will be changed when re-used. Which
means that if the subsystem gets re-used a lot, the system specific
stuff will eventually be re-written so as to allow for re-use easily.
Example: Car's Cruise Control: MAX_SPEED : constant 200.0*MPH;
Get's re-used in an airliner - change to 700.0*MPH. Then onto an SST -
2000.0*MPH.
Eventually, you make it 2.98E26*MetresPerSec. Then some Bunt invents a
Warp Drive, and you're wrong again.

Summary: Label the constraints and assumptions, stick them as comments
in the code and design notes, put them in a seperate package...and some
dill will still stuff up, but that's the best you can do. And in the
meantime, you allow the possibility of finding a number of errors
early.   

----------------------      <> <>    How doth the little Crocodile
| Alan & Carmel Brain|      xxxxx       Improve his shining tail?
| Canberra Australia |  xxxxxHxHxxxxxx _MMMMMMMMM_MMMMMMMMM
---------------------- o OO*O^^^^O*OO o oo     oo oo     oo  
                    By pulling Maerklin Wagons, in 1/220 Scale




  parent reply	other threads:[~1996-09-29  0:00 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <agrapsDy4oJH.29G@netcom.com>
1996-09-25  0:00 ` Ariane 5 failure @@           robin
1996-09-25  0:00   ` Bob Kitzberger
1996-09-26  0:00     ` Ronald Kunne
1996-09-26  0:00       ` Matthew Heaney
1996-09-27  0:00         ` Ronald Kunne
1996-09-27  0:00           ` Lawrence Foard
1996-10-04  0:00             ` @@           robin
1996-09-28  0:00           ` Ken Garlington
1996-09-28  0:00             ` Ken Garlington
1996-09-29  0:00           ` Alan Brain
1996-09-29  0:00             ` Robert A Duff
1996-09-30  0:00               ` Wayne L. Beavers
1996-10-01  0:00                 ` Ken Garlington
1996-10-01  0:00                   ` Wayne L. Beavers
1996-10-01  0:00                     ` Ken Garlington
1996-10-02  0:00                       ` Sandy McPherson
1996-10-03  0:00                 ` Richard A. O'Keefe
1996-10-01  0:00             ` Ken Garlington
1996-09-27  0:00         ` Wayne Hayes
1996-09-27  0:00           ` Richard Pattis
1996-09-29  0:00             ` Dann Corbit
1996-09-29  0:00             ` Alan Brain [this message]
1996-09-29  0:00             ` Chris McKnight
1996-09-29  0:00               ` Real-world education (was: Ariane 5 failure) Michael Feldman
1996-10-01  0:00             ` Ariane 5 failure Ken Garlington
1996-09-28  0:00         ` Ken Garlington
1996-09-27  0:00       ` Ken Garlington
1996-09-27  0:00       ` Alan Brain
1996-09-28  0:00         ` Ken Garlington
1996-09-29  0:00       ` Louis K. Scheffer
1996-09-25  0:00   ` Michel OLAGNON
1996-09-25  0:00     ` Byron Kauffman
1996-09-25  0:00       ` A. Grant
1996-09-25  0:00         ` Ken Garlington
1996-09-26  0:00         ` Byron Kauffman
1996-09-27  0:00           ` A. Grant
1996-09-26  0:00         ` Sandy McPherson
1996-09-25  0:00     ` Chris Morgan
1996-09-27  0:00   ` John McCabe
1996-10-01  0:00     ` Michael Dworetsky
1996-10-04  0:00       ` Steve Bell
1996-10-07  0:00         ` Ken Garlington
1996-10-09  0:00         ` @@           robin
1996-10-09  0:00           ` Steve O'Neill
1996-10-12  0:00             ` Alan Brain
1996-10-04  0:00     ` @@           robin
1996-10-04  0:00       ` Michel OLAGNON
1996-10-09  0:00         ` @@           robin
1996-10-04  0:00       ` Joseph C Williams
1996-10-06  0:00         ` Wayne Hayes
1996-10-17  0:00       ` Ralf Tilch
1996-10-17  0:00         ` Ravi Sundaram
1996-10-22  0:00           ` shmuel
1996-10-22  0:00             ` Jim Carr
1996-10-24  0:00               ` hayim
1996-10-25  0:00                 ` Michel OLAGNON
1996-10-25  0:00                 ` Ken Garlington
1996-10-01  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-02  0:00 ` Matthew Heaney
1996-10-04  0:00   ` Ken Garlington
1996-10-05  0:00     ` Robert Dewar
1996-10-06  0:00       ` Keith Thompson
1996-10-10  0:00       ` Ken Garlington
1996-10-14  0:00       ` Matthew Heaney
1996-10-15  0:00         ` Robert Dewar
1996-10-16  0:00         ` Ken Garlington
1996-10-18  0:00           ` Keith Thompson
1996-10-18  0:00             ` Samuel T. Harris
1996-10-21  0:00               ` Ken Garlington
1996-10-18  0:00             ` Ken Garlington
1996-10-23  0:00           ` robin
1996-10-02  0:00 ` Robert I. Eachus
1996-10-02  0:00   ` Ken Garlington
  -- strict thread matches above, loose matches on Subject: below --
1996-10-01  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-02  0:00 ` Alan Brain
1996-10-02  0:00   ` Ken Garlington
1996-10-02  0:00     ` Matthew Heaney
1996-10-04  0:00       ` Robert S. White
1996-10-05  0:00         ` Robert Dewar
1996-10-05  0:00         ` Alan Brain
1996-10-06  0:00           ` Robert S. White
1996-10-03  0:00     ` Alan Brain
1996-10-04  0:00       ` Ken Garlington
1996-10-01  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-02  0:00 ` Ken Garlington
1996-10-03  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-03  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-03  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-14  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-15  0:00 ` Robert I. Eachus
1996-10-15  0:00   ` Robert Dewar
1996-10-16  0:00     ` Michael F Brenner
1996-10-16  0:00       ` Robert Dewar
1996-10-23  0:00 ` robin
1996-10-16  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-18  0:00 ` Ken Garlington
1996-10-19  0:00   ` Frank Manning
1996-10-21  0:00     ` Norman H. Cohen
1996-10-21  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-10-22  0:00 ` Adam Beneschan
1996-10-28  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1996-10-29  0:00 ` Ken Garlington
1996-11-08  0:00   ` robin
1996-10-28  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1996-10-31  0:00 Marin David Condic, 561.796.8997, M/S 731-93
replies disabled

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