From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,595c75298fbdce96 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Is Aunit helpful? Date: Mon, 16 Aug 2010 00:58:59 +0200 Organization: Ada At Home Message-ID: References: <8a1e58c0-2330-4475-8013-97df103dd85e@o19g2000yqb.googlegroups.com> <82r5ids1o9.fsf@stephe-leake.org> <20100805211820.52c18cb5.tero.koskinen@iki.fi> <8d166cfb-4850-42b6-ac25-d9ac00df7565@q35g2000yqn.googlegroups.com> <82ocd5wukf.fsf@stephe-leake.org> <3957496a-af4b-45f5-87c9-327b22d19f08@x21g2000yqa.googlegroups.com> <82eie0vzyd.fsf@stephe-leake.org> <32dc1191-0a83-40ef-8bbc-a13a06f2167e@u26g2000yqu.googlegroups.com> NNTP-Posting-Host: RZkTY5NyuNCeyE5VNfPAfQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.61 (Win32) Xref: g2news1.google.com comp.lang.ada:13375 Date: 2010-08-16T00:58:59+02:00 List-Id: Le Sun, 15 Aug 2010 23:47:21 +0200, Midoan a =C3=A9= 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 A= da = version of this (I did with the Eiffel one). I already used this, with Eiffel, and my memory tells me I cannot rememb= er = any case where this really helped and fixing a bug (you will laugh, but = = even the SmallEiffel compiler source, was containing nothing that here a= nd = 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 =E2=80=9Cweak=E2=80=9D. I would even add =E2=80=9Cpossibly wro= ng=E2=80=9D (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 =E2=80=9Csaid A b= ut did A = and B=E2=80=9D, 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-n= o, = 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 =E2=80=9Cthis is just like = comments=E2=80=9D... but honestly, comment are not checked at all, so th= ese = pre-post may be viewed as =E2=80=9CBetter Comments=E2=80=9D. -- = 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.