!standard 13.11(5) 17-06-09 AI12-0235-1/01 !standard 13.11.4(3/3) !class Amendment 17-06-09 !status work item 17-06-09 !status received 17-06-09 !priority Low !difficulty Easy !subject Root_Storage_Pool should be pure !summary !problem It is not possible to define a pool/subpool in a Pure package as Root_Storage_Pool is preelaborated. This prevents defining a shared pool type for use in the distributed program. (Note that, due to the prohibition on variables in distributed packages, a pool cannot itself be shared across partitions). !proposal (See Summary.) !wording In 13.11(5) and 13.11.4(3/3), change Preelaborate to Pure. [Question: Do we still need the pragma Preelaborable_Initialization in 13.11(6/2)?] !discussion When Ada 95 was designed, neither Ada.Finalization nor System was declared Pure, so it would have been impossible to declare either of these packages Pure then. Nor were access types allowed. Thus, there is no obvious reason (other than possibly breaking existing implementations) that these packages cannot be Pure. OTOH, this seems to promise distribution that isn't actually possible. And the argument above could be applied to almost any package -- but forcing all language-defined packages to be Pure would make them almost unmaintainable. !ASIS No ASIS effect. !ACATS test An ACATS C-Test is needed to check that the new capabilities are supported. !appendix !topic Storage-pools in distributed systems. !reference Ada 202x RM13.11(5); RM13.11.4(3/3) !from Edward Fish 17-05-21 !keywords DSA, storage-pools, purity !discussion In the DSA (Annex E) there are references to accesses across partitions as well as the categorization of library-units (E.2(6/3-6.5/3)); however the package-interface defined in RM13.11 for System.Storage_Pools is Preelaborate as is the Subpools child-package in 13.11.4. Nothing in those packages prevents the contents from being declared pure and it may be advantageous to allow for pools/subpools to be defined in pure units so that subpools may be defined for every partition in the distributed program. (Though it is admitted that you cannot create a pool/subpool in a pure unit, due to the restriction on state, that is quite different than merely defining the pool or subpool type.) *************************************************************** From: Tucker Taft Sent: Tuesday, May 23, 2017 10:05 AM I would agree that it would make sense to shift the categorization of both of these packages from Preelaborate to Pure. At one point Finalization was not declared Pure, but that was changed. Similarly, access types were not permitted in Pure packages at one point, but now they are so long as they have a storage size of zero, so I think both of these packages now can qualify as Pure. ***************************************************************