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.99.94.71 with SMTP id s68mr49695758pgb.129.1481653520304; Tue, 13 Dec 2016 10:25:20 -0800 (PST) X-Received: by 10.157.17.167 with SMTP id v36mr6413949otf.12.1481653520239; Tue, 13 Dec 2016 10:25:20 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!n6no6232365qtd.0!news-out.google.com!m27ni16982qtf.1!nntp.google.com!p16no6228340qta.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 13 Dec 2016 10:25:19 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.0.242.189; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 67.0.242.189 References: <47366b42-c0a3-41bf-a44a-5241c109d60f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1af458a8-cf5b-4dd7-824d-eed1ed5ffb21@googlegroups.com> Subject: Re: Ada 2012 Constraints (WRT an Ada IR) From: Shark8 Injection-Date: Tue, 13 Dec 2016 18:25:20 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:32782 Date: 2016-12-13T10:25:19-08:00 List-Id: On Tuesday, December 13, 2016 at 4:19:17 AM UTC-7, Dmitry A. Kazakov wrote: > On 13/12/2016 11:39, G.B. wrote: > > > > Pre doesn't have to be object language as has now been > > said and confirmed a number of times. > > Being a part of the body it does not belong to declarations. By that logic we shouldn't have something like: type Item is null record; -- Stub type Pointer is access Item; -- Access type subtype Handle is not null Pointer; -- Subtype excluding null Procedure Something(Object : Handle); -- Object can't be null. because we could instead say: Procedure Something(Object : Pointer) is begin if Object = Null then --... end; Or, really, any subtype. > >> It is an explicit contract. > > > > Can you make it a Boolean expression? > > That depends on the language in question. It is not an expression in Ada > and cannot be made one. But this works against your whole anti-pre, anti-post, anti-aspect argument... those *ARE* [generally] Ada Boolean expressions.