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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,802ee425bbc3eba3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.40 with SMTP id qr8mr2255532pbc.0.1335724755661; Sun, 29 Apr 2012 11:39:15 -0700 (PDT) Path: r9ni112939pbh.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: phil.clayton@lineone.net Newsgroups: comp.lang.ada Subject: Re: Quantified expressions: no support for restriction predicates Date: Sun, 29 Apr 2012 11:37:19 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9912125.1780.1335724639338.JavaMail.geo-discussion-forums@ynee1> References: <22242340.4097.1335486547825.JavaMail.geo-discussion-forums@vbki8> <796413.773.1335612600942.JavaMail.geo-discussion-forums@vbai3> NNTP-Posting-Host: 2.27.127.98 Mime-Version: 1.0 X-Trace: posting.google.com 1335724755 15845 127.0.0.1 (29 Apr 2012 18:39:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 29 Apr 2012 18:39:15 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2.27.127.98; posting-account=v7gx3AoAAABfjb9m5b7l_Lt2KVEgQBIe User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-04-29T11:37:19-07:00 List-Id: On Sunday, April 29, 2012 3:03:50 PM UTC+1, Robert A Duff wrote: > phil.c...@lineone.net writes: > > > Drat. I knew about the parentheses. (Personally, I would have liked > > parentheses to be required only when there is a syntactic ambiguity. > > I suppose that is so often, you may as well have them all the time.) > > Note that you don't need "extra" parentheses. > You can say "F(for all ...)" instead of "F((for all ...))". I also knew that but didn't choose my words very well :) > > My thinking is that having a predicate to restrict the elements that > > one is quantifying over (just like a subtype predicate restricts the > > elements of a subtype) would avoid the need to work out the equivalent > > logical expression, which differs depending on the quantifier - a > > likely source of error. So, while more syntax would be needed, this > > should actually simplify quantification concepts. > > Well, if you are willing to give a name to the subtype, you > can put a Static_Predicate or Dynamic_Predicate aspect on it. > Does that help? Is that actually possible for a Dynamic_Predicate? Section 3.2.4 Subtype Predicates, para 27/3 says: The discrete_subtype_definition of a loop_parameter_specification shall not denote ... or any subtype to which Dynamic_Predicate specifications apply. Phil