comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Is Aunit helpful?
Date: Mon, 16 Aug 2010 00:58:59 +0200
Date: 2010-08-16T00:58:59+02:00	[thread overview]
Message-ID: <op.vhh4slqeule2fv@garhos> (raw)
In-Reply-To: 32dc1191-0a83-40ef-8bbc-a13a06f2167e@u26g2000yqu.googlegroups.com

Le Sun, 15 Aug 2010 23:47:21 +0200, Midoan <midoan.ses@gmail.com> a écrit:
> In practice, and for example, Ada 2012's post-conditions are unlikely to
> be used to capture the full effect of commercial, safety critical,
> code ... That, to our eyes, is a major weakness in specification based
> verification : the specification may say 'A' but the code may do 'A
> and B' ... and trying to model 'B' in the specification typically
> leads to  specifications as complex as the code!

Well, I like the idea of Ada 2012 pre-post (while still not tried) the Ada  
version of this (I did with the Eiffel one).

I already used this, with Eiffel, and my memory tells me I cannot remember  
any case where this really helped and fixing a bug (you will laugh, but  
even the SmallEiffel compiler source, was containing nothing that here and  
there some seed of toy contract-assertions, very poor use in SmallEiffel  
itself). Either the pre-post was erroneously expressed (and ended into  
signaling violation which was not error) or this was missing some  
important part which could then not be detected. Thus, I agree with you  
about the “weak”. I would even add “possibly wrong” (may be worse than  
weak).

 From there, I would like to get to three points.

1) After my experiences with Eiffel, pre-post could be either erroneous or  
missing something, for a simple reason: this is not statically checked,  
this is only runtime checked... so it is far too much easy to fail at  
design time! (event in a recursive design process, this does not really  
change anything) If this was statically checked, this would be deeply  
different. The weakness here is not due to pre-post concept, but rather to  
static check vs runtime check.

2) Your comment makes me think what you would better enjoy, would be  
reification. You would not have any more troubles with “said A but did A  
and B”, as A and B would have been produced during a process and would be  
under control of this process (there woul be an explicit track forth and  
back to and from this A and B).

3) About point #1, just wanted to say I don't want here to discourage  
people interested in pre-post introduced in Ada 2012, to use it. No-no-no,  
if they enjoy this, this is very good, and this will lead them to a good  
way. Just wanted to say what should not be hidden: this is weak, as this  
is more a step above comments. I was to say “this is just like  
comments”... but honestly, comment are not checked at all, so these  
pre-post may be viewed as “Better Comments”.

-- 
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
--  i.e. forget about previous premises which leads to conclusion
--  and start with new conclusion as premise.



  reply	other threads:[~2010-08-15 22:58 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 14:19 Is Aunit helpful? Ada novice
2010-08-05 12:07 ` Stephen Leake
2010-08-05 17:29   ` Ada novice
2010-08-05 18:18     ` Tero Koskinen
2010-08-05 20:39       ` Ada novice
2010-08-05 20:57         ` Simon Wright
2010-08-13 16:43         ` Yannick Duchêne (Hibou57)
2010-08-13 19:34           ` Simon Wright
2010-08-13 20:59             ` Yannick Duchêne (Hibou57)
2010-08-14  6:57           ` Stephen Leake
2010-08-14 13:38             ` Yannick Duchêne (Hibou57)
2010-08-14 21:33             ` Midoan
2010-08-14 21:38               ` Yannick Duchêne (Hibou57)
2010-08-14 21:49                 ` Simon Wright
2010-08-14 22:04                   ` Yannick Duchêne (Hibou57)
2010-08-15  7:57                 ` Midoan
2010-08-15 11:46                   ` Simon Wright
2010-08-15 12:10               ` Stephen Leake
2010-08-15 21:47                 ` Midoan
2010-08-15 22:58                   ` Yannick Duchêne (Hibou57) [this message]
2010-08-17  2:46                     ` Randy Brukardt
2010-08-17 12:37                       ` Cyrille
2010-08-20  9:22                         ` Yannick Duchêne (Hibou57)
2010-08-20  9:20                       ` Yannick Duchêne (Hibou57)
2010-08-16  7:59                   ` Stephen Leake
2010-08-16  9:02                     ` Midoan
2010-08-26 17:45                       ` Colin Paul Gloster
2010-08-07 16:57       ` Marco
2010-08-13 14:09       ` Yannick Duchêne (Hibou57)
2010-08-05 20:48     ` Simon Wright
2010-08-06  9:06       ` Ada novice
2010-08-06 16:51         ` Simon Wright
2010-08-06 18:13           ` Ada novice
2010-08-08 13:39 ` John McCormick
2010-08-08 17:10   ` Ada novice
2010-08-09 17:05     ` John McCormick
2010-08-09 17:23       ` Michael R
2010-08-10  8:33         ` Ada novice
2010-08-10 13:48           ` John McCormick
2010-08-10  9:45       ` Mark Lorenzen
2010-08-10 14:07         ` John McCormick
2010-08-10 17:32       ` Ada novice
2010-08-12 15:04         ` John McCormick
2010-08-17 15:51           ` Ada novice
2010-08-13 15:31 ` Yannick Duchêne (Hibou57)
replies disabled

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