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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1d1caf8fb79ff030 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.74.201 with SMTP id w9mr15682751pbv.0.1330890295919; Sun, 04 Mar 2012 11:44:55 -0800 (PST) Path: h9ni39330pbe.0!nntp.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 04 Mar 2012 13:44:50 -0600 Date: Sun, 04 Mar 2012 14:44:41 -0500 From: "Peter C. Chapin" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: SPARK loop VCs that go "one beyond" the loop? References: In-Reply-To: Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-J5EbJmlQwSbP9ndAcWDvPhvJimI/lI9U+ut62hzzGGqyDdMplLkyh37/aQL9EvTPWj+SVuD+fWRAdUA!99zjKuCv9w/0jfnk+PSGfPa9FMKgwmXF7dLXa5tHi5Ejg6Po1qM5CgqZoPJ54U8= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2630 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-03-04T14:44:41-05:00 List-Id: On 2012-03-04 13:43, Phil Thornley wrote: > I would like to give a more considered reply than I have time for just > now, however: > > I am fairly sure that what you need to add to the assertion is the > result of the earlier check: > Event_Array(I).Description_Size<= Description'Length > > You may also need to state that the upper bound on J is not changed by > the loop body: > Event_Array = Event_Array% I tried changing the assertion to --# assert Event_Array(I).Description_Size <= Description'Length and --# (J - 1) < Description'Length; but that didn't help by itself. When I tried adding Event_Array = Event_Array% that didn't seem to do anything. I have a feeling that because Event_Array has mode 'in' the Examiner is already considering its constancy. I did notice, however, that there was a hypothesis that talked about Event_Array(i__loop__2__entry). It seemed to me that the hypothesis was somewhat related to my conclusion so as a guess I tried --# assert Event_Array(I).Description_Size <= Description'Length and --# I = I% and --# (J - 1) < Description'Length; That worked! However, I'm still trying to understand the general principle that can guide me in these situations. I feel like I have to resort to semi-random attempts until I stumble into something that works. Anyway, thanks for your hint. Peter