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.230.98 with SMTP id sx2mr9441949pbc.1.1335708231687; Sun, 29 Apr 2012 07:03:51 -0700 (PDT) Path: r9ni112213pbh.0!nntp.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Quantified expressions: no support for restriction predicates Date: Sun, 29 Apr 2012 10:03:50 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <22242340.4097.1335486547825.JavaMail.geo-discussion-forums@vbki8> <796413.773.1335612600942.JavaMail.geo-discussion-forums@vbai3> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1335708231 807 192.74.137.71 (29 Apr 2012 14:03:51 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 29 Apr 2012 14:03:51 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:V/6f25XnaWU9WBTeW0kHNfFAV0E= Content-Type: text/plain; charset=us-ascii Date: 2012-04-29T10:03:50-04:00 List-Id: phil.clayton@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 think "if P then Q", i.e. implicit "else true", is a really neat way > to provide implies. Me, too. I argued strongly for adding an "implies" operator, but I discovered that a lot of folks are confused by it, yet find (if P then Q) crystal clear. So I changed my mind. > Honestly, my motivation was to help those who were a little rusty on > their maths/logic! Sure. > 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? - Bob