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

Differences between 1.3 and version 1.4
Log of other versions for file ai12s/ai12-0201-1.txt

--- ai12s/ai12-0201-1.txt	2016/10/07 02:10:59	1.3
+++ ai12s/ai12-0201-1.txt	2017/07/20 02:48:39	1.4
@@ -1,7 +1,10 @@
-!standard 4.9(9)                                  16-08-18   AI12-0201-1/01
+!standard 4.9(9)                                  17-07-19   AI12-0201-1/02
 !standard 4.9(19)
 !standard 4.9(20)
+!standard 4.9(24)
 !class Amendment 16-08-18
+!status Amendment 1-2012 17-07-19
+!status ARG Approved 8-0-0  17-06-18
 !status work item 16-08-18
 !status received 16-07-29
 !priority Low
@@ -25,7 +28,7 @@
 
 Now that we have static membership tests for strings (e.g. S in "abc" -- RM
 4.9(11/4)) it seems odd to not permit static equality tests for strings (e.g. S
-= "abc"). We should extending static functions to include relational
+= "abc"). We should be extending static functions to include relational
 operators on strings.
 
 !proposal
@@ -34,6 +37,20 @@
 
 !wording
 
+Add after AARM 4.9(1.d):
+
+Reason: We support static string expressions so that, for example, the
+aspect_definition for a Link_Name aspect can contain a concatenation.
+We don't support static aggregates (even for string types) or non-string
+static nonscalar types; we're trying to keep it cheap and simple (from the
+implementer's viewpoint).
+
+[Editor's note: Most of this was moved from 4.9(24.b), which was mainly about
+the (now deleted) length limit. The remainder is more general text that should
+be at the start. Note that this text admits that static strings are really
+a hack; this AI makes them a little bit less hacky, but there seems to be
+little reason that (say) an array of scalar couldn't also be static.]
+
 Modify 4.9(9):
 
 * a type_conversion whose subtype_mark denotes a static
@@ -57,16 +74,28 @@
 formal string types and not for formal scalar types is beyond me, so I
 consider it an omission and fixed the concatenation rule.]
 
+Modify 4.9(24):
+
+A *static constant* is a constant view declared by a full constant
+declaration or an object_renaming_declaration with a static nominal subtype,
+having a value defined by a static scalar expression or by a static string
+expression[ whose value has a length not exceeding the maximum length of a
+string_literal in the implementation]. 
+
+Delete AARM 4.9(24.b/3 and 24.c).
+
 !discussion
 
 There are three items where static strings have limited capabilities compared
 to static scalar types: operators, type conversions, and literals (aggregates).
 It's not clear why any of these were excluded originally -- perhaps the
-entire static string capability was more a hack than a designed feature.
+entire static string capability was more a hack than a designed feature. (This
+interpretation is backed up by 4.(24.b), which says that the feature was
+intended to be "cheap and simple".)
 
 The problem covered the uses for operators. Type conversions can be useful
 if a bounds change or a representation change is needed. A string literal
-is supposed to be euqivalent to a positional array aggregate, but the aggregate
+is supposed to be equivalent to a positional array aggregate, but the aggregate
 is not static while the literal is.
 
 We make changes to cover the first two cases. The wording needed to allow
@@ -78,6 +107,55 @@
 for the components in the internal static representation). This operation is
 similar to the one needed to process string literals, so it shouldn't provide
 an implementation hardship.
+
+We also remove the length limit for static strings. This limit bizarrely only
+applied to constant declarations; a string of concatenated static strings
+could exceed this limit without error. Thus, compilers have to support storing
+"giant strings" (as AARM 4.9(24.b/3) justifies the limit), at least
+momentarily, and it's hard to imagine that this limit saves much if any
+implementation effort. It mainly provides a "road hazard" making code illegal
+mysteriously, so we eliminate it.
+
+!corrigendum 4.9(9)
+
+@drepl
+@xbullet<a @fa<type_conversion> whose @fa<subtype_mark> denotes a static
+scalar subtype, and whose operand is a static expression;>
+@dby
+@xbullet<a @fa<type_conversion> whose @fa<subtype_mark> denotes a static
+(scalar or string) subtype, and whose operand is a static expression;>
+
+!corrigendum 4.9(19)
+
+@dinsa
+@xbullet<a predefined operator whose parameter and result types are all
+scalar types none of which are descendants of formal scalar types;>
+@dinst
+@xbullet<a predefined relational operator whose parameters are of a string
+type that is not a descendant of a formal array type;>
+
+!corrigendum 4.9(20)
+
+@drepl
+@xbullet<a predefined concatenation operator whose result type is a string
+type;>
+@dby
+@xbullet<a predefined concatenation operator whose result type is a string
+type that is not a descendant of a formal array type;>
+
+!corrigendum 4.9(24)
+
+@drepl
+A @i<static constant> is a constant view declared by a full constant
+declaration or an @fa<object_renaming_declaration> with a static nominal subtype,
+having a value defined by a static scalar expression or by a static string
+expression whose value has a length not exceeding the maximum length of a
+@fa<string_literal> in the implementation.
+@dby
+A @i<static constant> is a constant view declared by a full constant
+declaration or an @fa<object_renaming_declaration> with a static nominal subtype,
+having a value defined by a static scalar expression or by a static string
+expression.
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent