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,UTF8 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.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: Lost in translation (with SPARK user rules) Date: Thu, 27 May 2010 10:13:55 +0200 Organization: Ada At Home Message-ID: References: <0466e131-cc80-4db4-b080-eec9aefcb1c7@z17g2000vbd.googlegroups.com> NNTP-Posting-Host: VsdMw8HJ6uo7b6guDb/gnA.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.53 (Win32) Xref: g2news2.google.com comp.lang.ada:12068 Date: 2010-05-27T10:13:55+02:00 List-Id: Le Wed, 26 May 2010 12:57:11 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: >> If that is the conclusion left in the SIV file then the user rule to >> prove it is: >> user_bitwise(1): bit__and(X, 2) =3D 0 -> X div 2 mod 2 =3D 0 >> may_be_deduced . > I remember about this, this was just that I did not suspected this had= = > to be a so exact match. Finally, there is a work-around: if the Simplifier expect an expression = = which exactly match the one provided as a user rule, and there is not a = = direct matching expression in the source, then just use Simplifier's = embedded rules to prove an expression is equivalent to the one the = Simplifier expect an exact match. That is, if there a user rule of the form my_rule(1) Conclusion_1 may_be_deduced_from [Expression_1]. and the source unfortunately contains only Expression_2 then try something like --# check Expression_2 -> Intermediate_Expression(1); --# check ...; --# check ...; --# check Intermediate_Expression(N) -> Expression_1; and here it is. -- = 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.