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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.29.101 with SMTP id j5mr22653446obh.32.1419368985068; Tue, 23 Dec 2014 13:09:45 -0800 (PST) X-Received: by 10.140.101.12 with SMTP id t12mr53424qge.14.1419368985040; Tue, 23 Dec 2014 13:09:45 -0800 (PST) Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!h15no29290692igd.0!news-out.google.com!r1ni101qat.1!nntp.google.com!bm13no671867qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 23 Dec 2014 13:09:44 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.207.196.139; posting-account=ku4DIwoAAACRt0A2H-srh5aOk_YodLAH NNTP-Posting-Host: 86.207.196.139 References: <2430252d-52a1-4609-acef-684864e6ca0c@googlegroups.com> <0a718b39-ebd3-4ab5-912e-f1229679dacc@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9ee5e186-5aaa-4d07-9490-0f9fdbb5ca18@googlegroups.com> Subject: Re: {Pre,Post}conditions and side effects From: =?ISO-8859-1?Q?Jean_Fran=E7ois_Martinez?= Injection-Date: Tue, 23 Dec 2014 21:09:45 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.giganews.com comp.lang.ada:191512 Date: 2014-12-23T13:09:44-08:00 List-Id: On Tuesday, December 23, 2014 6:05:33 PM UTC+1, Robert A Duff wrote: >=20 > I don't agree with that. It sometimes makes sense for pre/post to > check values of global variables. Probably not often -- after all, > it's not often that you should have global variables in the first place. > But surely if the job of a procedure is to update some global, > it makes sense to have a postcondition ensuring that it did so > correctly. >=20 That was clumsy (I was in a hurry) wording of my part. Should have been "= a pre/postconsition/invariant" usually don't involve redoing the whole calc= ulation but just checking values of "data entities" both in the absolute an= d relativly to one another. Most of the tilme you don't write pre/postondi= tions/invariants involving (with functions cvalled) tens of thousands of pr= ogramming lines and gazillions of CPU cycles Jean-Fran=E7ois Martinez