From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Assertions in the Next Ada Standard
Date: Mon, 14 Jan 2002 17:20:00 GMT
Date: 2002-01-14T17:20:00+00:00 [thread overview]
Message-ID: <wccadvgq27z.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 3C40BC71.F3009405@san.rr.com
Darren New <dnew@san.rr.com> writes:
> > Second, in an inheritance
> > scheme, what do we do about either inheriting or overriding a assertion.
> > This problem is non-trivial. I am not sure I have the answer, and that
> > is why there is a need for more people thinking about this than we have
> > so far.
>
> This is pretty well considered in Eiffel, actually. Indeed, the strength
> of Eiffel's "DbC" assertions over those of just inlining boolean checks
> is that they *do* get inherited in the "right way".
The right way for Eiffel, perhaps. But Ada makes has a distinction
between class-wide and specific types, which is not present in Eiffel,
so the Eiffel rules don't quite translate over to Ada. I think you
really want *two* preconditions on a dispatching procedure: one that
applies to non-dispatching calls, and one that applies to dispatching
calls. This is so the specific type can provide a stronger contract
than is provided by the whole class. Same for post-cond.
The Eiffel rules are certainly a good starting point. But it would
require some thought to translate them into the Ada world.
- Bob
next prev parent reply other threads:[~2002-01-14 17:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-11 6:20 Assertions in the Next Ada Standard Richard Riehle
2002-01-11 9:23 ` Dale Stanbrough
2002-01-11 13:47 ` Robert A Duff
2002-01-11 23:28 ` Nick Roberts
2002-01-12 1:30 ` Darren New
2002-01-11 20:07 ` FGD
2002-01-11 20:39 ` Wes Groleau
2002-01-12 4:56 ` Robert Dewar
2002-01-12 7:30 ` Richard Riehle
2002-01-12 19:58 ` FGD
2002-01-12 21:27 ` Ed Falis
2002-01-12 22:45 ` Darren New
2002-01-14 17:20 ` Robert A Duff [this message]
2002-01-14 17:42 ` Darren New
2002-01-14 23:16 ` Mark Lundquist
2002-01-17 6:23 ` Richard Riehle
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox