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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c80e6f742e73478f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!r27g2000yqn.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ensuring postconditions in the face of exceptions Date: Mon, 15 Mar 2010 01:54:35 -0700 (PDT) Organization: http://groups.google.com Message-ID: <22728d81-9ede-4128-ab47-eacec75f6954@r27g2000yqn.googlegroups.com> References: <820d96c0-5d67-4b8c-8c5b-811ca4f1127e@g26g2000yqn.googlegroups.com> <8990d686-f703-4e9c-91b7-32410289983d@g11g2000yqe.googlegroups.com> <87ljdv56gy.fsf@ludovic-brenta.org> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1268643276 15148 127.0.0.1 (15 Mar 2010 08:54:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 15 Mar 2010 08:54:36 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r27g2000yqn.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:10538 Date: 2010-03-15T01:54:35-07:00 List-Id: Robert A Duff wrote on comp.lang.ada: > Ludovic Brenta writes: > > That's an interesting suggestion but we've patched the run-time library > > so that it dumps core on every exception;... > > Then how can it ever get to the "when others" in Refresh? > Or do you mean it dumps core, and then the program continues > on past the point of the bug (propagates the exception, > handles it, etc)? Yes, that is correct. > Is "dirty" a property of the object being visited? > If so, would it make sense to make it a component > of that object, and make sure that is passed by > reference (either by explicitly passing a pointer, > or by making the type limited or tagged)? No, Dirty is not a property of the object; the type T is used in several places, only some of which (a one-line cache, essentially) has a Dirty property. > By the way, I think it makes perfect sense to have > different postconditions for normal return, and for > each exception that might be raised. I agree; this generalizes my question even more. -- Ludovic Brenta.