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.107.135.22 with SMTP id j22mr22262455iod.117.1520629690383; Fri, 09 Mar 2018 13:08:10 -0800 (PST) X-Received: by 10.157.11.165 with SMTP id 34mr1589643oth.7.1520629690289; Fri, 09 Mar 2018 13:08:10 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!e10-v6no418915itf.0!news-out.google.com!a2-v6ni1149ite.0!nntp.google.com!r195no419637itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 9 Mar 2018 13:08:09 -0800 (PST) In-Reply-To: <8279f333-07ec-4477-a175-7c033b2424aa@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <8279f333-07ec-4477-a175-7c033b2424aa@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: quantified expression with empty array? From: Shark8 Injection-Date: Fri, 09 Mar 2018 21:08:10 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2239 X-Received-Body-CRC: 2405106873 Xref: reader02.eternal-september.org comp.lang.ada:50915 Date: 2018-03-09T13:08:09-08:00 List-Id: On Friday, March 9, 2018 at 10:15:12 AM UTC-7, Stephen Leake wrote: > I ran across this question recently: >=20 > If I have a quantified expression: >=20 > (for some Child of Children =3D> Predicate (Child)) >=20 > what is the value if Children'Length =3D 0? >=20 > ARM 2012 4.5.8 8/4, 9/4 talk about evaluating the predicates, but in this= case there are no predicates to evaluate. >=20 > I wrapped this piece of code in "if Children'Length =3D 0 then" to be saf= e. (FOR SOME ...) is exactly equivalent to a "THERE EXISTS" in logic, therefor= e if the domain for the =E2=88=83x is the null-set, then the evaluation is = False because the thing didn't exists. OTOH, the (FOR ALL ...) construct is exactly equivalent to the "FOR ALL" in= logic and all 0 objects of =E2=88=80x {NULL} satisfy that, the expression = evaluates to True. So just remember that FOR ALL and FOR SOME are, respectively, =E2=88=80 and= =E2=88=83.