comp.lang.ada
 help / color / mirror / Atom feed
* AdaYY; Assertions?
@ 2001-03-10 21:24 Lao Xiao Hai
  2001-03-11 10:44 ` Florian Weimer
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Lao Xiao Hai @ 2001-03-10 21:24 UTC (permalink / raw)


During the development of Ada 95, there was discussion about
including an assertion capability for pre-conditions, post-conditions,
and invariants.   During a conversation with someone, I was told
the safety-critical community was uneasy about this capability and
felt including it would lead to a false sense of security.

Since then, a lot of additional discussion has emerged regarding ideas
such as Design By Contract.   Also, I am using a textbook, for a C++
data structures class, in which all of the code examples include comment

code for pre-, post- and invariant conditions.   Of course, C++ has no
capability built into the language to support these assertions, so the
compiler can never check them.

It seems to me that Ada's architecture is inherently hospitable to the
concept.
Granted, the type definition model is a kind of implied assertion
capability,
conservative and reliable.  Also granted, one can declare pre-conditions
that
self-contradictory and totally confuse the resulting code.  However, a
modest
addition to the next version of Ada could be a powerful capability and
make
the language conformant with the publication of algorithm textbooks
that,
increasingly, demonstrate their examples by including pre-, post-, and
invariant
assertions.

Richard Riehle
richard@adaworks.com
rdriehle@nps.navy.mil       (I am currently teaching some classes,
including Ada,
                                            at the nearby Naval
Postgraduate School,
                                             and this is my email
address there)




^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: AdaYY; Assertions?
@ 2001-03-12 11:07 Christoph Grein
  2001-03-13  4:55 ` Bryce Bardin
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Grein @ 2001-03-12 11:07 UTC (permalink / raw)
  To: comp.lang.ada

Florian Weimer wrote:
> Lao Xiao Hai <laoxhai@ix.netcom.com> writes:
  Old Little (Hai?)
> 
> > Richard Riehle
> 
> Split personality? ;-)





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

end of thread, other threads:[~2001-03-19 21:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-10 21:24 AdaYY; Assertions? Lao Xiao Hai
2001-03-11 10:44 ` Florian Weimer
2001-03-12 16:20 ` Tucker Taft
2001-03-12 18:09 ` Stephen Leake
2001-03-14 17:17   ` Lao Xiao Hai
2001-03-14 19:39     ` Robert A Duff
2001-03-19 21:02       ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
2001-03-12 11:07 Christoph Grein
2001-03-13  4:55 ` Bryce Bardin
2001-03-13 11:23   ` Florian Weimer
2001-03-14 16:52   ` Lao Xiao Hai

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