comp.lang.ada
 help / color / mirror / Atom feed
From: adaworks@netcom.com (AdaWorks)
Subject: Critique of Ariane 5 paper (finally)
Date: 1997/08/22
Date: 1997-08-22T00:00:00+00:00	[thread overview]
Message-ID: <adaworksEFC4s6.49A@netcom.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3649 bytes --]


From: Richard Riehle
To:   DBC Discussion

Design by Contract (DBC) is a powerful idea.  It is more powerful than
the notion of assertions, alone. Although, I believe assertions can
be an important aspect of DBC, restricting our discussion to assertions
probably leads us to taking too small a view of DBC.    

I think DBC includes:

  1) Explicit separation of the contract from the implementation
  2) Ability to maximize contract violations at compile time
  3) Clear statement to client of the contract of what is promised
  4) Conditions under which the contract would be violated
  5) Conditions under which the contract would be broken
 
�There are probably others.

Ada supports all five of these in very important ways. In particular,
Ada provides the superb support for 1), separation of contract
from implementation through the specification/body model for packages.
Number 2) is also a strong point of Ada because the language is designed
with exactly that goal in mind.  

To expand a little on item number 2). No programming language is
more effective at supporting this than Ada. The package specification 
rigorously defines the profile of every public method (subprogram) thereby 
permitting strict compile-time checking on any call; the scope and
visibility rules, draconion in the view of some programmers, prevents
a client from falling into some ambiguity trap,  concientious use of
named association further ensures compile-time checking, the type
model guarantees that collisons between incompatible data elements
will not occur, and the accessiblity rules raise the probability that
pointer-related errors will be caught at compile time.

Number three implies both traceability and understandability. This is
well-supported in Ada through both the scope and visibility rules and
the separation of the contract into a visible part and a non-visible
part.  The addition of private children in Ada 95 allows us to improve
upon this even further.  Ada does not take a back seat to any other
language on this point, even though Eiffel also supports this 
very well.

The fourth and fifth points are closely-related yet subtly different.
For this discussion, we consider them together.  Ada has taken a more
conservative view of the contract than some languages.  The type-safe
model does include an invariant for the type.  It also includes a
simple pre- and post-condition in the form of range constraints. While
this is not as sophisticated as explicit assertions, it works quite
well when coupled with the other rules for subprogram invocation and
visibility control.  

All of that begin said, I do like the idea of adding assertions to
Ada as additional support for 5) & 6).  It is important to realize,
though, that an assertion may be incorrectly stated more easily than
one would like.  A wrongly-formed assertion might be more of a problem
than no assertion at all.  

We would probably profit from exploring the DBC notion in greater
depth.  But the benfits from that exploration will be greatest if
we define it a higher level of abstraction than simple assertions.
I think Bertrand would agree with this "assertion".  
I hope others will.

Richard Riehle
AdaWorks
Suite 30
2555 Park Boulevard
Palo Alto, CA 94306
(415) 328-1815

                    P.S. My News Server is acting funny right now so
                         it is difficult for me to respond directly to
                         postings until it gets fixed.
                                               RR

 
-- 

richard@adaworks.com
AdaWorks Software Engineering
Suite 30
2555 Park Boulevard
Palo Alto, CA 94306
(415) 328-1815
FAX  328-1112




             reply	other threads:[~1997-08-22  0:00 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-22  0:00 AdaWorks [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-08-22  0:00 Critique of Ariane 5 paper (finally!) Marin David Condic, 561.796.8997, M/S 731-96
1997-08-21  0:00 aek
     [not found] ` <33FC66AD.9A0799D4@calfp.co.uk>
1997-08-22  0:00   ` Robert S. White
1997-08-22  0:00     ` Samuel Mize
1997-08-22  0:00       ` Samuel Mize
1997-08-23  0:00     ` Ken Garlington
     [not found]   ` <33FFA4B1.3543@flash.net>
1997-08-26  0:00     ` Nick Leaton
     [not found]       ` <3406BEF7.2FC3@flash.net>
     [not found]         ` <3406E0F7.6FF7ED99@calfp.co.uk>
1997-09-02  0:00           ` Ken Garlington
1997-08-03  0:00 Ken Garlington
     [not found] ` <dewar.870870888@merv>
     [not found]   ` <33E8FC54.41C67EA6@eiffel.com>
1997-08-07  0:00     ` Juergen Schlegelmilch
1997-08-07  0:00     ` Ken Garlington
1997-08-07  0:00       ` Ken Garlington
     [not found]         ` <33EB4935.167EB0E7@eiffel.com>
1997-08-08  0:00           ` Bertrand Meyer
1997-08-08  0:00             ` Ken Garlington
1997-08-08  0:00               ` Ken Garlington
1997-08-11  0:00               ` Don Harrison
1997-08-11  0:00               ` Bertrand Meyer
1997-08-12  0:00                 ` Robert Dewar
1997-08-13  0:00                   ` Bertrand Meyer
1997-08-13  0:00                     ` Ken Garlington
1997-08-16  0:00                     ` Robert Dewar
1997-08-17  0:00                       ` Bertrand Meyer
1997-08-19  0:00                         ` Ken Garlington
1997-08-20  0:00                           ` Robert Dewar
     [not found]                             ` <33FB3B29.41C67EA6@eiffel.com>
1997-08-20  0:00                               ` Bertrand Meyer
     [not found]                                 ` <5tv9cs$85q@nntpa.cb.lucent.com>
     [not found]                                   ` <340341CA.2F1CF0FB@eiffel.com>
1997-08-27  0:00                                     ` Samuel Mize
1997-08-29  0:00                                     ` Ken Garlington
1997-08-20  0:00                           ` Robert Dewar
1997-08-21  0:00                             ` Thomas Beale
1997-08-21  0:00                               ` Robert Dewar
     [not found]                                 ` <33FD8685.AAAE3B4F@stratasys.com>
1997-08-22  0:00                                   ` Robert Dewar
     [not found]                                     ` <3401811D.1700E7BE@stratasys.com>
1997-08-25  0:00                                       ` Jon S Anthony
1997-08-29  0:00                                       ` Ken Garlington
1997-08-29  0:00                                         ` Jeff Kotula
1997-09-02  0:00                                           ` Ken Garlington
     [not found]                                   ` <33FE8732.4FBB@invest.amp.com.au>
1997-08-26  0:00                                     ` Nick Leaton
     [not found]                                     ` <33FFA324.4DB9@flash.net>
     [not found]                                       ` <34013F3E.27D4@invest.amp.com.au>
1997-08-29  0:00                                         ` Ken Garlington
1997-08-23  0:00                                 ` Ken Garlington
1997-08-21  0:00                       ` W. Wesley Groleau x4923
1997-08-22  0:00                         ` Bertrand Meyer
1997-08-22  0:00                           ` W. Wesley Groleau x4923
1997-08-16  0:00                     ` Robert Dewar
1997-08-13  0:00                   ` Samuel Mize
1997-08-13  0:00                     ` Ken Garlington
     [not found]                     ` <33F22AD8.41C67EA6@eiffel.com>
1997-08-13  0:00                       ` Bertrand Meyer
1997-08-13  0:00                         ` Ken Garlington
     [not found]                           ` <33F28DBF.794BDF32@eiffel.com>
1997-08-13  0:00                             ` Bertrand Meyer
1997-08-15  0:00                               ` Ken Garlington
1997-08-15  0:00                                 ` Jon S Anthony
1997-08-16  0:00                                   ` Ken Garlington
1997-08-14  0:00                       ` Jon S Anthony
1997-08-14  0:00                         ` Bertrand Meyer
1997-08-15  0:00                           ` Jon S Anthony
1997-08-14  0:00                         ` Matthew Heaney
1997-08-14  0:00                         ` geldridg
1997-08-14  0:00                       ` Robert S. White
1997-08-15  0:00                         ` Ken Garlington
1997-08-16  0:00                           ` Robert Dewar
1997-08-14  0:00                       ` Samuel Mize
1997-08-15  0:00                         ` Thomas Beale
1997-08-15  0:00                           ` Samuel Mize
1997-08-15  0:00                             ` Bertrand Meyer
1997-08-15  0:00                               ` Jon S Anthony
1997-08-16  0:00                               ` Ken Garlington
1997-08-09  0:00             ` Marinos J. Yannikos
replies disabled

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