!standard 10.2.1(9.1/5)                                    24-02-12  AI22-0094-1/01

!standard 11.4.2(28/5)

!class Binding Interpretation 24-02-12

!status work item 23-12-14

!status received 23-12-14

!priority Low

!difficulty Easy

!qualifier Clarification

!subject  Assertion policy and preelaborability


Confirm that assertion policy has no effect on preelaborability.


In the discussion of AI22-0051, it was pointed out that adding or deleting an Assertion_Policy pragma should not change the preelaborability of any elaborable construct.


State explicitly (as is already done in a similar case for freezing rules) that Assertion_Policy  pragmas are ignored in determining preelaborability, and that instead all relevant assertion policies are assumed to be Check. In the “Language Design Principles” section of 11.4.2, state the general principle that a (legal) Assertion_Policy pragma should have no effect on the legality or the static semantics of any construct.


 Add after 10.2.1(9.1/5):

In determining whether the elaboration of an elaborable construct performs some action, an assertion policy of Check is assumed to be in effect everywhere and for all assertion aspects.  [Redundant: Assertion_Policy pragmas are ignored in this determination.]

   Add after 11.4.2(28/5)[a]:

NOTE 2: Adding or deleting a legal Assertion_Policy pragma has no impact on the legality or the static semantics of any construct. In particular, the rules pertaining to freezing (see 13.14) and the definition of preelaborability (see 10.2.1) are unaffected by Assertion_Policy pragmas.


Do we need to say something similar about restrictions? For example, a restriction violation of some sort in a disabled assertion?


package Example is

   pragma Preelaborate;

   pragma Assertion_Policy (Ignore);

   X : Integer := 111;

   Y : Integer := 222;
   pragma Assert (X < Y); -- disabled assertion not preelaborable

end Example;

!ACATS test

A B-test similar to the example above would be appropriate.



[a]Steve had this "in the Language Design Principles section". But that ends before this paragraph, and does not appear in the RM anyway. So either this should be an AARM note in a different place, or a user note given in the original place. I chose the latter.