Re: is Vax addressing sane today

Liste des GroupesRevenir à c arch 
Sujet : Re: is Vax addressing sane today
De : niklas.holsti (at) *nospam* tidorum.invalid (Niklas Holsti)
Groupes : comp.arch
Date : 25. Sep 2024, 20:12:50
Autres entêtes
Organisation : Tidorum Ltd
Message-ID : <llj252FdccuU1@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Mozilla Thunderbird
On 2024-09-25 20:30, MitchAlsup1 wrote:
On Wed, 25 Sep 2024 17:07:45 +0000, Michael S wrote:
 
On Wed, 25 Sep 2024 09:54:17 -0700
Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
>
On 9/10/2024 1:13 AM, Niklas Holsti wrote:
>
In the Ada case, the ability to declare array types with
programmer- chosen index types with bounded range, such as
range-bounded integers or enumerations, means that the compiler can
avoid indexing checks when the (sub)type of the index is known at
compile time to fit within the index range of the array.
>
I have always liked the idea of variable ranges able to be specified
in the language.  Besides the advantages you mentioned, it provides
more human "comprehensibility" (if the ranges are reasonably named)
i.e. better internal documentation, and it makes responding to
specification changes required later in the program life cycle easier
and less error prone, i.e. if the range has to change, you change it
in one place and don't risk missing making the change in some obscure
part of the program you forgot about.
>
>
>
The problem here is that arrays with fixed bounds were common when
Ada was conceived back in the mid 1970s. On general-purpose (as opposed
to embedded) computers they were already much rarer when Ada was shipped
in 1983. By late 1990s arrays with fixed bounds were rare exception
rather than rule.
 It sounds like variable ranges (array indexes) would be becoming more
common, also.
 Where "variable range" is a variable that is defined to have a
specified range, but from run to run the upper and lower bounds
can be modified without re-compilation.
Ada subtypes can do that, but the underlying type, set at compile time, for example the standard Integer type, will put an upper bound on the range of the subtype. The number of bits in the numbers cannot change without recompilation.
Michael S says that arrays with variable bounds are becoming more common. I assume he means indexable containers, often called vectors. Ada has several such containers in the standard library, all defined as generic in the index subtype, which means that the compiler can check that the type of a vector index is correct.
If a vector is allocated (sized) with a certain (dynamically defined) length, instead of growing element by element, and if that length matches the (dynamically defined) range of the index subtype, the same static checking methods/proofs can be applied as for traditional arrays of fixed size. I think that the current tools don't do that for vector containers by default, but I beliveve they can be persuaded to do it by writing the corresponding preconditions for the indexing operations.

Date Sujet#  Auteur
5 Sep 24 * is Vax adressing sane today336Brett
5 Sep 24 +* Re: is Vax adressing sane today324John Dallman
6 Sep 24 i+- Re: is Vax adressing sane today1Lawrence D'Oliveiro
6 Sep 24 i`* Re: is Vax adressing sane today322Anton Ertl
6 Sep 24 i +- Re: is Vax adressing sane today1Lawrence D'Oliveiro
6 Sep 24 i +* Re: is Vax adressing sane today5MitchAlsup1
7 Sep 24 i i`* Re: is Vax adressing sane today4Anton Ertl
7 Sep 24 i i `* Re: is Vax adressing sane today3Anton Ertl
7 Sep 24 i i  `* Re: is Vax addressing sane today2John Dallman
7 Sep 24 i i   `- Re: is Vax addressing sane today1Anton Ertl
7 Sep 24 i +* Re: is Vax adressing sane today313John Levine
8 Sep 24 i i`* Re: is Vax adressing sane today312Anton Ertl
8 Sep 24 i i +* Re: is Vax adressing sane today304MitchAlsup1
8 Sep 24 i i i`* Re: is Vax addressing sane today303Lawrence D'Oliveiro
9 Sep 24 i i i +* Re: is Vax addressing sane today231MitchAlsup1
9 Sep 24 i i i i`* Re: is Vax addressing sane today230Brett
9 Sep 24 i i i i +* Re: is Vax addressing sane today7MitchAlsup1
10 Sep 24 i i i i i`* Re: is Vax addressing sane today6Niklas Holsti
11 Sep 24 i i i i i +- Re: is Vax addressing sane today1Lawrence D'Oliveiro
25 Sep 24 i i i i i `* Re: is Vax addressing sane today4Stephen Fuld
25 Sep 24 i i i i i  `* Re: is Vax addressing sane today3Michael S
25 Sep 24 i i i i i   `* Re: is Vax addressing sane today2MitchAlsup1
25 Sep 24 i i i i i    `- Re: is Vax addressing sane today1Niklas Holsti
10 Sep 24 i i i i `* Re: is Vax addressing sane today222Anton Ertl
10 Sep 24 i i i i  +* Re: is Vax addressing sane today4Michael S
10 Sep 24 i i i i  i`* Re: is Vax addressing sane today3Anton Ertl
10 Sep 24 i i i i  i +- Re: is Vax addressing sane today1Niklas Holsti
11 Sep 24 i i i i  i `- Re: is Vax addressing sane today1Michael S
11 Sep 24 i i i i  +* Re: is Vax addressing sane today7Lawrence D'Oliveiro
11 Sep 24 i i i i  i`* Re: is Vax addressing sane today6Michael S
11 Sep 24 i i i i  i `* Re: is Vax addressing sane today5David Brown
11 Sep 24 i i i i  i  +* Re: is Vax addressing sane today2Thomas Koenig
11 Sep 24 i i i i  i  i`- Re: is Vax addressing sane today1David Brown
11 Sep 24 i i i i  i  `* Re: is Vax addressing sane today2David Schultz
13 Sep 24 i i i i  i   `- Re: is Vax addressing sane today1David Brown
11 Sep 24 i i i i  +* Re: is Vax addressing sane today5John Levine
11 Sep 24 i i i i  i`* Re: is Vax addressing sane today4Thomas Koenig
11 Sep 24 i i i i  i +* Re: is Vax addressing sane today2Anton Ertl
11 Sep 24 i i i i  i i`- Re: is Vax addressing sane today1jseigh
11 Sep 24 i i i i  i `- Re: is Vax addressing sane today1John Levine
20 Sep 24 i i i i  `* Re: is Vax addressing sane today205Kent Dickey
21 Sep 24 i i i i   +* Re: is Vax addressing sane today4MitchAlsup1
21 Sep 24 i i i i   i`* Re: is Vax addressing sane today3Lawrence D'Oliveiro
21 Sep 24 i i i i   i `* Re: is Vax addressing sane today2MitchAlsup1
21 Sep 24 i i i i   i  `- Re: is Vax addressing sane today1Lawrence D'Oliveiro
21 Sep 24 i i i i   +* Re: is Vax addressing sane today4Lawrence D'Oliveiro
21 Sep 24 i i i i   i`* Re: is Vax addressing sane today3MitchAlsup1
21 Sep 24 i i i i   i +- Re: is Vax addressing sane today1Niklas Holsti
21 Sep 24 i i i i   i `- Re: is Vax addressing sane today1Lawrence D'Oliveiro
21 Sep 24 i i i i   +* Re: is Vax addressing sane today30MitchAlsup1
22 Sep 24 i i i i   i+* Re: except what, is Vax addressing sane today18John Levine
22 Sep 24 i i i i   ii+- Re: except what, is Vax addressing sane today1Michael S
22 Sep 24 i i i i   ii+* Re: except what, is Vax addressing sane today8Lawrence D'Oliveiro
22 Sep 24 i i i i   iii`* Re: except what, is Vax addressing sane today7Chris M. Thomasson
22 Sep 24 i i i i   iii `* Re: except what, is Vax addressing sane today6MitchAlsup1
22 Sep 24 i i i i   iii  +* Re: except what, is Vax addressing sane today2Lawrence D'Oliveiro
22 Sep 24 i i i i   iii  i`- Re: except what, is Vax addressing sane today1MitchAlsup1
22 Sep 24 i i i i   iii  +- Re: except what, is Vax addressing sane today1Chris M. Thomasson
22 Sep 24 i i i i   iii  `* Re: except what, is Vax addressing sane today2John Dallman
22 Sep 24 i i i i   iii   `- Re: except what, is Vax addressing sane today1MitchAlsup1
22 Sep 24 i i i i   ii+* Re: except what, is Vax addressing sane today5Terje Mathisen
24 Sep 24 i i i i   iii`* Re: except what, is Vax addressing sane today4Lawrence D'Oliveiro
24 Sep 24 i i i i   iii `* Re: except what, is Vax addressing sane today3Chris M. Thomasson
24 Sep 24 i i i i   iii  `* Re: except what, is Vax addressing sane today2MitchAlsup1
16 Oct 24 i i i i   iii   `- Re: except what, is Vax addressing sane today1Chris M. Thomasson
22 Sep 24 i i i i   ii`* Re: except what, is Vax addressing sane today3Lars Poulsen
24 Sep 24 i i i i   ii `* Re: except what, is Vax addressing sane today2Lawrence D'Oliveiro
24 Sep 24 i i i i   ii  `- Re: except what, is Vax addressing sane today1Michael S
22 Sep 24 i i i i   i+* Re: is Vax addressing sane today7Lawrence D'Oliveiro
22 Sep 24 i i i i   ii`* Re: is Vax addressing sane today6MitchAlsup1
22 Sep 24 i i i i   ii +* Re: is Vax addressing sane today3Lawrence D'Oliveiro
22 Sep 24 i i i i   ii i`* Re: is Vax addressing sane today2MitchAlsup1
22 Sep 24 i i i i   ii i `- Re: is Vax addressing sane today1Lawrence D'Oliveiro
22 Sep 24 i i i i   ii `* Re: is Vax addressing sane today2Anton Ertl
24 Sep 24 i i i i   ii  `- Re: is Vax addressing sane today1MitchAlsup1
24 Sep 24 i i i i   i+* Re: is Vax addressing sane today2Stefan Monnier
24 Sep 24 i i i i   ii`- Re: is Vax addressing sane today1MitchAlsup1
25 Sep 24 i i i i   i+- Re: is Vax addressing sane today1MitchAlsup1
12 Oct 24 i i i i   i`- Re: is Vax addressing sane today1Anton Ertl
22 Sep 24 i i i i   +* Re: is Vax addressing sane today4Thomas Koenig
24 Sep 24 i i i i   i`* Re: is Vax addressing sane today3Kent Dickey
24 Sep 24 i i i i   i +- Re: is Vax addressing sane today1Bill Findlay
24 Sep 24 i i i i   i `- Re: is Vax addressing sane today1Thomas Koenig
23 Sep 24 i i i i   +- Re: is Vax addressing sane today1Stefan Monnier
23 Sep 24 i i i i   `* Re: is Vax addressing sane today161Kent Dickey
24 Sep 24 i i i i    +* Re: is Vax addressing sane today11MitchAlsup1
24 Sep 24 i i i i    i+- Re: is Vax addressing sane today1Lawrence D'Oliveiro
24 Sep 24 i i i i    i`* Re: is Vax addressing sane today9Terje Mathisen
24 Sep 24 i i i i    i +* Re: is Vax addressing sane today4Michael S
24 Sep 24 i i i i    i i`* Re: is Vax addressing sane today3Terje Mathisen
24 Sep 24 i i i i    i i `* Re: is Vax addressing sane today2Michael S
24 Sep 24 i i i i    i i  `- Re: is Vax addressing sane today1MitchAlsup1
24 Sep 24 i i i i    i +* Re: is Vax addressing sane today3Stephen Fuld
24 Sep 24 i i i i    i i`* Re: is Vax addressing sane today2MitchAlsup1
25 Sep 24 i i i i    i i `- Re: is Vax addressing sane today1Stephen Fuld
12 Oct 24 i i i i    i `- Re: is Vax addressing sane today1Anton Ertl
24 Sep 24 i i i i    +* Re: is Vax addressing sane today3Terje Mathisen
29 Sep 24 i i i i    i+- Re: is Vax addressing sane today1Michael S
7 Oct 24 i i i i    i`- Re: is Vax addressing sane today1Kent Dickey
25 Sep 24 i i i i    +* Re: is Vax addressing sane today133MitchAlsup1
26 Sep 24 i i i i    i+- Re: is Vax addressing sane today1MitchAlsup1
28 Sep 24 i i i i    i`* Re: is Vax addressing sane today131Lawrence D'Oliveiro
28 Sep 24 i i i i    +* Re: is Vax addressing sane today3George Neuner
7 Oct 24 i i i i    +* Re: is Vax addressing sane today8Kent Dickey
12 Oct 24 i i i i    `* Re: is Vax addressing sane today2Anton Ertl
9 Sep 24 i i i `* Re: is Vax addressing sane today71Anton Ertl
8 Sep 24 i i `* Re: is Vax adressing sane today7Brett
8 Sep 24 i `* Re: is Vax adressing sane today2MitchAlsup1
6 Sep 24 +* Re: is Vax adressing sane today2MitchAlsup1
6 Sep 24 +- Re: is Vax adressing sane today1Lawrence D'Oliveiro
6 Sep 24 `* Re: is Vax adressing sane today8Anton Ertl

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal