CVS difference for ai12s/ai12-0317-1.txt

Differences between 1.5 and version 1.6
Log of other versions for file ai12s/ai12-0317-1.txt

--- ai12s/ai12-0317-1.txt	2019/02/26 01:44:31	1.5
+++ ai12s/ai12-0317-1.txt	2019/03/01 06:30:14	1.6
@@ -1,4 +1,4 @@
-!standard 3.10.2(16.1/5)                                 19-02-25  AI12-0317-1/05
+!standard 3.10.2(16.1/5)                                 19-02-26  AI12-0317-1/06
 !standard 4.3.2(5.1/5)
 !standard 4.3.2(5.2/5)
 !standard 4.3.2(5.3/5)
@@ -9,6 +9,8 @@
 !standard 6.2(10/5)
 !standard 7.5(2.1/5)
 !class Amendment 19-02-22
+!status Amendment 1-2012 19-02-26
+!status ARG Approved 10-0-0  19-02-26
 !status work item 19-02-22
 !status received 19-02-21
 !priority Low
@@ -31,7 +33,7 @@
 We introduce the term "constituents" to represent the subexpressions
 that represent the "fundamental" computations of a given expression (or
 name), and we introduce the term "newly constructed" to represent
-expressions that create a new object out of thin air.
+expressions that create a new object.
 
 !wording
 
@@ -61,7 +63,13 @@
   subtype{.}[; nor ... 
 
 Add after RM 4.4(9):
- 
+
+  A primary that is an expression surrounded by ( and ) is known as a 
+  *parenthesized expression*.
+
+  [This has been missing from the Standard for 40 years, seems like 
+  time to fix it - Editor.]
+
   Every name or expression comprises one or more /constituent/ names or
   expressions, only one of which is evaluated as part of evaluating the
   name or expression (the /evaluated constituent/).  The constituents
@@ -84,6 +92,10 @@
   not) be /newly constructed/.  This means the constituent shall (or
   shall not) be an aggregate or a function_call; in either case, a
   raise_expression is permitted.
+
+  AARM To Be Honest: If an if_expression does not have an else clause,
+  "True" is a constituent of the expression and it can be the evaluated 
+  constituent.
    
 Modify RM 4.5.9(6/5):
 
@@ -100,7 +112,7 @@
 
   A parameter of a by-reference type is passed by reference, as is an
   explicitly aliased parameter of any type. Each value of a by-reference
-  type has an associated object.  [If For a parenthesized expression,
+  type has an associated object. [For a parenthesized expression,
   qualified_expression, or view conversion, this object is the one
   associated with the operand.] For a value conversion, the associated
   object is the anonymous result object if such an object is created
@@ -126,10 +138,10 @@
 
 Introducing new terms means choosing among all the possible English
 words that communicate the appropriate notion, and that don't already
-have uses that conflict.  We chose "constituent" and "evaluated
+have uses that conflict. We chose "constituent" and "evaluated
 constituent" after considering various other terms like "component" or
 "part" or "element" all of which have existing uses in Ada, as well as
-other terms which don't quite capture the inent.  We chose "newly
+other terms which don't quite capture the intent. We chose "newly
 constructed" because it seems to capture the idea, without using the
 term "create" which already has a very technical meaning in Ada.
 
@@ -137,6 +149,127 @@
 dynamically tagged, and tag-indeterminate to use the "constituents"
 terminology, but it just began to get out of hand.
 
+!corrigendum 3.10.2(16.1/3)
+
+@drepl
+In the above rules, the operand of a view conversion, parenthesized expression or
+@fa<qualified_expression> is considered to be used in a context if the view conversion,
+parenthesized expression or @fa<qualified_expression> itself is used in that context.
+Similarly, a @i<dependent_>@fa<expression> of a @fa<conditional_expression> is
+considered to be used in a context if the @fa<conditional_expression> itself is
+used in that context.
+@dby
+In the above rules, the constituents of a @fa<name> or @fa<expression> (see
+4.4) are considered to be used in a given context if the enclosing @fa<name> or
+@fa<expression> is used in that context.
+
+
+!corrigendum 4.3.2(5.1/3)
+
+@drepl
+If the type of the @fa<ancestor_part> is limited and at least one component is
+needed in the @fa<record_component_association_list>, then the @fa<ancestor_part> shall
+not be:
+@dby
+If the type of the @fa<ancestor_part> is limited and at least one component is
+needed in the @fa<record_component_association_list>, then the @fa<ancestor_part> shall
+not have a constituent expression (see 4.4) that is a call to a function with an 
+unconstrained result subtype.
+
+!corrigendum 4.3.2(5.2/3)
+
+@ddel
+@xbullet<a call to a function with an unconstrained result subtype; nor>
+
+!corrigendum 4.3.2(5.3/3)
+
+@ddel
+@xbullet<a parenthesized or qualified expression whose operand
+would violate this rule; nor>
+
+!corrigendum 4.3.2(5.4/3)
+
+@ddel
+@xbullet<a @fa<conditional_expression> having at least one @i<dependent_>@fa<expression>
+that would violate this rule.>
+
+
+!corrigendum 4.4(9)
+
+@dinsa
+Each expression has a type; it specifies the computation or retrieval of a 
+value of that type.
+@dinss
+A @fa<primary> that is an @fa<expression> surrounded by ( and ) is known as a 
+@i<parenthesized expression>.
+
+Every @fa<name> or @fa<expression> comprises one or more @i<constituent> 
+@fa<name>s or @fa<expression>s, only one of which is evaluated as part of 
+evaluating the @fa<name> or @fa<expression> (the @i<evaluated constituent>). 
+The constituents are determined as follows, according to the form of the 
+@fa<expression> (or @fa<name>):
+
+@xbullet<if the @fa<expression> is a @fa<conditional_expression>, the 
+constituents of its @i<dependent_>@fa<expression>s;>
+
+@xbullet<if the @fa<expression> (or @fa<name>) is a parenthesized 
+expression, a @fa<qualified_expression>, or a view conversion, the 
+constituent(s) of its operand;>
+
+@xbullet<if the @fa<expression> is a @fa<declare_expression>, the 
+constituent(s) of its @i<body_>@fa<expression>;>
+
+@xbullet<otherwise, the @fa<expression> (or @fa<name>) itself.>
+    
+In certain contexts, we specify that a constituent shall (or shall
+not) be @i<newly constructed>. This means the constituent shall (or
+shall not) be an @fa<aggregate> or a @fa<function_call>; in either case, a
+@fa<raise_expression> is permitted.
+
+
+!corrigendum 4.5.9(0)
+
+@dinsc
+Just some text to cause a conflict; the real text is found in the 
+conflict file.
+
+
+!corrigendum 6.2(10/4)
+
+@drepl
+A parameter of a by-reference type is passed by reference, as is an explicitly
+aliased parameter of any type. Each value of a by-reference type has an associated
+object. For a parenthesized expression, @fa<qualified_expression>,
+or view conversion, this object is the one associated with the
+operand. For a value conversion, the associated object is the anonymous result
+object if such an object is created (see 4.6); otherwise it is the
+associated object of the operand. For a @fa<conditional_expression>, this object
+is the one associated with the evaluated @i<dependent_>@fa<expression>.
+@dby
+A parameter of a by-reference type is passed by reference, as is an explicitly
+aliased parameter of any type. Each value of a by-reference type has an associated
+object. For a value conversion, the associated object is the anonymous result
+object if such an object is created (see 4.6); otherwise it is the
+associated object of the operand. In
+other cases, the object associated with the evaluated constituent of
+the @fa<name> or @fa<expression> (see 4.4) determines its associated object.
+
+
+!corrigendum 7.5(2.1/5)
+
+@drepl
+In the following contexts, an @fa<expression> of a limited type is not permitted
+unless it is an @fa<aggregate>, a @fa<function_call>, a @fa<raise_expression>,
+a parenthesized @fa<expression> or @fa<qualified_expression> whose operand is
+permitted by this rule, a @fa<conditional_expression> all of whose
+@i<dependent_>@fa<expression>s are permitted by this rule, or a 
+@fa<declare_expression> whose @i<body_>@fa<expression> is permitted by this 
+rule:
+@dby
+In the following contexts, an @fa<expression> of a limited type is permitted
+only if each of its constituents is newly constructed (see 4.4): 
+
+
 !ASIS
 
 No ASIS effect.
@@ -725,5 +858,60 @@
 update.
  
 > So this is an update to what is now identified as AI12-0317-1...
+
+****************************************************************
+
+From: Tucker Taft
+Sent: Monday, February 25, 2019  9:05 PM
+
+...
+> The AI doesn't use it in any such places, or even tell us in the 
+> !discussion where they might be.
+
+The latest version of the "ownership" AI is the place I had in mind.
+
+...
+> Sigh. I suppose it doesn't pay to insist on discussing the previous 
+> version, and if I don't post it half of the group won't find it, so 
+> I've posted an update.
+
+Thanks.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Thursday, February 28, 2019  11:53 PM
+
+Does anyone object to adding the following to AI12-0317-1 just before the 
+definition of "constituent":
+
+A primary that is an expression surrounded by ( and ) is known as a 
+*parenthesized expression*.
+
+We use the term "parenthesized expression" a lot in the Standard (the search 
+engine turns up more than 15 uses), but the syntax "(expression)" does not 
+have an associated nonterminal (it is just one of the forms of primary), and 
+there is no definition of "parenthesized expression" in the Standard. (At 
+least there is not one in the index.)
+
+It might be "obvious", but so are "part" and "descendant". :-)
+
+I would like to add this to AI12-0317-1 as an "Editorial change", but since it 
+alters the definition in some sense I won't if someone objects. (Then I'll 
+probably stick it into some other AI.) We're adding a bunch of other 
+definitions to the exact right place, and even use the term in the following 
+definitions. So this seems to be a great time to fix an oversight of the last
+40 years.
+
+Speak now or lose your chance. :-)
+
+P.S. I have no interest in determining Resolution Rules for a parenthesized 
+expression, though. I've tried those in the past, and everything I could come 
+up with seemed worse than ignoring it. (It would need rules similar to those 
+for conditional expressions, which are anything but simple - see 4.5.9(8/3).)
+This is covered in AI12-0066-1, the "we aren't going to fix it AI". We're 
+also missing Dynamic Semantic rules, but that could just be "Evaluation of a 
+parenthesized expression evaluates the contained expression." or something 
+like that.
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent