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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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.101.6.14 with SMTP id j14mr2238681ani.2.1321979011580; Tue, 22 Nov 2011 08:23:31 -0800 (PST) Path: lh20ni5832pbb.0!nntp.google.com!news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Generic-Package Elaboration Question / Possible GNAT Bug. Date: Tue, 22 Nov 2011 17:23:30 +0100 Organization: cbb software GmbH Message-ID: 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> <4ecbb96e$0$6581$9b4e6d93@newsspool3.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: ARmOcGB+2dBIwZUEYVS5Gg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news2.google.com comp.lang.ada:14520 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-11-22T17:23:30+01:00 List-Id: On Tue, 22 Nov 2011 16:02:06 +0100, Georg Bauhaus wrote: > 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)? I don't care about trade marks and definitions given by reference manuals... >> 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. This is not a model of design, this a description of some contract. The model of design is, for example, that components can be designed independently when contracts are stated upfront. > (b) A debugging ("design", "specification", bla-bla) aid leading > towards formally proven components where such proofs are possible. I cannot decipher this, sorry. > "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." An exception is a program state. It is not an inability. The behavior in an exceptional state is contracted, at least in Ada it is. > Without those dynamic checks, we wouldn't ever notice a failure? How would you notice a failure to notice? No need to repeat it again and again: dynamic checks of correctness are inconsistent, see the liar paradox et al. Dynamic check is a part of program, which determines the program's behavior. No more, no less. > Assuming, in this case, that there is still some amount of software > whose behavior is not known until it executes. The software which behavior is unknown shall never be executed. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de