09-125
To: J3
From: Malcolm Cohen
Subject: Spurious defined terms in clause 7.
Date: 2009 February 02
1. Introduction
---------------
The system for "defining" terms we used in previous versions of the
standard is not in accordance with the ISO guidelines, so we need to stop
using it. We have already introduced the ISO-compliant defined terms
subclause, and moved/copied many definitions into it. However, quite a lot
have not been revised. These should either
- be turned into normal text ("untermified")
or
- become proper defined terms.
This paper deals with the terms in clause 7.
2. Terms and what to do with them
---------------------------------
- expression: Normal Usage;
= untermify, index as definition.
- intrinsic operation: Obvious Usage, Variant of "intrinsic";
= untermify, index all of 7.1.5 and its subclauses as the definition.
- intrinsic unary operation: Obvious, Completely Unused;
= untermify. The defining sentence is otherwise useful so leave it.
- intrinsic binary operation: Obvious, Almost Unused;
= untermify. The defining sentence is otherwise useful so leave it.
- numeric intrinsic operation: Obvious, Only Used in Clause 7;
= untermify, do not index.
- numeric intrinsic operator: Ditto;
= untermify, do not index.
- character intrinsic operation: Ditto;
= untermify, do not index.
- character intrinsic operator: Ditto;
= untermify, do not index.
- logical intrinsic operation: Ditto;
= untermify, do not index.
- logical intrinsic operator: Ditto;
= untermify, do not index.
- relational intrinsic operation: Sigh;
clause 13 uses this, almost spuriously, for character max et al.
This does not need to be a defined term - "intrinsic" already *is* a
defined term, and the rest is just normal English.
= untermify, do not index.
- numeric relational intrinsic operation: Obvious, Only Used in Clause 7;
= untermify, do not index.
- character relational intrinsic operation: Obvious, Only Used in c07;
= untermify, do not index.
- defined unary operation: Obvious, Hardly Used, Variant of Existing Term;
= untermify, do not index, consider deleting.
- defined binary operation: Ditto;
= untermify, do not index, consider deleting.
- extension operation: Not Used Except For Witter;
= untermify, do not index, reword or delete.
- extension operator: Totally 100% Completely Unused In Any Way;
= delete definition.
- specification expression: Special Term;
= termify, index as definition.
- restricted expression: Only Used Once;
= untermify, index as definition.
- specification inquiry: Limited Use, Mostly Internal to Spec Expr;
= untermify, index as definition.
- specification function: Ditto;
= untermify, index as definition.
- initialization expression: Special Term;
= termify. Hmm, this term basically satisfies the restrictions we used
to have for "constant expression", so how about renaming it?
- intrinsic assignment statement: It's a Statement;
= untermify, index as statement defn.
- numeric intrinsic assignment statement: Obvious, Only Used Once.
= why do we even have this at all? Just put the definition in the place
where it is used. Or at least untermify.
- character intrinsic assignment statement: Ditto.
- logical intrinsic assignment statement: Ditto.
- derived-type intrinsic assignment statement: Obvious, Hardly Used;
= for the normative use, just use the definition instead.
= and delete the definition.
- array intrinsic assignment statement: Used Once In A Note;
= just delete the definition.
- host instance: Special Term;
= termify, index as definition.
- masked array assignment: Special Term, Used.
= termify, index as definition.
- active combination: Only Used in 7.2.4.2 Except Once in 8.1.7.6.2;
= untermify, do not index, insert cross-reference in 8.1.7.6.2.
3. Other glitches
-----------------
[52:13] imposes a requirement (on the processor) for "relational
operations". Obviously it means "intrinsic".
[142:6] Seems to imply that // when not intrinsic requires its operands to
have the same kind type parameter. That's just nonsense, we should
reword it to fix it.
In c07, the syntax for FORALL uses for something that is not a
subscript, and for something that is not a stride. That is just
totally unacceptable.
[467:27] says what a blank padding character is used for. Only it's wrong,
seeing as how it misses out what some might consider *the* major
use (and the one all others flow from): assignment. The fix is
easy, just omit the witter about what it's used for. Do not just
add assignment, as there are others I also thought of.
4. Weird "Feature"
------------------
The has a . This is needed in FORALL
(well ok, actually it's not, but it is useful I guess) because you cannot
nest an IF construct in a FORALL, but it is totally unnecessary in the DO
CONCURRENT construct; all it does is complicate the syntax and description;
plus confuse the user who might wonder "why can I do that?": he is not
going to appreciate the fact that we saved a few lines of BNF in the
standard by leaving this in.
Is this really necessary/useful/harmless?
Should we not consider removing it?
Here are the edits to remove:
[178:18+] Before R827, insert
"C816a (R826) The in a CONCURRENT shall
not have a ."
[180:25] Delete "active".
5. Edits to 09-007
------------------
OPTIONAL:
[global] "initialization expression" -> "constant expression".
[alphabetically] Define term
"\term{host instance}
of a procedure pointer associated with an internal procedure, instance
of the host procedure that supplies the host environment of the internal
procedure (\ref{D7:Procedure pointer assignment})
\term{initialization expression}
expression satisfying the requirements specified in
\ref{D7:Initialization expression}, thus ensuring that its value is
constant
\term{masked array assignment}
assignment statement in a WHERE statement or WHERE construct
(\ref{D7:Masked array assignment -- WHERE})
\term{specification expression}
expression satisfying the requirements specified in
\ref{D7:Specification expression}, thus being suitable for use in
specifications"
[throughout] Hyperlink the above terms as appropriate.
[52:13(4.4.3p3)] Before "relational" insert "intrinsic".
{We are not in the business of regulating user-defined relationals.}
[135:4(7.1.1p1)] Unembolden "expression", index as definition.
[141:16(7.1.5.1,title)] "Definitions"->
"Intrinsic Operation Classification".
{These aren't definitions, we are just listing what all the intrinsic
operations are. It would be better to have this text integrated into
the subclauses that actually hand the individual cases, but...}
[141:17(7.1.5.1p1)] Unembolden "intrinsic operation".
Index all of 7.1.5 "Intrinsic operations" as the defn.
[141:17(7.1.5.1p1)]
Change "an intrinsic unary operation or an intrinsic binary operation"->"
To "a unary or binary operation".
{Having established the universe of discourse as being intrinsic
operations, we don't have to continue repeating ourselves.}
[141:17-18(7.1.5.1p1)] Unembolden "intrinsic unary operation",
do not index.
[142:1(7.1.5.1p2)] Unembolden "intrinsic binary operation", do not index.
[142:3(7.1.5.1p3)] Unembolden "numeric intrinsic operation", do not index.
[142:4(7.1.5.1p3)] Unembolden "numeric intrinsic operator", do not index.
[142:5(7.1.5.1p4)] Unembolden "character intrinsic operation", no indexing.
[142:6(7.1.5.1p4)] ". The operands shall have" -> "with".
{Repair long-standing ambiguity.}
[142:6-7(7.1.5.1p4)] Unembolden "character intrinsic operator", no index.
[142:8(7.1.5.1p5)] Unembolden "logical intrinsic operation", do not index.
[142:9(7.1.5.1p5)] Unembolden "logical intrinsic operator", do not index.
[142:11(7.1.5.1p6)] Unembolden "relational intrinsic operator", no index.
[142:12(7.1.5.1p6)] Unembolden "relational intrinsic operation", no index.
[142:13(7.1.5.1p6)] Unembolden "numeric relational intrinsic operation",
do not index.
[142:14(7.1.5.1p6)] Unembolden "character relational intrinsic operation",
do not index.
[148:9(7.1.6.1p1)] "defined unary operation or a defined"->
"unary operation or a".
{We've already established the topic as "defined operation", we don't need
to continue repeating ourselves.}
[148:9-10(7.1.6.1p1)] Change "<>"
to "unary defined operation", do not index,
do hyperlink "defined operation".
[148:26(7.1.6.1p4)] Change "<>"
to "unary defined operation", do not index,
do hyperlink "defined operation".
[149:6-8(7.1.6.1p7)] Delete entire paragraph about extension ops.
[152:11(7.1.11p1)] Unembolden "specification expression", index as defn.
[152:17(7.1.11p2)] Unembolden "restricted expression", index as definition.
[153:1(7.1.11p4)] Unembolden "specification inquiry", index as definition.
[153:8(7.1.11p5)] Unembolden "specification function", index as definition.
[153:26(7.1.12p1)] Unembolden "initialization expression", index as defn.
[155:9(7.2.1.2p1)] Unembolden "intrinsic assignment statement",
index as statement.
[156:1-7(7.2.1.2p3-4)] Delete both paragraphs.
{These were only used once: simpler to have the definition condition in the
other place.}
[157:7-8(7.2.1.3p8)]After "For" change "a numeric" to "an",
after "intrinsic assignment statement"
insert "where the variable is of numeric type",
after ", the" delete "variable and",
after " may have"
change "different numeric types"
to "a different numeric type",
after "or kind type" singularise "parameters".
The end result being
"For an intrinsic assignment statement where the variable is of numeric
type, the may have a different numeric type or kind type
parameter, in which case ...".
{Note: hyperlinking of "numeric type".}
[159:1-2] Make similar changes to this paragraph.
[159:3-4] Make similar changes to this paragraph.
[159:11] Change "If the variable and have ... parameters" to
"For an intrinsic assignment statement where the variable is of type
character, if has a different kind type parameter".
{Missing qualification for that paragraph. This clause keeps jumping topic
so I don't think it's obvious enough to omit.}
[159:13(7.2.1.3p13)] "A derived-type intrinsic assignment"
-> "An intrinsic assignment where the variable is of derived type".
[162:7(7.2.2.4p2)] Unembolden "host instance", index as definition.
[163:3(7.2.3.1p1)] Unembolden "masked array assignment", index as defn.
[throughout 7.2.4]
Change "" to "",
Change "" to "",
Examine non-BNF versions, change if relevant.
[167:21(7.2.4.2.3p2)] Unembolden "active combination", do not index.
Delete "defined to be".
[180:25(8.1.7.6.2p3)] Before "active combinations",
"all of the" -> "every",
and singularise "combinations".
{We're supposed to state things in the singular when possible. It also
makes the sentence read better.}
[180:26(8.1.7.6.2p3)] Same sentence.
After "values" insert
"(\ref{D7:Evaluation of the mask expression})".
{I don't actually see why we even *ALLOW* the mask expression here.}
[467:27(A.2)] After "blank padding character for"
delete "intrinsic ... of",
After "nondefault character kind",
delete "and for generalized editing".
{Delete seriously-incomplete (thus incorrect) and unnecessary waffle.}
===END===