comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.tsoh.plus-bug.bauhaus@maps.futureapps.de>
Subject: Re: Require / ensure clauses
Date: Wed, 22 Oct 2008 01:48:42 +0200
Date: 2008-10-22T01:48:42+02:00	[thread overview]
Message-ID: <48fe6a5a$0$13389$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <df98761e-f67d-42e9-a86d-cb9c72a56e64@c60g2000hsf.googlegroups.com>

Hibou57 (Yannick Duch�ne) wrote:

> ... here we are... let's simply talk about design by contract with
> Ada :)

Ada DbC seems to be work in progress, to be integrated possibly
with Ada type constraints (yielding type based invariants in
addition to pre/post for subprograms). At this time GNAT GPL
offers a semi-solution for subprograms (excluding inheritance AFAICT).
Use pragmas Precondition and Postcondition, specified next to the
preceding subprogram declaration. Use pragma Assert for Eiffel's
"check" instruction.
Exception handlers can be made to act like Eiffel's "rescue"
clauses.

I'd speculate that adding constraints for types and operations
is not an easy job because Ada is not as simple a language as
Eiffel sometimes appears to be. At least as regards integration
of Ada with DbC or with that other one, requires/modifies/ensures
etc.

If the SPARK subset of Ada is not a heavy restriction,
it offers Eiffel DbC and more, at program analysis (compile) time.
I think it was advertised it as Eiffel on Steroids once.



      parent reply	other threads:[~2008-10-21 23:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 19:23 Require / ensure clauses Hibou57 (Yannick Duchêne)
2008-10-21 19:25 ` Hibou57 (Yannick Duchêne)
2008-10-21 23:48 ` Georg Bauhaus [this message]
replies disabled

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