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!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: Lost in translation (with SPARK user rules) Date: Sun, 30 May 2010 11:57:14 +0200 Organization: Ada At Home Message-ID: References: <927d98bd-9219-426d-815a-392c28211908@j12g2000pri.googlegroups.com> NNTP-Posting-Host: qUfwAWuer84MZJ3PpksnTQ.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:12162 Date: 2010-05-30T11:57:14+02:00 List-Id: Le Sun, 30 May 2010 11:26:12 +0200, Phil Thornley = a =C3=A9crit: > You can see why this is sensible (even if it has some drawbacks*). > Generally the way that a user rule is written is in response to an > unproven conclusion in a simplified VC, so the author of the rule uses= > the final form of the unproven VC to write the rule. Therefore the > rule can only be reliably applied at the point where the VC has > reached its final form. Yes, I know. The nut with me, is that I try to find the best way to use = = these rules as general rules, and precisely avoid to write rules which = would only match expressions in a given unproved VC. The technique is evolving, it works better than at my very first attempt= s. = May be I will write some french pages about it some day. > I guess it might be possible for the Simplifier to try all the user > rules at each stage of the process - but the developers of the tool > have been concentrating heavily on making simplification as quick as > possible (quite rightly in my view) and would not want to do anything > that might slow it down without a very strong argument for the > advantages of doing that. I guess this is important, as I've notice the simplifier is easily slowe= d = down as the number of checks increase (or may be this is the effect of m= y = user rules, which I suppose, are not as much efficiently handled as the = = built-in ones). > (Of course nothing is ever simple, for example what happens if one > rewrite rule requires another to be applied before its sideconditions > are satisfied - are all such rules tried repeatedly until none are > used, or is it a once-only pass? etc...) That is why, except with one unique single case (a rewrite rule involvin= g = modular types), my own rule is to not use rewrite rules at all, because = it = can easily become a one way trap only. Inference rules are more plastic = = and does not stick anything. -- = 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.