(j3.2006) reverse section contiguous?

Malcolm Cohen malcolm
Mon Jan 9 19:35:53 EST 2012


>"An object is contiguous if it is ...
>
>    (6) a nonzero-sized array section (6.5.3) provided that ...
>
>       (c) the elements of the section, in array element order, are a subset of
>       the base object elements that are consecutive in array element order,"
>
>The elements of the section are  {A(10), A(9), A(8), ..., A(1)}  which, as a 
>set of elements, is a subset of {A(1), A(2), ..., A(10)}. (Perhaps "subset" is 
>a flawed word here.)

This reading is ignoring the first "in array element order".  You should not 
just ignore the words of the standard like that!

I agree that the wording could be better, but there is no plausible reading of 
this other than as a requirement on the ordering, and one that is not satisfied 
by the "backwards" sequence.  Seeing as how the discontiguous definition (which 
does not need to use the word "subset") also gives the "right" answer - i.e. the 
backwards section is definitively not contiguous - I see no need for an interp.

In particular, an interp that did not change any wording would be a complete 
waste of time and energy.

Let's just improve the wording in the next revision.  Preferably without using 
"subsequence" (if someone can miscomprehend the existing ordering requirement 
even given the discontiguous definition, they can miscomprehend "subsequence" 
even more).  Splitting the ordering and subsetting requirements into two list 
items is more verbose but probably the best thing to do.

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list