comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.de>
Subject: Re: Surprise in array concatenation
Date: Tue, 06 Sep 2005 17:51:11 +0200
Date: 2005-09-06T17:50:20+02:00	[thread overview]
Message-ID: <431dbabc$0$24153$9b4e6d93@newsread4.arcor-online.net> (raw)
In-Reply-To: <r1ee1f4dot6y$.8cu9l7ltzuoo$.dlg@40tude.net>

Dmitry A. Kazakov wrote:
> On Tue, 06 Sep 2005 13:52:53 +0200, Georg Bauhaus wrote:
> 
> 
>>If the world is logical, as you claim, then our sentences
>>cannot be illogical, thus our sentences must be proper
>>propositions, thus decidable.
> 
> 
> OK, see mathematical type theory (starting for Russel & Whitehead)

(And hope to see what? There is no way out, we can only agree
on something. Mathematics declares the swamp away
into which it is built, and says so. But there are swamps in the
problem domain.)


> The violation is in inability to construct empty arrays and ranges for some
> types.

Many kinds of structured data cannot be constructed
from Ada's types because of Ada's rules. How does this violate Ada's
contracts? A contract is not necessarily simple, nor without deliberately
chosen limitations.


> That becomes funny. What is a "finite" value? Is 1/3 finite? What about
> 0.1? (:-))

Earlier I said, forget about real numbers (from mathematics) in real
computers. 1/3 is indeed an example in binary computers: An interval
representing two real numbers close to 1/3 is not 1/3, and you cannot
hope to be computing using real numbers using the facilities of a
real computing machine. That is because almost all reals cannot be
represented in a finite computer. The problem cannot in general be solved
by using intervals. For example, try to approximate 1/3,
using the analog of my fly-hits-windshield example. That is,
represent all numbers required for such a computation, and compare them.


> LOL! Any program represents anything symbolically.

No, an executing program has an interpretation.
This makes "representing" have a meaning.

An explosion (triggered by a signal coming through a cable plugged
into a computer outlet) is itself not a symbol that stands for something
else. Neither is The signal. You can have a bit pattern standing for the
explosing, thus a symbol. But a symbol is finite, and there can only
be finitely many in any computation in a real computer.


> Do you really believe
> that 1 is *the* 1? Did you see a label "made in Heaven" on it? (:-))

Type Positive starts at 1 and ends with Positive'Last.
Ignoring the literal 1 distraction for the moment, the phrase "counting
the value-elements in type Positive" has meaning. In real Ada programs,
the count is always finite. Here is a type of cardinality 1:

> type Infinite is (Infinity);

This is a finite type, obviously. For it's intended meaning as
fooling us into believing that a real computer could represent
infinite types, see my fly-windshield example.

Similarly, (the set of) universal integers can only be finite inside
the computer. If your program is to pick just any, not one particular
that happens to be small enough, the limit is the same.


>>>Presently the case A'Last < A'First is used to indicate that there
>>>is no bounds.
>>
>>That's wrong, in that it just indicates that A'Last < A'First yields
>>an empty range.
> 
> 
> The way how the operation ".." is defined on its operands has nothing to do
> with existence of bounds of the result.

The index values A'First etc. of an array always exist.
The elements might not exist.
This is consistent with how Ada is defined, AFAICT, and it is consistent
with the definitions in programming languages, and libraries.
It is also considered useful by many.


>>>It is a quite silly way to handle errors. Instead of an
>>>immediate response you return nonsensical values
>>
>>What nonsensical values are returned in text like "3 .. 1"?
> 
> 
> Nothing. 3 and 1 are literals. A'First and A'Last aren't.

What nonsensical values are returned in text like "A'First .. A'Last"
when A'First > A'Last? The fact that A'First doesn't always refer
to an element is not different from the fact that A'Length / 2
doesn't always refer to an element, even when the array isn't empty.
Of what use is the test A'Length = 0 in this case?




  reply	other threads:[~2005-09-06 15:51 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-01  3:16 Surprise in array concatenation Gene
2005-09-01  7:55 ` Dmitry A. Kazakov
2005-09-01  8:02   ` Florian Weimer
2005-09-01 11:48     ` Georg Bauhaus
2005-09-01 12:02       ` Lutz Donnerhacke
2005-09-01 13:01         ` Georg Bauhaus
2005-09-01 15:54       ` Florian Weimer
2005-09-01 16:09     ` Robert A Duff
2005-09-05  8:38       ` Jean-Pierre Rosen
2005-09-05 23:52         ` Robert A Duff
2005-09-06  9:03           ` Jean-Pierre Rosen
2005-09-07 17:57         ` adaworks
2005-09-07 20:01           ` Robert A Duff
2005-09-08  8:08             ` Jacob Sparre Andersen
2005-09-07 22:46           ` Jeffrey Carter
2005-09-08  4:43             ` Simon Wright
2005-09-08 10:36               ` Georg Bauhaus
2005-09-08 13:47                 ` Ed Falis
2005-09-08 17:03                   ` Pascal Obry
2005-09-08 16:45               ` Jeffrey Carter
2005-09-08 19:37                 ` Simon Wright
2005-09-08  6:32             ` adaworks
2005-09-08  9:09               ` Jean-Pierre Rosen
2005-09-08 16:56               ` Jeffrey Carter
2005-09-09 14:04                 ` Bob Spooner
2005-09-09 16:17                 ` adaworks
2005-09-23 23:04               ` Randy Brukardt
2005-09-14  8:57           ` Ole-Hjalmar Kristensen
2005-09-23 23:09           ` Randy Brukardt
2005-09-24 10:49             ` Larry Kilgallen
2005-09-24 20:27             ` Lurker
2005-09-25  0:20             ` Robert A Duff
2005-09-25 17:05             ` adaworks
2005-09-01 11:42   ` Georg Bauhaus
2005-09-01 13:59     ` Dmitry A. Kazakov
2005-09-01 15:36       ` Georg Bauhaus
2005-09-01 18:34         ` Dmitry A. Kazakov
2005-09-02 10:43           ` Georg Bauhaus
2005-09-02 13:11             ` Dmitry A. Kazakov
2005-09-02 14:23               ` Georg Bauhaus
2005-09-02 19:48                 ` Dmitry A. Kazakov
2005-09-02 17:21           ` Björn Persson
2005-09-01 16:04   ` Robert A Duff
2005-09-01 18:06     ` Dmitry A. Kazakov
2005-09-02 10:42       ` Georg Bauhaus
2005-09-02 13:20         ` Dmitry A. Kazakov
2005-09-02 14:14           ` Georg Bauhaus
2005-09-02 19:48             ` Dmitry A. Kazakov
2005-09-03 20:01               ` Georg Bauhaus
2005-09-04 10:13                 ` Dmitry A. Kazakov
2005-09-05 13:22                   ` Georg Bauhaus
2005-09-05 15:50                     ` Dmitry A. Kazakov
2005-09-05 18:20                       ` Georg Bauhaus
2005-09-05 18:31                         ` Georg Bauhaus
2005-09-06  8:20                         ` Dmitry A. Kazakov
2005-09-06 11:52                           ` Georg Bauhaus
2005-09-06 13:46                             ` Dmitry A. Kazakov
2005-09-06 15:51                               ` Georg Bauhaus [this message]
2005-09-06 21:32                                 ` Robert A Duff
2005-09-07  9:08                                 ` Dmitry A. Kazakov
2005-09-07 18:20                                   ` Georg Bauhaus
2005-09-07 19:07                                     ` Georg Bauhaus
2005-09-07 21:23                                     ` Dmitry A. Kazakov
2005-09-08 10:27                                       ` Georg Bauhaus
2005-09-08 11:39                                         ` Georg Bauhaus
2005-09-08 13:44                                         ` Dmitry A. Kazakov
2005-09-08 18:18                                           ` Georg Bauhaus
2005-09-09 10:06                                             ` Dmitry A. Kazakov
2005-09-09 12:26                                               ` Georg Bauhaus
2005-09-09 12:29                                               ` Georg Bauhaus
2005-09-01  8:48 ` Jean-Pierre Rosen
2005-09-01 15:57 ` Robert A Duff
2005-09-01 21:42   ` Gene
2005-09-01 22:56     ` tmoran
2005-09-05 15:53       ` Gene
2005-09-05 17:47         ` jimmaureenrogers
2005-09-05 22:13           ` Robert A Duff
2005-09-06  8:24             ` Dmitry A. Kazakov
2005-09-05 19:22         ` Jeffrey R. Carter
2005-09-05 21:54           ` Robert A Duff
2005-09-05 22:50             ` Larry Kilgallen
2005-09-05 23:46               ` Robert A Duff
2005-09-12  3:59                 ` Dave Thompson
2005-09-06 16:02             ` Jeffrey Carter
2005-09-06 21:00               ` Robert A Duff
2005-09-06  5:38         ` Pascal Obry
2005-09-05 21:48       ` Robert A Duff
2005-09-06  5:25         ` tmoran
2005-09-06 14:58           ` Robert A Duff
2005-09-06  9:26         ` Georg Bauhaus
2005-09-06 15:00           ` Robert A Duff
2005-09-07 11:02             ` Thierry Pirot
2005-09-07 20:09               ` Robert A Duff
2005-09-06 13:22         ` Bob Spooner
2005-09-06 15:30           ` Robert A Duff
2005-09-06 16:12             ` Jeffrey Carter
2005-09-06 21:21               ` Robert A Duff
2005-09-02 20:19     ` Jeffrey R. Carter
2005-09-03 12:51     ` Dr. Adrian Wrigley
2005-09-03 14:08       ` Jacob Sparre Andersen
2005-09-05  8:34         ` Jean-Pierre Rosen
2005-09-05  9:32           ` Arrays indexed by fixed point types (Was: Surprise in array concatenation) Jacob Sparre Andersen
2005-09-05 11:07             ` Jean-Pierre Rosen
2005-09-05 15:12               ` Dr. Adrian Wrigley
2005-09-05 12:14             ` Dmitry A. Kazakov
2005-09-05 13:07               ` Jacob Sparre Andersen
2005-09-05 15:10                 ` Dmitry A. Kazakov
2005-09-05 11:29           ` Surprise in array concatenation Dr. Adrian Wrigley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox