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,7d83a6223f4f2443 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Run-time accessibility checks Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <68719e0e-af31-488a-b45c-f8db93fb70d2@v13g2000yqm.googlegroups.com> <877dccaf-67d2-47ba-951d-2546ab500f75@f3g2000yqf.googlegroups.com> Date: Sun, 7 Dec 2008 20:22:54 +0100 Message-ID: <1kiyj15u2qxm2.1hrf2alc7o6l0$.dlg@40tude.net> NNTP-Posting-Date: 07 Dec 2008 20:22:55 CET NNTP-Posting-Host: 3d350013.newsspool3.arcor-online.net X-Trace: DXC=Rije12g7bPiJ00P1S40fZgMcF=Q^Z^V3h4Fo<]lROoRa^YC2XCjHcbia_SBiAJnM8fDNcfSJ;bb[eIRnRBaCd On Sun, 7 Dec 2008 06:56:49 -0800 (PST), Ludovic Brenta wrote: > On Dec 7, 9:44 am, "Dmitry A. Kazakov" > wrote: >> On Sat, 6 Dec 2008 09:10:49 -0800 (PST), Ludovic Brenta wrote: >>> Dmitry A. Kazakov wrote: >>>> It is absolutely unacceptable to me that a correct >>>> program might fail at run-time because of accessibility checks. >> >>> I differ here; to me, a program that fails an accessibility check at >>> run time is incorrect. >> >> Ah, I used to think this way too. But then I realized that this form of >> constraint is not a semantic one. Comparing to the constraint range 1..10, >> accessibility constraint is an implementation detail. It has no semantic >> meaning. When you assign a value outside the range that is semantically >> incorrect. When you assign a pointer that potentially might become >> dangling, that has no semantic meaning. The pointer is not yet dangling. >> The program correctness depends on whether it will become dangling. > > My definition of correctness is a bit more demanding. I want to be > *certain* that the pointer *cannot* become dangling, *ever*, > especially in the face of software maintenance where the program > changes. That's what accessibility checks give me, and I am grateful > for their existence and I will design my programs so as not to fail > accessibility checks. No, it is *less* demanding than mine. Mine is that the program is either correct or not, statically. This leaves no room for run-time checks on correctness. Consequently, if accessibility check fails at run-time then a correct program shall handle the corresponding exception. It does not add safety. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de