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,ea5071f634c2ea8b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.100.145.13 with SMTP id s13mr4046772and.3.1321974138401; Tue, 22 Nov 2011 07:02:18 -0800 (PST) Path: lh20ni5623pbb.0!nntp.google.com!news2.google.com!goblin3!goblin.stu.neva.ru!news.tu-darmstadt.de!news.belwue.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 22 Nov 2011 16:02:06 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Generic-Package Elaboration Question / Possible GNAT Bug. References: <7bf9bc32-850a-40c6-9ae2-5254fe220533@f29g2000yqa.googlegroups.com> <4295dc09-43de-4557-a095-fc108359f27f@y42g2000yqh.googlegroups.com> <3snehoqgs8ia$.1nobjem6g6hx6$.dlg@40tude.net> <128rdz2581345$.c4td19l7qp9z$.dlg@40tude.net> <16ipwvpdavifr$.17bxf7if7f6kh$.dlg@40tude.net> <4ecb78b1$0$6643$9b4e6d93@newsspool2.arcor-online.net> <1iofgbqznsviu$.phvidtvxlyj4$.dlg@40tude.net> In-Reply-To: <1iofgbqznsviu$.phvidtvxlyj4$.dlg@40tude.net> Message-ID: <4ecbb96e$0$6581$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 22 Nov 2011 16:02:06 CET NNTP-Posting-Host: de24b213.newsspool3.arcor-online.net X-Trace: DXC=R>WHZLh>_cHTX3j]MMmf3i_]djT X-Complaints-To: usenet-abuse@arcor.de Xref: news2.google.com comp.lang.ada:14517 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2011-11-22T16:02:06+01:00 List-Id: On 22.11.11 15:32, Dmitry A. Kazakov wrote: > On Tue, 22 Nov 2011 11:25:59 +0100, Georg Bauhaus wrote: > >> On 22.11.11 09:29, Dmitry A. Kazakov wrote: >>> I think that a solution is not in adding new sources of >>> exceptions, but by making exceptions contracted (using conditional >>> contracts, e.g. "I don't raise, if you don't", "I don't raise if there is N >>> units of memory free" etc). >> >> I think that, with the exception of compiler-determines-all-of-this, >> the above is a well known characterization of DbC. > > Not really. DbC is about upfront formalized requirements. Not sure, are you speaking about DbC (TM)? > For contracted exceptions more important is how contracts influence the > implementation. The idea is that in order to be legal the program must be > written so that the contract would be provable. If not provable, either the > program or the contract has to be changed. That is opposite to dynamic > checks, you don't need to check for non-contracted exceptions. DbC (TM) is meant to be (a) A model of design: client-ensures-proconditions and then supplier-ensures-postconditions, so as to keep certain properties of the object invariant. (b) A debugging ("design", "specification", bla-bla) aid leading towards formally proven components where such proofs are possible. "An exception is the element's inability to fulfil its contract, for any reason: a hardware failure has occurred, a called routine has failed, a software bug makes it impossible to satisfy the contract." Meaningful responses: retrying after adjustments, organized panic, false alarm.[1] Without those dynamic checks, we wouldn't ever notice a failure? Assuming, in this case, that there is still some amount of software whose behavior is not known until it executes. __ [1] http://www.eiffel.com/developers/design_by_contract_in_detail.html