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,b78c363353551702 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.196.232 with SMTP id ip8mr19438397pbc.6.1340785428715; Wed, 27 Jun 2012 01:23:48 -0700 (PDT) Path: l9ni25062pbj.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!news.teledata-fn.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 27 Jun 2012 10:23:47 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: about the new Ada 2012 pre/post conditions References: <4fe59ea0$0$9502$9b4e6d93@newsspool1.arcor-online.net> <1mkp7fzlk1b0y.1ueinfjn48fcy$.dlg@40tude.net> <4fe72b6b$0$9504$9b4e6d93@newsspool1.arcor-online.net> <1bbvp3ghpjb5s.1go1s1qvcmagh$.dlg@40tude.net> <4fe76fad$0$9507$9b4e6d93@newsspool1.arcor-online.net> <1jt8vhzxfrv2i.eohce4d3rwx1$.dlg@40tude.net> <4fe83aaa$0$6624$9b4e6d93@newsspool2.arcor-online.net> <1pkfv0tiod3rn$.onx6dmaa3if9$.dlg@40tude.net> <1i1mp8xs3vtl2.1oc4m66qtfgzq.dlg@40tude.net> <4fe9bde5$0$6566$9b4e6d93@newsspool4.arcor-online.net> <4fe9e7c5$0$6567$9b4e6d93@newsspool4.arcor-online.net> In-Reply-To: Message-ID: <4feac313$0$9504$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 27 Jun 2012 10:23:47 CEST NNTP-Posting-Host: d781b607.newsspool1.arcor-online.net X-Trace: DXC=AHDHla>J<4ng`45cDR8l?oic==]BZ:afn4Fo<]lROoRankgeX?EC@@`>UoMUM1ISkoPCY\c7>ejVh?3SN[HL8gAiUH7IBnWBGJo X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-06-27T10:23:47+02:00 List-Id: On 26.06.12 21:43, Dmitry A. Kazakov wrote: >> is supposed to >> implement something that essentially agrees with Pre/Post. > > Sure. Anything that follows "then" in any if-statement implements something > in agreement with the condition tested by the statement. That is the nature > of if-statements. That's not what agreement of with Pre/Post should mean, actually. In a DbC-correct program, the following two bodies shall have essentially the same effect: A: begin if Pre (...) then Stmts; else raise Assertion_Failure; end; ... B: begin Stmts; ... When is supposed to implement something that essentially agrees with Pre/Post, this sameness is it. Regardless of checks being on or off, A and B should have the same effects, essentially. Immediate consequences: 1) Pre is not for testing validity of input to Stmts 2) A violation of Pre (i.e. = False) indicates a bug