Version 1.3 of ai12s/ai12-0414-1.txt
!standard 13.7(3/2) 21-02-10 AI12-0414-1/01
!standard 13.7.1(2/2)
!standard A.1(4)
!standard A.2(2)
!standard A.2(3)
!standard A.3.1(2)
!standard A.3.1(4/2)
!standard A.3.1(6/2)
!standard A.3.2(2/2)
!standard A.3.3(3)
!standard A.3.4(2/2)
!standard A.3.5(3/3)
!standard A.4.1(3)
!standard A.4.2(3/2)
!standard A.4.6(3/2)
!standard A.4.9(2/3)
!standard A.4.9(11.2/3)
!standard A.4.10(2/3)
!standard A.4.10(13/3)
!standard A.4.11(3/3)
!standard A.4.11(15/3)
!standard A.4.11(22/3)
!standard A.4.11(30/3)
!standard A.4.11(38/3)
!standard A.5(3/2)
!standard A.13(3)
!standard A.18.1(3/2)
!standard A.19(3/3)
!standard B.2(3)
!standard B.3(4)
!standard B.5(4)
!standard F.2(2)
!class presentation 20-12-03
!status Amendment 1-2012 20-12-11
!status ARG Approved 15-0-0 20-12-09
!status work item 20-12-03
!status received 20-10-06
!priority Low
!difficulty Easy
!subject Replace categorization pragmas with aspects
!summary
Replace all remaining categorization pragmas with equivalent aspects.
!question
We've added aspects to the start of many language-defined units, and in
such cases we've switched any categorization pragma to use an aspect
instead -- to avoid having a mix of aspects and pragmas.
It's inconsistent to have some units use only pragmas and some use
only aspects.
!response
(See Summary.)
!wording
Modify the following paragraphs (all categorization pragmas in headers of
language-defined paragraphs):
13.7(3/2)
13.7.1(2/2)
A.1(4)
A.2(2)
A.3.1(2)
A.3.1(4/2)
A.3.1(6/2)
A.3.2(2/2)
A.3.3(3)
A.3.4(2/2)
A.3.5(3/3)
A.4.1(3)
A.4.2(3/2)
A.4.6(3/2)
A.4.9(2/3)
A.4.9(11.2/3)
A.4.10(2/3)
A.4.10(13/3)
A.4.11(3/3)
A.4.11(15/3)
A.4.11(22/3)
A.4.11(30/3)
A.4.11(38/3)
A.5(3/2)
A.13(3)
A.18.1(3/2)
A.19(3/3)
B.2(3)
B.3(4)
B.5(4)
E.4.1(2) -- Part of an example.
E.4.1(3) -- Part of an example.
F.2(2)
Modify A.2(3):
Ada serves as the parent of most of the other language-defined library units;
its declaration is empty[ (except for the pragma Pure)].
Modify A.4.7(46.2/2) (as modified by AI12-0302-1):
{Aspect}[Pragma] Pure is replaced by aspects [with] Preelaborate, Nonblocking,
Global => in out synchronized in Strings.Wide_Maps.Wide_Constants.
Modify A.4.8(50/2) (as modified by AI12-0302-1):
{Aspect}[Pragma] Pure is replaced by aspects [with] Preelaborate, Nonblocking,
Global => in out synchronized in Strings.Wide_Wide_Maps.Wide_Wide_Constants.
!discussion
Consistency is good.
!corrigendum 13.7(3/2)
Replace the paragraph:
package System is
pragma Pure(System);
by:
package System
with Pure is
!corrigendum 13.7.1(2/2)
Replace the paragraph:
package System.Storage_Elements is
pragma Pure(Storage_Elements);
by:
package System.Storage_Elements
with Pure is
!corrigendum A.1(4)
Replace the paragraph:
package Standard is
pragma Pure(Standard);
by:
package Standard
with Pure is
!corrigendum A.2(2)
Replace the paragraph:
package Ada is
pragma Pure(Ada);
end Ada;
by:
package Ada
with Pure is
end Ada;
!corrigendum A.2(3)
Replace the paragraph:
Ada serves as the parent of most of the other language-defined library units;
its declaration is empty (except for the pragma Pure).
by:
Ada serves as the parent of most of the other language-defined library units;
its declaration is empty.
!corrigendum A.3.1(2)
Replace the paragraph:
package Ada.Characters is
pragma Pure(Characters);
end Ada.Characters;
by:
package Ada.Characters
with Pure is
end Ada.Characters;
!corrigendum A.3.1(4/2)
Replace the paragraph:
package Ada.Wide_Characters is
pragma Pure(Wide_Characters);
end Ada.Wide_Characters;
by:
package Ada.Wide_Characters
with Pure is
end Ada.Wide_Characters;
!corrigendum A.3.1(6/2)
Replace the paragraph:
package Ada.Wide_Wide_Characters is
pragma Pure(Wide_Wide_Characters);
end Ada.Wide_Wide_Characters;
by:
package Ada.Wide_Wide_Characters
with Pure is
end Ada.Wide_Wide_Characters;
!corrigendum A.3.2(2/2)
Replace the paragraph:
with Ada.Characters.Conversions;
package Ada.Characters.Handling is
pragma Pure(Handling);
by:
with Ada.Characters.Conversions;
package Ada.Characters.Handling
with Pure is
!corrigendum A.3.3(3)
Replace the paragraph:
package Ada.Characters.Latin_1 is
pragma Pure(Latin_1);
by:
package Ada.Characters.Latin_1
with Pure is
!corrigendum A.3.4(2/2)
Replace the paragraph:
package Ada.Characters.Conversions is
pragma Pure(Conversions);
by:
package Ada.Characters.Conversions
with Pure is
!corrigendum A.3.5(3/3)
Replace the paragraph:
package Ada.Wide_Characters.Handling is
pragma Pure(Handling);
by:
package Ada.Wide_Characters.Handling
with Pure is
!corrigendum A.4.1(3)
Replace the paragraph:
package Ada.Strings is
pragma Pure(Strings);
by:
package Ada.Strings
with Pure is
!corrigendum A.4.2(3/2)
Replace the paragraph:
package Ada.Strings.Maps is
pragma Pure(Maps);
by:
package Ada.Strings.Maps
with Pure is
!corrigendum A.4.6(3/2)
Replace the paragraph:
package Ada.Strings.Maps.Constants is
pragma Pure(Constants);
by:
package Ada.Strings.Maps.Constants
with Pure is
!corrigendum A.4.7(46.2/2)
Replace the paragraph:
Pragma Pure is replaced by pragma Preelaborate in Strings.Wide_Maps.Wide_Constants.
by:
Aspect Pure is replaced by aspects Preelaborate, Nonblocking,
Global => in out synchronized in Strings.Wide_Maps.Wide_Constants.
!corrigendum A.4.8(50/2)
Replace the paragraph:
Pragma Pure is replaced by pragma Preelaborate in Strings.Wide_Maps.Wide_Constants.
by:
Aspect Pure is replaced by aspects Preelaborate, Nonblocking,
Global => in out synchronized in Strings.Wide_Wide_Maps.Wide_Wide_Constants.
!corrigendum A.4.9(2/3)
Replace the paragraph:
with Ada.Containers;
function Ada.Strings.Hash (Key : String) return Containers.Hash_Type;
pragma Pure(Ada.Strings.Hash);
by:
with Ada.Containers;
function Ada.Strings.Hash (Key : String) return Containers.Hash_Type
with Pure;
!corrigendum A.4.9(11.2/3)
Replace the paragraph:
with Ada.Containers;
function Ada.Strings.Hash_Case_Insensitive (Key : String)
return Containers.Hash_Type;
pragma Pure(Ada.Strings.Hash_Case_Insensitive);
by:
with Ada.Containers;
function Ada.Strings.Hash_Case_Insensitive (Key : String)
return Containers.Hash_Type
with Pure;
!corrigendum A.4.10(2/3)
Replace the paragraph:
function Ada.Strings.Equal_Case_Insensitive (Left, Right : String)
return Boolean;
pragma Pure(Ada.Strings.Equal_Case_Insensitive);
by:
function Ada.Strings.Equal_Case_Insensitive (Left, Right : String)
return Boolean with Pure;
!corrigendum A.4.10(13/3)
Replace the paragraph:
function Ada.Strings.Less_Case_Insensitive (Left, Right : String)
return Boolean;
pragma Pure(Ada.Strings.Less_Case_Insensitive);
by:
function Ada.Strings.Less_Case_Insensitive (Left, Right : String)
return Boolean with Pure;
!corrigendum A.4.11(3/3)
Replace the paragraph:
package Ada.Strings.UTF_Encoding is
pragma Pure(UTF_Encoding);
by:
package Ada.Strings.UTF_Encoding
with Pure is
!corrigendum A.4.11(15/3)
Replace the paragraph:
package Ada.Strings.UTF_Encoding.Conversions is
pragma Pure(Conversions);
by:
package Ada.Strings.UTF_Encoding.Conversions
with Pure is
!corrigendum A.4.11(22/3)
Replace the paragraph:
package Ada.Strings.UTF_Encoding.Strings is
pragma Pure(Strings);
by:
package Ada.Strings.UTF_Encoding.Strings
with Pure is
!corrigendum A.4.11(30/3)
Replace the paragraph:
package Ada.Strings.UTF_Encoding.Wide_Strings is
pragma Pure(Wide_Strings);
by:
package Ada.Strings.UTF_Encoding.Wide_Strings
with Pure is
!corrigendum A.4.11(38/3)
Replace the paragraph:
package Ada.Strings.UTF_Encoding.Wide_Wide_Strings is
pragma Pure(Wide_Wide_Strings);
by:
package Ada.Strings.UTF_Encoding.Wide_Wide_Strings
with Pure is
!corrigendum A.5(3/2)
Replace the paragraph:
package Ada.Numerics is
pragma Pure(Numerics);
Argument_Error : exception;
Pi : constant :=
3.14159_26535_89793_23846_26433_83279_50288_41971_69399_37511;
π : constant := Pi;
e : constant :=
2.71828_18284_59045_23536_02874_71352_66249_77572_47093_69996;
end Ada.Numerics;
by:
package Ada.Numerics
with Pure is
Argument_Error : exception;
Pi : constant :=
3.14159_26535_89793_23846_26433_83279_50288_41971_69399_37511;
π : constant := Pi;
e : constant :=
2.71828_18284_59045_23536_02874_71352_66249_77572_47093_69996;
end Ada.Numerics;
!corrigendum A.13(3)
Replace the paragraph:
package Ada.IO_Exceptions is
pragma Pure(IO_Exceptions);
by:
package Ada.IO_Exceptions
with Pure is
!corrigendum A.18.1(3/2)
Replace the paragraph:
package Ada.Containers is
pragma Pure(Containers);
by:
package Ada.Containers
with Pure is
!corrigendum A.19(3/3)
Replace the paragraph:
package Ada.Locales
is
pragma Preelaborate(Locales);
pragma Remote_Types(Locales);
by:
package Ada.Locales
with Preelaborate, Remote_Types is
!corrigendum B.2(3)
Replace the paragraph:
package Interfaces is
pragma Pure(Interfaces);
by:
package Interfaces
with Pure is
!corrigendum B.3(4)
Replace the paragraph:
package Interfaces.C is
pragma Pure(Interfaces.C);
by:
package Interfaces.C
with Pure is
!corrigendum B.5(4)
Replace the paragraph:
with Ada.Numerics.Generic_Complex_Types; -- see G.1.1
pragma Elaborate_All(Ada.Numerics.Generic_Complex_Types);
package Interfaces.Fortran is
pragma Pure(Fortran);
by:
with Ada.Numerics.Generic_Complex_Types; -- see G.1.1
pragma Elaborate_All(Ada.Numerics.Generic_Complex_Types);
package Interfaces.Fortran
with Pure is
!corrigendum F.2(2)
Replace the paragraph:
package Ada.Decimal is
pragma Pure(Decimal);
by:
package Ada.Decimal
with Pure is
!ASIS
No ASIS effect.
!ACATS test
No ACATS tests needed.
!appendix
From the review of Tucker Taft, October 6, 2020
One comment on A.4.6 (3/2): Why is this still a "pragma Pure(Constants);"
rather than a "with Pure"? Of course if we change this we need to change
A.4.7 (46.2/5) we should talk in terms of "Aspect Pure ... " rather than
"Pragma Pure...".
****************************************************************
From: John Barnes
Sent: Wednesday, October 7, 2020 1:45 AM
That was the thing that struck as most untidy about the current situation.
We are still lingering in the pragma days when surely we should change them
all to aspects. Most of the preelaborates have changed as a consequence of
adding nonblocking.
****************************************************************
From: Randy Brukardt
Sent: Tuesday, October 13, 2020 9:41 PM
This occurred mainly because one John Barnes objected to changing library unit
pragmas to aspects in Ada 2012. As a result, we left those as pragmas by
default, just allowing them to be written as aspects.
For Ada 202x, we've changed such pragmas to aspects in the cases where other
aspects (which do not have matching pragmas) need to be given in the same
place. But we're not changing other library unit pragmas to aspects. Besides
being a lot of work, it would cause your major objection to the aspect syntax
to occur. Specifically, A.2(2) is:
package Ada is
pragma Pure(Ada);
end Ada;
Changing this to an aspect would result in:
package Ada
with Pure is
end Ada;
When we (you and I) discussed this a couple of years ago, you decided that you
were OK with aspects replacing library unit pragmas so long as "is end"
didn't appear -- which it would in this case of an empty parent package.
If of course we're going to leave some pragmas rather than converting them to
aspects, then it doesn't matter much exactly where that line is drawn.
If, OTOH, you've changed your mind about the above, we can discuss changing
them all (it probably would add several days to the completion of the RM,
since an AI would be required).
****************************************************************
From: John Barnes
Sent: Tuesday, October 20, 2020 10:39 AM
I think we should change them all now. I do still dislike is end. But then I
dislike the mixture we have now even more.
Over the past weeks I have been doing some updates to my book and In
particular changed them all. One can hide the horrid is end by the insertion
of a nice comment thus
package Ada
with Pure is
-- as white as driven snow
end Ada;
****************************************************************
Questions? Ask the ACAA Technical Agent