comp.lang.ada
 help / color / mirror / Atom feed
From: rkaiser@dimensional.com (Richard Kaiser)
Subject: Re: Papers on the Ariane-5 crash and Design by Contract
Date: 1997/03/18
Date: 1997-03-18T00:00:00+00:00	[thread overview]
Message-ID: <5gl1f5$a26$2@quasar.dimensional.com> (raw)
In-Reply-To: 332D113B.4A64@calfp.co.uk


In article <332D113B.4A64@calfp.co.uk>, Nick Leaton <nickle@calfp.co.uk> 
wrote:
>Path:
> dimensional.com!visi.com!news.maxwell.syr.edu!dispatch.news.demon.net!demon!ca
>lfp.demon.co.uk!not-for-mail
>From: Nick Leaton <nickle@calfp.co.uk>
>Newsgroups:
> comp.lang.eiffel,comp.object,comp.software-eng,comp.programming.threads,comp.l
>ang.ada,comp.lang.java.tech
>Subject: Re: Papers on the Ariane-5 crash and Design by Contract
>Date: Mon, 17 Mar 1997 09:39:07 +0000
>Message-ID: <332D113B.4A64@calfp.co.uk>
>References: <332B5495.167EB0E7@eiffel.com> <tz8ohcjv7cc.fsf@aimnet.com>
>NNTP-Posting-Host: calfp.demon.co.uk
>X-NNTP-Posting-Host: calfp.demon.co.uk
>X-Mailer: Mozilla 3.0Gold (X11; I; SunOS 5.5 sun4m)
>MIME-Version: 1.0
>To: Thomas <nouser@nohost.nodomain>
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>Lines: 81
>Xref: dimensional.com comp.lang.eiffel:7803 comp.object:23425
> comp.software-eng:17269 comp.programming.threads:4199 comp.lang.ada:23371
> comp.lang.java.tech:8859
>Status: N
>
>Thomas wrote:
>
>> convert (horizontal_bias: INTEGER): INTEGER is
>>             require
>>                   horizontal_bias <= Maximum_bias
>>             do
>>                   ...
>> 
>>             ensure
>>                   ...
>> 
>>             end
>> 
>> What was required here was a simple check that a function argument was
>> within a certain range.  That check could have been expressed as an
>> Ada type declaration and checked by the compiler at compile time, or
>> as a runtime assertion/check.  The design team apparently decided that
>> either approach was too costly in terms of design or speed and instead
>> opted for leaving the code unsafe and documenting the conditions under
>> which the function could be used safely.  Also, they apparently did
>> not have a practice of annotating their code with assertion statements
>> for testing, and you suggest that they didn't have a standard
>> practice for documenting unchecked preconditions.
>> 
>> I don't see how the different notation that Eiffel uses for the same
>> purpose helps.  Eiffel's conditions are also enforced either at
>> compile time or at runtime, and exactly the same tradeoffs apply as
>> they do in the Ada program: you incur costs for type conversions and
>> range checks.  And if the programmer culture on a project is such that
>> they don't use Ada assertions, why would they use Eiffel
>> preconditions?
>> 
>
>Eiffel does type checking at compile time. You can check type at runtime
>but the need to do this is such that you should query if you write code
>that uses this feature. 
>
>        x ?= y
>
>x will be Void if y does not conform to they type of x.
>
>The point about culture and assertions is an interesting one. I have
>moved to a company that uses Eiffel. Initially I was very sceptical
>about assertions, for the same reason you are, that I don't see people
>using them, or that they remove them when the release the code.
>
>In practice though, you write them because as part of developing
>software they make a huge difference to development. This has an effect
>in various areas.
>
>1) Documentation. You need less of this. Documentation which say 'This
>feature expects this and does that' is no longer need. Documentation
>that is needed is the 'intent' of the routine, and high level intent or
>overviews. There are tools that can produce what is called the short
>form, the code without the implementation built into most compilers.
>These will also produce HTML and other outputs.

The first mistake was to not put the time limit in some human readable
documentation, or if the time limit was documenting then it was not read.
Writing code so it documents itself reduces or eliminates the code 
documentation, but this can be done in Ada, EIffel, C, C++ and even
assembly language and FORTRAN.  These limits are part of the design
and belong in a Software Requirements/Requirements Verification document
and in the Version Description Document.  And these documents must be
reviewed prior to reuse.

>2) Design. Writting assertions makes design easier. This is a personal
>observation and harder to justify. I find being clear about what
>something does helps clear up what I am doing. Having complex
>preconditions is not a good idea, again you probably don't have the
>right structure.

The code is going to say "I am not in my original application and may or
will fail?"  Assertions are only going to catch problems if there is:

>3) Debugging / Testing. Running with assertions enabled detects bugs 
>earlier. This is the real saver in time and costs. 

This is the

>4) Reviews. If you review code, then having the assertions in place
>is very useful. A large part of reviewing C++ is working out what
>assertions have been assumed, and checking code against them. Having
>them written into the code makes this easier.
>
>There are other more complex parts to Eiffels assertion system, in
>relation to inheritance, and soon in relation to parallel processing.
>
>But in conclusion, my experience is that people write assertions in
>their code, because it is effective.
>
>




  parent reply	other threads:[~1997-03-18  0:00 UTC|newest]

Thread overview: 254+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-15  0:00 Papers on the Ariane-5 crash and Design by Contract Bertrand Meyer
     [not found] ` <tz8ohcjv7cc.fsf@aimnet.com>
1997-03-16  0:00   ` Robert Dewar
1997-03-17  0:00     ` Please do not start a language war (was " Jean-Marc Jezequel
1997-03-18  0:00       ` Ken Garlington
     [not found]         ` <199703190839.JAA02652@stormbringer.irisa.fr>
1997-03-19  0:00           ` Ken Garlington
1997-03-20  0:00             ` Roger T.
1997-03-21  0:00               ` Ken Garlington
1997-03-21  0:00               ` Jean-Marc Jezequel
1997-03-24  0:00                 ` Ken Garlington
1997-03-20  0:00             ` Robert S. White
1997-03-20  0:00               ` Martin Tom Brown
1997-03-21  0:00                 ` Robert S. White
1997-03-21  0:00                 ` Wolfgang Gellerich
1997-03-20  0:00               ` John L. Ahrens
1997-03-19  0:00         ` Jean-Marc Jezequel
1997-03-19  0:00           ` Richard Kaiser
1997-03-21  0:00           ` Ken Garlington
1997-03-21  0:00             ` Jean-Marc Jezequel
1997-03-25  0:00               ` Ken Garlington
1997-03-26  0:00                 ` Trust but verify " Robert S. White
1997-03-25  0:00                   ` Bertrand Meyer
1997-03-26  0:00                     ` Robb Nebbe
1997-03-27  0:00                     ` Ken Garlington
1997-03-28  0:00                       ` Jeffrey W. Stulin
1997-03-31  0:00                         ` Ken Garlington
1997-03-28  0:00                       ` Karel Th�nissen
1997-03-28  0:00                         ` Ken Garlington
1997-04-07  0:00                           ` Jean-Marc Jezequel
1997-03-29  0:00                     ` the one and only real true kibo
     [not found]       ` <tz8913l930b.fsf_-_@aimnet.com>
1997-03-18  0:00         ` Ariane-5: can you clarify? (Re: Please do not start a language war Roedy Green
1997-03-18  0:00         ` Ariane-5: can you clarify? (Re: Please do not start a language war) Gavin Collings
1997-03-18  0:00       ` Please do not start a language war (was Re: Papers on the Ariane-5 crash and Design by Contract Richard Irvine
1997-03-17  0:00   ` Robert I. Eachus
1997-03-17  0:00     ` Martin Tom Brown
1997-03-17  0:00   ` Please do not start a language war (was " Jon S Anthony
1997-03-18  0:00     ` Kent Tong
1997-03-20  0:00       ` Ranan Fraer
1997-03-17  0:00   ` Nick Leaton
1997-03-17  0:00     ` Richard Kaiser
1997-03-18  0:00     ` Richard Kaiser
1997-03-18  0:00       ` Nick Leaton
1997-03-18  0:00         ` "Paul E. Bennett"
1997-03-19  0:00           ` Nick Leaton
1997-03-24  0:00           ` Joachim Durchholz
1997-03-25  0:00             ` Robert Dewar
1997-03-31  0:00               ` Jan Galkowski
1997-03-31  0:00               ` Joachim Durchholz
1997-04-02  0:00                 ` Robert Dewar
1997-04-03  0:00                   ` Martin Tom Brown
1997-04-04  0:00                   ` Jonathan Egre'
1997-04-06  0:00                     ` Robert Dewar
1997-04-06  0:00                       ` Nick Roberts
1997-04-04  0:00                   ` Derek Clarke
1997-03-31  0:00             ` Alexander Anderson
1997-04-01  0:00             ` Alexander Anderson
1997-04-02  0:00             ` Ken Garlington
1997-03-20  0:00         ` John the Hamster
1997-03-18  0:00     ` Richard Kaiser [this message]
1997-03-18  0:00       ` Nick Leaton
1997-03-19  0:00         ` Richard Kaiser
1997-03-19  0:00           ` Fergus Henderson
1997-03-19  0:00           ` Jean-Marc Jezequel
1997-03-19  0:00             ` Richard Kaiser
1997-03-18  0:00       ` Jean-Marc Jezequel
1997-03-19  0:00         ` Ken Garlington
     [not found]     ` <tz8g1xtzx9y.fsf@aimnet.com>
1997-03-18  0:00       ` Anders Pytte
1997-03-18  0:00         ` Jean-Marc Jezequel
1997-03-18  0:00           ` Anders Pytte
1997-03-18  0:00           ` Anders Pytte
1997-03-19  0:00             ` Programming language fanaticism! Louis Bastarache
1997-03-20  0:00               ` Anders Pytte
1997-03-20  0:00             ` Papers on the Ariane-5 crash and Design by Contract Matt Kennel (Remove 'nospam' to reply)
1997-03-24  0:00             ` Joachim Durchholz
1997-03-24  0:00               ` Anders Pytte
1997-03-26  0:00                 ` Matt Kennel (Remove 'nospam' to reply)
1997-03-29  0:00                   ` Anders Pytte
1997-03-29  0:00                     ` Steve Furlong
1997-03-26  0:00                 ` Robert Dewar
1997-03-27  0:00                   ` the one and only real true kibo
1997-03-29  0:00                   ` the one and only real true kibo
1997-03-29  0:00                     ` Nick S Bensema
1997-03-30  0:00                       ` the one and only real true kibo
1997-03-21  0:00           ` Ken Garlington
1997-03-21  0:00             ` Bertrand Meyer
1997-03-21  0:00               ` William Clodius
1997-03-21  0:00                 ` Bertrand Meyer
1997-03-23  0:00                   ` the one and only real true kibo
1997-03-23  0:00                   ` William Clodius
1997-03-22  0:00               ` Fergus Henderson
1997-03-22  0:00                 ` Bertrand Meyer
1997-03-23  0:00                   ` the one and only real true kibo
1997-03-23  0:00                     ` Anders Pytte
1997-03-24  0:00                   ` FUD (Re: Papers on the Ariane-5 crash and Design by Contract) Alexander Anderson
1997-03-24  0:00                   ` Alexander Anderson
1997-03-23  0:00               ` Papers on the Ariane-5 crash and Design by Contract Anders Pytte
     [not found]                 ` <3335BC24.13728473@eiffel.com>
1997-03-23  0:00                   ` Bertrand Meyer
1997-03-24  0:00                     ` Robert Dewar
1997-03-31  0:00                       ` Ken Garlington
1997-04-01  0:00                         ` Bertrand Meyer
1997-03-25  0:00                     ` Ken Garlington
1997-03-24  0:00                 ` the one and only real true kibo
1997-03-24  0:00                 ` Ken Garlington
1997-03-24  0:00               ` John Hogg
1997-03-24  0:00               ` Ken Garlington
1997-03-26  0:00                 ` Robert Dewar
1997-03-26  0:00                   ` Ken Garlington
     [not found]                     ` <E7ox17.MKx@syd.csa.com.au>
1997-03-28  0:00                       ` Ken Garlington
1997-03-18  0:00         ` Laurent Moussault
1997-03-17  0:00   ` Alexander Anderson
1997-03-17  0:00   ` Bertrand Meyer
1997-03-18  0:00     ` John McCabe
1997-03-18  0:00       ` Ray McVay
1997-03-27  0:00         ` Robert Dewar
1997-03-29  0:00           ` the one and only real true kibo
1997-03-30  0:00             ` Nick Roberts
1997-04-06  0:00             ` Doctorb
1997-04-08  0:00         ` Ron Crocker
1997-04-11  0:00           ` Richard Riehle
1997-03-17  0:00   ` Paul Johnson
1997-03-17  0:00     ` Enrico Facchin - Sartori E.T.
1997-03-19  0:00       ` Anders Pytte
1997-03-18  0:00     ` Ken Garlington
1997-03-17  0:00   ` John McCabe
     [not found]     ` <tz8n2s1hrdc.fsf@aimnet.com>
1997-03-20  0:00       ` John McCabe
1997-03-20  0:00         ` Jean-Marc Jezequel
1997-03-20  0:00           ` John McCabe
1997-03-21  0:00             ` Niall Cooling
1997-03-21  0:00               ` Gavin Collings
1997-03-27  0:00                 ` Joachim Durchholz
1997-04-03  0:00                   ` Robert I. Eachus
1997-04-04  0:00                     ` Chris Beer
1997-04-04  0:00                     ` Derek Clarke
1997-04-03  0:00                   ` Gavin Collings
1997-04-03  0:00                     ` Ken Garlington
1997-04-04  0:00                       ` Derek Clarke
1997-04-04  0:00                     ` Derek Clarke
1997-04-06  0:00                       ` Robert Dewar
1997-04-07  0:00                         ` Ken Garlington
1997-04-09  0:00                           ` Gavin Collings
1997-04-04  0:00                   ` Ken Garlington
1997-04-04  0:00                     ` Robert Dewar
1997-04-03  0:00                 ` Robin Rosenberg
1997-03-24  0:00             ` Ken Garlington
1997-03-26  0:00           ` Thomas Beale
1997-03-26  0:00             ` Ken Garlington
1997-03-20  0:00       ` John McCabe
1997-03-21  0:00       ` "Paul E. Bennett"
1997-03-22  0:00     ` Nigel Tzeng
1997-03-23  0:00       ` John McCabe
1997-03-18  0:00   ` Jon S Anthony
1997-03-18  0:00   ` Ken Garlington
1997-03-19  0:00     ` Eric M. Boyd
1997-03-19  0:00       ` Jeffrey W. Stulin
     [not found]       ` <3345cd60.2092398@news.sydney.apana.org.au>
1997-04-03  0:00         ` Ariane-5 crash , Eiffel and Ada Jeffrey W. Stulin
1997-04-03  0:00         ` Nick Leaton
1997-04-08  0:00         ` AdaWorks
1997-03-18  0:00   ` Papers on the Ariane-5 crash and Design by Contract Tarjei Jensen
1997-03-18  0:00   ` Jon S Anthony
1997-03-18  0:00   ` Ulrich Windl
1997-03-18  0:00   ` Robert I. Eachus
1997-03-18  0:00   ` Jon S Anthony
1997-03-18  0:00   ` Jon S Anthony
1997-03-19  0:00     ` Ron Forrester
1997-03-21  0:00       ` Ken Garlington
1997-03-22  0:00         ` Ron Forrester
1997-03-19  0:00   ` Ken Garlington
1997-03-19  0:00   ` Ken Garlington
1997-03-20  0:00     ` Richard Kaiser
1997-03-24  0:00       ` Ken Garlington
1997-03-20  0:00     ` Martin Tom Brown
1997-03-21  0:00       ` Frank Manning
1997-03-21  0:00         ` Martin Tom Brown
1997-03-23  0:00           ` Frank Manning
1997-03-25  0:00             ` Ken Garlington
1997-03-19  0:00   ` Jon S Anthony
1997-03-19  0:00   ` Karel Th�nissen
1997-03-19  0:00   ` Nick Leaton
1997-03-19  0:00   ` Jon S Anthony
1997-03-20  0:00     ` Paul Johnson
1997-03-24  0:00       ` Ken Garlington
1997-03-24  0:00         ` Design by Contract in C++ (was Re: Papers on the Ariane-5 crash and Design by Contract) Anders Pytte
1997-03-20  0:00     ` Papers on the Ariane-5 crash and Design by Contract Jean-Marc Jezequel
1997-03-24  0:00       ` Ken Garlington
1997-03-19  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) Karel Th�nissen
1997-03-19  0:00   ` Papers on the Ariane-5 crash and Design by Contract Karel Th�nissen
1997-03-20  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) Nick Leaton
1997-03-20  0:00   ` Papers on the Ariane-5 crash and Design by Contract Robert I. Eachus
1997-03-20  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) Karel Th�nissen
1997-03-20  0:00   ` Nick Leaton
1997-03-20  0:00   ` Papers on the Ariane-5 crash and Design by Contract Robert I. Eachus
1997-03-21  0:00   ` Please do not start a language war (was " Jon S Anthony
1997-03-21  0:00   ` Alexander Anderson
1997-03-23  0:00     ` "Paul E. Bennett"
1997-03-21  0:00   ` Ulrich Windl
     [not found]   ` <tz8sp1qiywm.fsf@aimnet.com>
1997-03-21  0:00     ` ae59
1997-03-22  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) Stuart Yeates
1997-03-22  0:00   ` Papers on the Ariane-5 crash and Design by Contract Jon S Anthony
1997-03-28  0:00     ` Matt Kennel (Remove 'nospam' to reply)
1997-03-22  0:00   ` Bertrand Meyer
1997-03-23  0:00     ` Dale Stanbrough
     [not found]       ` <3335E18E.33590565@eiffel.com>
1997-03-23  0:00         ` FUD (Re: Papers on the Ariane-5 crash and Design by Contract) Bertrand Meyer
1997-03-24  0:00           ` William Grosso
1997-03-24  0:00             ` William Clodius
1997-03-24  0:00             ` Bertrand Meyer
1997-03-24  0:00             ` Brad Appleton
1997-03-24  0:00     ` Papers on the Ariane-5 crash and Design by Contract Robert Dewar
1997-03-24  0:00       ` Manners (was Re: Papers on the Ariane-5 crash and Design by Contract) Bertrand Meyer
1997-03-25  0:00         ` the one and only real true kibo
1997-03-22  0:00   ` Papers on the Ariane-5 crash and Design by Contract Bertrand Meyer
1997-03-22  0:00     ` Anders Pytte
1997-03-23  0:00       ` Steve Furlong
1997-03-24  0:00         ` Anders Pytte
1997-03-24  0:00           ` Simulating Eiffel-style assertions (was: Papers on the Ariane-5 crash and Design by Contract) Wolfgang Reddig
1997-03-24  0:00             ` Anders Pytte
1997-03-25  0:00               ` Wolfgang Reddig
1997-03-25  0:00                 ` Anders Pytte
1997-03-31  0:00                 ` Joachim Durchholz
1997-03-26  0:00             ` Alan Brain
1997-03-26  0:00               ` Wolfgang Reddig
1997-03-29  0:00                 ` How old time languages survive EJon
1997-03-24  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) Ken Garlington
1997-03-24  0:00   ` Papers on the Ariane-5 crash and Design by Contract Ken Garlington
1997-03-24  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) William Clodius
1997-03-24  0:00   ` Papers on the Ariane-5 crash and Design by Contract Robb Nebbe
1997-03-24  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) Nick Leaton
1997-03-24  0:00   ` Papers on the Ariane-5 crash and Design by Contract Ken Garlington
1997-03-27  0:00     ` Joachim Durchholz
1997-03-31  0:00       ` Ken Garlington
1997-04-06  0:00         ` Joachim Durchholz
1997-03-24  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) Ken Garlington
1997-03-24  0:00   ` Papers on the Ariane-5 crash and Design by Contract Jon S Anthony
1997-03-24  0:00   ` Ken Garlington
1997-03-24  0:00   ` Alexander Anderson
1997-03-25  0:00   ` Ariane-5: can you clarify? (Re: Please do not start a language war) Ken Garlington
1997-03-25  0:00   ` Ken Garlington
1997-03-25  0:00   ` David Starr
1997-03-25  0:00   ` Papers on the Ariane-5 crash and Design by Contract Robert I. Eachus
1997-03-26  0:00   ` Jon S Anthony
1997-03-26  0:00   ` Alexander Anderson
1997-03-26  0:00   ` Ken Garlington
1997-03-27  0:00   ` Trust but verify (was " Robert I. Eachus
1997-03-28  0:00   ` Jon S Anthony
1997-03-28  0:00   ` Trust but verify (was " Robert I. Eachus
1997-03-31  0:00   ` Ken Garlington
1997-03-18  0:00 ` Ariane-5: can you clarify? (Re: Please do not start a language war) Jon S Anthony
1997-03-19  0:00 ` Papers on the Ariane-5 crash and Design by Contract Chris Brand
1997-03-23  0:00 ` the one and only real true kibo
  -- strict thread matches above, loose matches on Subject: below --
1997-03-17  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-03-20  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-03-25  0:00 ` Nick Roberts
1997-03-24  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-03-27  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-04-03  0:00 Adrian B.Y. Hoe
1997-04-05  0:00 ` Nick Roberts
replies disabled

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