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,a6fe9ef21ba269dc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.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: Ada Smileys in C++ lib Conversion Date: Fri, 13 Aug 2010 17:06:08 +0200 Organization: Ada At Home Message-ID: References: <1a9b39b0-73f6-497c-a8f4-abf8129886ac@t20g2000yqa.googlegroups.com> NNTP-Posting-Host: M2yP1Cx/h9YxW/Ct5b534Q.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.60 (Win32) Xref: g2news1.google.com comp.lang.ada:13220 Date: 2010-08-13T17:06:08+02:00 List-Id: Le Fri, 13 Aug 2010 16:20:16 +0200, Warren a =C3=A9cr= it: > it immediately identified the value MC_CTL_LOCAL_C > (and others) as not fitting into the Control_Type's > valid range. In C++ a glaring error had gone > unnoticed: > [...] > I'm always smiling when I convert code from C/C++ to > Ada. In code of any significant size, Ada always > discovers problems that went unnoticed in C/C++. Makes me think about a recent case where I though =E2=80=9CA C/C++ compi= ler would = have never caught it=E2=80=9D. This was with AdaDep, a tool from AdaLog = (by J.P. = Rosen). Since the last revision of Ada, ASIS has also evolved and added = a = new item in the Asis.Element_Kinds enumeration (this item is = An_Expression_Path). Immediately caught by Ada in AdaDep which was not = compiling anymore, and the same in another other little application of = mine. This indeed help to feel at rest when you see such missing/oversight = immediately caught. -- = 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.