| 1 |
!standard 3.9.9 08-02-21 SI99-0032-1/03 |
|---|
| 2 |
!standard 3.9.13 |
|---|
| 3 |
!standard 15.9 |
|---|
| 4 |
!standard 15.49 |
|---|
| 5 |
!standard 16.39 |
|---|
| 6 |
!class Binding Interpretation 07-12-06 |
|---|
| 7 |
!status ARG Approved 7-0-2 08-02-08 |
|---|
| 8 |
!status work item 07-12-06 |
|---|
| 9 |
!status received 07-12-03 |
|---|
| 10 |
!priority Medium |
|---|
| 11 |
!difficulty Easy |
|---|
| 12 |
!qualifier Omission |
|---|
| 13 |
!subject Corrections for SI99-0004-1 and SI99-0006-1 |
|---|
| 14 |
|
|---|
| 15 |
!summary |
|---|
| 16 |
|
|---|
| 17 |
Add Universal_Access to Root_Type_Kinds. |
|---|
| 18 |
|
|---|
| 19 |
An_Access_Definition does indeed belong in Definition_Kinds. |
|---|
| 20 |
|
|---|
| 21 |
The details of the empty task_definition potentially returned by |
|---|
| 22 |
Object_Declaration_Subtype are defined. |
|---|
| 23 |
|
|---|
| 24 |
Progentitor_List can be called on a type definition that does not |
|---|
| 25 |
have an interface_list; in this case the returned list is empty. |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
!question |
|---|
| 29 |
|
|---|
| 30 |
(1) The Amendment (Ada 2005) defines a new universal type (universal_access), so |
|---|
| 31 |
a new enumeration literal should be added to Root_Type_Kinds. |
|---|
| 32 |
|
|---|
| 33 |
(2) SI99-0004-1 says that An_Access_Definition should be added to |
|---|
| 34 |
Asis.Definition_Kinds after An_Enumeration_Literal_Specification. But that |
|---|
| 35 |
literal is not in Definition_Kinds. Where should this be added? |
|---|
| 36 |
|
|---|
| 37 |
(3) 15.9 as modified by SI99-0004-1 says: "For a single_task_declaration or |
|---|
| 38 |
single_protected_declaration, returns the task_definition or protected_definition |
|---|
| 39 |
following the reserved word is; use Is_Task_Definition_Present to determine |
|---|
| 40 |
if the entire definition is omitted." This makes no sense in the case where |
|---|
| 41 |
there is no definition present - there is nothing to return. What should this say? |
|---|
| 42 |
|
|---|
| 43 |
(4) What does Progenitor_List (defined by SI99-0006-1) return for a type that |
|---|
| 44 |
does not have an interface_list? |
|---|
| 45 |
|
|---|
| 46 |
!recommendation |
|---|
| 47 |
|
|---|
| 48 |
(See summary.) |
|---|
| 49 |
|
|---|
| 50 |
!wording |
|---|
| 51 |
|
|---|
| 52 |
Modify 3.9.9 as follows: |
|---|
| 53 |
|
|---|
| 54 |
... |
|---|
| 55 |
An_Others_Choice -- 3.8.1(5), 4.3.1(5), 4.3.3(5), 11.2(5) |
|---|
| 56 |
{An_Access_Definition -- 3.10(6)} |
|---|
| 57 |
... |
|---|
| 58 |
|
|---|
| 59 |
[Note: SI99-0011 adds two items to this enumeration; this one is intended to |
|---|
| 60 |
precede those items.] |
|---|
| 61 |
|
|---|
| 62 |
Modify 3.9.13 as follows: |
|---|
| 63 |
|
|---|
| 64 |
type Root_Type_Kinds is ( |
|---|
| 65 |
|
|---|
| 66 |
Not_A_Root_Type_Definition, -- An unexpected element |
|---|
| 67 |
|
|---|
| 68 |
A_Root_Integer_Definition, -- 3.4.1(8) |
|---|
| 69 |
A_Root_Real_Definition, -- 3.4.1(8) |
|---|
| 70 |
|
|---|
| 71 |
A_Universal_Integer_Definition, -- 3.4.1(6) |
|---|
| 72 |
A_Universal_Real_Definition, -- 3.4.1(6) |
|---|
| 73 |
A_Universal_Fixed_Definition{, -- 3.4.1(6) |
|---|
| 74 |
A_Universal_Access_Definition}); -- 3.4.1(6) |
|---|
| 75 |
|
|---|
| 76 |
Modify the third text paragraph of 15.9 (now Object_Declaration_Subtype): |
|---|
| 77 |
|
|---|
| 78 |
For a single_task_declaration or single_protected_declaration, returns |
|---|
| 79 |
the task_definition or protected_definition{.}[ following the reserved word |
|---|
| 80 |
is; use Is_Task_Definition_Present to determine if the entire definition |
|---|
| 81 |
is omitted.]{ If no task_definition is given explicitly (the reserved word is |
|---|
| 82 |
is not written), an empty task_definition is returned for which |
|---|
| 83 |
Is_Task_Definition_Present returns False.} |
|---|
| 84 |
|
|---|
| 85 |
{If an empty task_definition E is returned, then Is_Part_of_Implicit(E) = False; |
|---|
| 86 |
Element_Span(E) returns a value where the First_Column_Number > Last_Column_Number and |
|---|
| 87 |
First_Line = Last_Line = the line of the semicolon; Element_Image(E) = ""; and |
|---|
| 88 |
Lines(E) returns a single line whose Line_Image = "".} |
|---|
| 89 |
|
|---|
| 90 |
Modify the second text paragraph of 15.49 (Progenitor_List): |
|---|
| 91 |
|
|---|
| 92 |
Returns a list of subtype marks making up the interface_list in the argument |
|---|
| 93 |
declaration, in their order of appearance.{ If Declaration has no progenitors, |
|---|
| 94 |
an empty list is returned.} |
|---|
| 95 |
|
|---|
| 96 |
Modify the second text paragraph of 16.39 (Is_Task_Definition_Present): |
|---|
| 97 |
|
|---|
| 98 |
Returns True if the element has a {task_definition that is given explicitly}[task definition]. |
|---|
| 99 |
|
|---|
| 100 |
!discussion |
|---|
| 101 |
|
|---|
| 102 |
(1) is obviously needed. (2) is correcting a bug in the original SI and specifying the |
|---|
| 103 |
location relative to SI99-0011-1. |
|---|
| 104 |
|
|---|
| 105 |
(3) Makes the wording meaningful, and defines the details of the empty task_definition. |
|---|
| 106 |
Note that Is_Part_of_Implicit has to return False for the empty task_definition so that |
|---|
| 107 |
it can be queried for its source information. |
|---|
| 108 |
|
|---|
| 109 |
(4) is needed in order that it is clear what happens with types without an Interface_List. |
|---|
| 110 |
|
|---|
| 111 |
!appendix |
|---|
| 112 |
|
|---|
| 113 |
!topic Add A_Universal_Access_Definition to Root_Type_Kinds |
|---|
| 114 |
!reference Ada 2005 RM 3.4.1(6) |
|---|
| 115 |
!from Maxim Reznik 07-12-01 |
|---|
| 116 |
!keywords universal access |
|---|
| 117 |
!discussion |
|---|
| 118 |
|
|---|
| 119 |
The Amendment (Ada 2005) defines new universal type (universal_access), so |
|---|
| 120 |
new enumeration literal should be added to Root_Type_Kinds: |
|---|
| 121 |
|
|---|
| 122 |
------------------------------------------------------------------------------- |
|---|
| 123 |
-- 3.9.13 type Root_Type_Kinds |
|---|
| 124 |
------------------------------------------------------------------------------- |
|---|
| 125 |
-- Root_Type_Kinds |
|---|
| 126 |
-- Literals -- Reference Manual |
|---|
| 127 |
------------------------------------------------------------------------------- |
|---|
| 128 |
|
|---|
| 129 |
type Root_Type_Kinds is ( |
|---|
| 130 |
|
|---|
| 131 |
Not_A_Root_Type_Definition, -- An unexpected element |
|---|
| 132 |
|
|---|
| 133 |
A_Root_Integer_Definition, -- 3.4.1(8) |
|---|
| 134 |
A_Root_Real_Definition, -- 3.4.1(8) |
|---|
| 135 |
|
|---|
| 136 |
A_Universal_Integer_Definition, -- 3.4.1(6) |
|---|
| 137 |
A_Universal_Real_Definition, -- 3.4.1(6) |
|---|
| 138 |
A_Universal_Fixed_Definition, -- 3.4.1(6) |
|---|
| 139 |
A_Universal_Access_Definition); -- 3.4.1(6) |
|---|
| 140 |
|
|---|
| 141 |
I think it could be part of SI99-0004-1. |
|---|
| 142 |
|
|---|
| 143 |
**************************************************************** |
|---|
| 144 |
|
|---|
| 145 |
From: Greg Gicca |
|---|
| 146 |
Sent: Wednesday, January 23, 2008 10:08 AM |
|---|
| 147 |
|
|---|
| 148 |
In SI99-0004-1, we have |
|---|
| 149 |
|
|---|
| 150 |
!wording |
|---|
| 151 |
|
|---|
| 152 |
* Extend existing Element classification: -- ASIS 3.9.9 |
|---|
| 153 |
- add An_Access_Definition to Asis.Definition_Kinds after |
|---|
| 154 |
An_Enumeration_Literal_Specification |
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 |
|
|---|
| 158 |
The above is found in Declaration_Kinds, not Definition_Kinds. Did we |
|---|
| 159 |
mean the first? |
|---|
| 160 |
|
|---|
| 161 |
**************************************************************** |
|---|
| 162 |
|
|---|
| 163 |
From: Sergey I. Rybin |
|---|
| 164 |
Sent: Wednesday, January 23, 2008 11:02 AM |
|---|
| 165 |
|
|---|
| 166 |
> The above is found in Declaration_Kinds, not Definition_Kinds. Did we |
|---|
| 167 |
> mean the first? |
|---|
| 168 |
|
|---|
| 169 |
An_Access_Definition in no case should be added to Declaration_Kinds. |
|---|
| 170 |
|
|---|
| 171 |
I think "after An_Enumeration_Literal_Specification" is a bug here. |
|---|
| 172 |
|
|---|
| 173 |
What is the right place for it in Definition_Kinds? May be, between |
|---|
| 174 |
An_Others_Choice and An_Incomplete_Type_Definition? |
|---|
| 175 |
|
|---|
| 176 |
**************************************************************** |
|---|
| 177 |
|
|---|
| 178 |
From: Greg Gicca |
|---|
| 179 |
Sent: Wednesday, January 23, 2008 5:49 PM |
|---|
| 180 |
|
|---|
| 181 |
Sergey's reply makes sense. Should this SI be examined thoroughly and |
|---|
| 182 |
then reviewed at the next meeting or should I check it out and try for |
|---|
| 183 |
approval via e-mail to make the updates? |
|---|
| 184 |
|
|---|
| 185 |
**************************************************************** |
|---|
| 186 |
|
|---|
| 187 |
From: Randy Brukardt |
|---|
| 188 |
Sent: Wednesday, January 23, 2008 7:22 PM |
|---|
| 189 |
|
|---|
| 190 |
SI-32 fixes another bug (an omission) from SI99-0004, so my suggestion is to |
|---|
| 191 |
make the fix there. (Presuming that this is the only bug in it; if there are |
|---|
| 192 |
more bugs, we should put SI99-0004 back on the agenda, with all of the fixes |
|---|
| 193 |
including the SI-32 one). Otherwise, we'll never finish anything (most AIs |
|---|
| 194 |
and SIs have bugs if you look hard enough). |
|---|
| 195 |
|
|---|
| 196 |
**************************************************************** |
|---|