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,db88d0444fafe8eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Fri, 09 Sep 2005 14:26:36 +0200 From: Georg Bauhaus User-Agent: Debian Thunderbird 1.0.2 (X11/20050817) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Surprise in array concatenation References: <1125544603.561847.32140@g47g2000cwa.googlegroups.com> <43187a50$0$24162$9b4e6d93@newsread4.arcor-online.net> <11p5i525v2q5d$.17ayuwvqhazo1.dlg@40tude.net> <431a00cb$0$2113$9b4e6d93@newsread2.arcor-online.net> <9s72daxfzb4f.1k7noh1qr5qpg.dlg@40tude.net> <431c465d$0$24150$9b4e6d93@newsread4.arcor-online.net> <79fcfodixv3k$.1m7d28joczncs$.dlg@40tude.net> <431c8c35$0$2101$9b4e6d93@newsread2.arcor-online.net> <3ufj318nkubi.a5j4dbvaofhc.dlg@40tude.net> <431d82e3$0$24147$9b4e6d93@newsread4.arcor-online.net> <431dbabc$0$24153$9b4e6d93@newsread4.arcor-online.net> <1b8825x3b8wn3.24qm946raz3d$.dlg@40tude.net> <431f2f4f$0$2102$9b4e6d93@newsread2.arcor-online.net> <3sa7ilukre24.15c984skqvm9c$.dlg@40tude.net> <432011f0$0$24147$9b4e6d93@newsread4.arcor-online.net> <36f5y9ptjia3$.1onymsey119zw.dlg@40tude.net> <4320803b$0$24163$9b4e6d93@newsread4.arcor-online.net> <1b3z0hyoyma05.ptmdp4uq8e3j$.dlg@40tude.net> In-Reply-To: <1b3z0hyoyma05.ptmdp4uq8e3j$.dlg@40tude.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <43217f42$0$2119$9b4e6d93@newsread2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 09 Sep 2005 14:25:39 MEST NNTP-Posting-Host: 16a66195.newsread2.arcor-online.net X-Trace: DXC=ZQR;M8DkD0bP8MgCCFiJ[lQ5U85hF6f;djW\KbG]kaMhQ>n?D9BSA]lO>?mB8dXb6`8JM^O\[iIdcU^XamkcKG?e X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:4551 Date: 2005-09-09T14:25:39+02:00 List-Id: Dmitry A. Kazakov wrote: >>>Believe me, convex sets (whether (1-t)a + tb belongs to the same set forall >>>0<=t<=1) > The index ranges need to be convex if you want to have your "length / 2". > The above is the definition of a convex set. In other words, you want the index types to include floating point numbers? > Ada was designed as a higher level programming. If you want an assembly > language, there are plenty of them... Higher, not high, in any current sense of the word. It didn't even have high level data structures of the times (APL, SETL, ...) It is only now going to have maps or sets, iterators, quantifier approximations, ... Certainly Ada's array are not like "assembly language arrays", but they share a lot. Even higher level data structures like STL or Ada.Containers, are built around a machine model. When I can't map Ada's arrays to computer storage, does Ada serve me in systems programming? No. >>I'm not mixing sets and elements, I'm pointing out that symbol manipulation >>and counting are sometimes different. > > > Care to show a difference? Yes. >>It's time for me to study Lewis Carrol's stories, to that I can >>legitimately refer to Humpty Dumpty. > > > It is always a good reading. Though any introductory book on modern algebra > could also help. Provided A'First > A'Last needs help. People seem to be o.K. using this idiom. If you don't see a way of merging this ">" with algebra, then perhaps you could present the well working idiom to mathematicians. Maybe they can find a theory around it that satisfies your mathematical needs. >>If there are 4 trees in a garden, there is really 1 tree in the >>garden, because of modulo 3. > > > You still missing the point, and still mixing apples and oranges. If there is one interpretation of bit pattern 01, and the interpretation says, 01 represents an infinite set in my problem domain, *and* I need not distinguish the elements of the set, then still this set is not yet considered as part of a computation. If it becomes part of a computation, there may be other bit patterns needed in the computation. When the problem is about an unforseeable number of bit patterns, then even though you can interpret single finite bit patterns to stand for infinite imaginations (sets), you cannot do this recursivly. That is, if the problem grows, and includes many more bit patterns, you could try to make yet another bit pattern stand for the many more bit patterns, provided you find one that isn't used yet. For example, intermediate results can be stored in a comprehensive bit pattern that reuses some bit sequences no longer needed. This process consumes variables. There is an end to the number of variables that can be used in any finite program (the last two words being a tautology anyway). Try to fill a hard disk with the average number of occurences of the digits 5 and 6 that occur in sequence in the decimal expansion of Pi. What is going to happen? It is similar with mathematical reals. Just try to implement the diagonalisation method. Turing machines have infinite tapes, desktop computers don't. And even with Turing machines there is infinity trouble. I guess you won't deny this? > As a follower of Plato, you should > address them to his philosophy. Plato has little to say about these issues, AFAICT. >>>The type of the >>>cardinal numbers in Ada is defined as Universal_Integer. >>>It is not the type of the elements in a set! >> >>Universal_Integer is subject to capacity constraints, > > > And what's the point? This or that way, but Universal_Integer is a type > different from one of array index. The point here is that you can't have the mathematical integers inside computers, just as you can't have the mathematical reals inside a computers. Some proofs wouldn't work because for example you can't algorithmically find a sufficiently large m_0 such that forall m > m_0, a property holds. This shows that a mathematical approach that ignores properties of computers is possibly impossible. (1) You need the mathematics of finite sets of discrete values, and R is not one of them. (2) You will then need to show that because something is more simple and easier seen as consistent with a smaller set of rules, it will also lead to better programs. I see that some algorithms can be made general when A'First > A'Last is permitted, and that some algorithms will need an additional if property(A'Length) then ... else ... end if; I don't see that the set of mathematical structures applicable to Ada array indexing must be restricted to those that you have mentioned in this thread.