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: a07f3367d7,ec6f74e58e86b38b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!fdn.fr!gegeweb.org!aioe.org!not-for-mail From: =?iso-8859-15?Q?Yannick_Duch=EAne_=28Hibou57=29?= Newsgroups: comp.lang.ada Subject: Re: Lost in translation (with SPARK user rules) Date: Wed, 26 May 2010 23:14:24 +0200 Organization: Ada At Home Message-ID: References: <0466e131-cc80-4db4-b080-eec9aefcb1c7@z17g2000vbd.googlegroups.com> <4bfd2d05$0$27598$ba4acef3@reader.news.orange.fr> <1jo6gjejsy828$.e9dx6txqbazd$.dlg@40tude.net> NNTP-Posting-Host: VsdMw8HJ6uo7b6guDb/gnA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; 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.53 (Win32) Xref: g2news2.google.com comp.lang.ada:12051 Date: 2010-05-26T23:14:24+02:00 List-Id: Le Wed, 26 May 2010 22:14:48 +0200, Dmitry A. Kazakov = a =E9crit: > No run time checks, but an option to tell more about the contract, wit= h > enforced static checks, that this indeed hold. If you have no time, no= > guts, or when the algorithm does not allow certain proofs, you just do= = > not > make promises you cannot keep and go further. OK, I see : you mean interfacing between Ada and SPARK ? Is that the ide= a ? Indeed, would be nice if Ada compiler could fee SPARK Examiner with = required condition (provided I've understood your words). > I think it should be more than just two levels. But yes, each language= > construct and each library operation shall have a contract. Goes the same way as the above (OK) >> Actually, how can you test an compiler >> compliance with SPARK ? I feel you can do it only for full Ada. > > Likely yes, because there exist legal Ada programs, such that no Ada > compiler could compile. So this could be one added good reason to have a test suit targeting the= = SPARK subset only. > Rather by refining the contracts. When you feel that the implementatio= n = > is > mature, you can add more promises to the contract of and see if they h= old > (=3Dprovable). If they don't you could try to re-implement some parts = of = > it. > When you feel that it takes too much time, is impossible to prove, you= = > can > drop the idea to do it formally. You will sill have a gain of deeper > understanding how the thing works and could document why do you think = it = > is > correct, even if that is not formally provable. This seems to mean something similar to one of my previous message, abou= t = the fact I was perhaps targeting too much at first sight. Having differe= nt = levels in mind seems indeed a requirement if one don't want to be too mu= ch = discouraged. -- = There is even better than a pragma Assert: a SPARK --# check.