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,48e1a3c594fb62e8 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news2.glorb.com!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: SPARK Date: Sat, 15 May 2010 20:14:07 +0200 Organization: Ada At Home Message-ID: References: NNTP-Posting-Host: sTlYSXnTcjJGTYbLtvdIYA.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:11639 Date: 2010-05-15T20:14:07+02:00 List-Id: Another example, as much strange to me. procedure Limit (X : in out Integer; Lower : in Integer; Upper : in Integer) --# pre Lower < Upper; --# post ((X~ < Lower) -> (X =3D Lower)) and --# ((X~ > Upper) -> (X =3D Upper)) and --# (X in Lower .. Upper); -- .... Limit (Local_Data, Lowest, Highest); Part :=3D Local_Data - Lowest; Whole :=3D Highest - Lowest; --# assert Part >=3D 0; --# assert Local_Data <=3D Highest; -- .... The simplifier cannot prove =E2=80=9CLocal_Data <=3D Highest=E2=80=9D, a= lthough the post = condition of Limit states =E2=80=9CX in Lower .. Upper=E2=80=9D so that = it should know = =E2=80=9CLocal_Data in Lowest .. Highest=E2=80=9D and then =E2=80=9CLoca= l_Data <=3D Highest=E2=80=9D. While perhaps I'm not using it the good way (as a beginner, this may be = a = possible case). -- = There is even better than a pragma Assert: an --# assert