!standard E.2.3(7/1) 12-11-28 AI12-0038-1/01 !class binding interpretation 12-11-28 !status work item 12-11-28 !status received 12-06-23 !priority Low !difficulty Medium !subject Shared_Passive package restrictions !summary Shared_Passive restrictions have to be adjusted because declared-pure package now allow the declarations of access types. !question Shared passive packages are allowed to depend on declared-pure packages. In Ada 2005, access types declarations were allowed in declared-pure packages, but the implications of this were not accounted for in the restrictions on shared passive packages. Should we add new restrictions directly on shared passive packages to account for this change? (Yes) !response Shared passive packages are not allowed to declare access-to-class-wide types, but there is nothing preventing them from referencing an access-to- class-wide type declared in a declared-pure package. We propose to disallow using access types declared in declared-pure packages within a shared-passive package. !wording Modify E.2.3(7/1): * it shall not contain a library-level declaration of an access type that designates a class-wide type, task type, or protected type with entry_declarations{; further, it shall not contain a library-level declaration that includes a name that denotes an access type declared in a declared-pure package}. !discussion The accessibility rule of E.2.3(8) is intended to prevent pointers being created in a shared-passive package that point "back" into the data area of some particular active partition. Unfortunately, this doesn't work if the access type is declared in something other than a shared-passive package, in particular, in a declared-pure package. Therefore, we need to disallow the use of such "unprotected" access types in a shared-passive package. That is the point of the wording added to E.2.3(7/1). !ACATS test An ACATS B-Test should be created to check that the new rule is actually enforced. !appendix From: Tucker Taft Sent: Thursday, November 29, 2012 8:49 AM I was tasked with splitting off an AI from AI12-0031, to deal with issues associated with shared-passive packages and their interaction with declared-pure packages. The basic problem is that in Ada 2005 we starting allowing access types to be declared in declared-pure packages, but didn't adjust the rules for shared-passive packages to account for that change. So here is a proposed new AI that tries to do that. [This is version /01 of this AI.] **************************************************************** From: Randy Brukardt Sent: Thursday, November 29, 2012 1:27 PM ... > So here is a proposed new AI that tries to do that. I fear the Mayans are right about an impending apocalypse, as the point when Tucker is among the first to finish most of his homework is roughly as likely as me winning the Powerball lottery. :-) **************************************************************** From: Randy Brukardt Sent: Thursday, November 29, 2012 8:12 PM The first sentence of the !discussion says: The accessibility rule of E.2.3(8) is intended to prevent pointers being created in a shared-passive package that poing "back" into the data area of some particular active partition. "poing" is a new term for Ada, even informally. :-) I presume you mean "pointing", right? **************************************************************** From: Randy Brukardt Sent: Thursday, November 29, 2012 8:15 PM Upon further reflection, you probably meant "point" (no "ing"). **************************************************************** From: Tucker Taft Sent: Thursday, November 29, 2012 8:16 PM > "poing" is a new term for Ada, even informally. :-) I presume you mean > "pointing", right? Oops. I meant "point". ****************************************************************