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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,229ea0001655d6a2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!bolzen.all.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Generic Package Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1177539306.952515.222940@s33g2000prh.googlegroups.com> <1177601484.444701.171560@r35g2000prh.googlegroups.com> <9eejm6rqip.fsf@hod.lan.m-e-leypold.de> <19qllkvm6ut42$.1iqo74vjgmsrv$.dlg@40tude.net> <1177801611.10171.32.camel@localhost.localdomain> <1woad6hn9idy2$.6otnwphc1o0h$.dlg@40tude.net> <1177929029.6111.34.camel@localhost> <1177944533.13970.17.camel@localhost> <2aq08qbvw0ym$.1rquampzo7o53.dlg@40tude.net> <1177953892.13970.23.camel@localhost> Date: Mon, 30 Apr 2007 20:54:31 +0200 Message-ID: <1auhfsq1mbfpd.95my4gccu8sa$.dlg@40tude.net> NNTP-Posting-Date: 30 Apr 2007 20:54:09 CEST NNTP-Posting-Host: 18174fee.newsspool4.arcor-online.net X-Trace: DXC=IeUikaL2djO[kmHKHnaEnM4IUKLWV4`L8mA@PL X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:15427 Date: 2007-04-30T20:54:09+02:00 List-Id: On Mon, 30 Apr 2007 19:24:52 +0200, Georg Bauhaus wrote: > On Mon, 2007-04-30 at 18:29 +0200, Dmitry A. Kazakov wrote: > >>> "The foreach procedure operates as if the following body >>> were written >>> >>> procedure foreach(S: Set) is >>> C: Cursor; >>> begin >>> C := first(S); >> >> You forgot that first is not defined on Set, > > I was tempted to add > > C := first(S); -- where first picks any as defined for the > -- `first` operation on sets; gimmeacursor(S); > >> which is not well-ordered and >> thus does not have visible implementations of > > As I said, Iterate operates as if it were implemented the way shown. > I had intended to base the argument on your prior remark that we > can specify the preconditions on next etc. I claim that we can > give a meaningful definition of First, too, which is not given by > the usual meaning of First; we could call it Frumble if you like. But you could not provide *any* implementation of Frumble in the terms of the operations defined on Set. To build a sequence of elements of S, you need the well-ordering principle: let s1 be the least in S (well-ordering of S) S1 = S / {s1} let s2 be the least in S1 (well-ordering of S1) S2 = S1 / {s2} ... until sN such that SN-1 = {sN} Now { s1, s2, ..., sN } is an ordering of S. Here it is not "/" which makes problems, but "least," which is as good/bad as "any" or "Frumble." So giving it any name changes nothing. >> The set >> is declared unordered. > > Yes. An iterator will work without an externally visible order. = per magic > No, I only have to combine the semantics of foreach as specified > previously, ":=", "+", etc. Then I can show that I get what I > asked for. But the semantics you have presented relies on a well-ordering of the set, which is claimed to be unordered. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de