This Appendix defines how the Ada 95 restrictions, accessible through the predefined pragma Restrictions, are supported. Unsafe features such as run-time dispatching and heap management are not supported in the run-time system, so all the restrictions that are relevant for these features are set to True by default.
The implementation-defined pragma Profile may also be used to set and uset restrictions that correspond to a certain application area. The profiles supported are as follows:
Table A-1. Supported Profiles
Profile Name | Description |
---|---|
XGC | This is the default profile and offers the least restrictions. |
No_Run_Time | This profile prohibits all run-time system calls and is useful for safety-critical applications. |
Restricted_Run_Time | This severely restricts the use of non-deterministic language features and is suitable for general avionics applications. |
Ravenscar | This is the default profile. It allows a limited form of tasking that includes static tasks, protected objects, the delay until statement and interrupts. |
APEX | Prohibits exception handlers, allocators, all Ada tasking and IO. This profile is intended for use with the ARINC 653 Interface. |
Table A-2 gives the default set of restrictions. These correspond to the Ravenscar profile, and support a limited form of tasking with protected types and interrupts.
Table A-2. Profiles and Restrictions
Restriction | Ada 95 Reference Manual Section | Default | No_Runtime | Restricted_Runtime | Ravenscar | APEX |
---|---|---|---|---|---|---|
Immediate_Reclamation | RM H.4(10) | True | True | True | True | True |
No_Abort_Statements | RM D.7(5), H.4(2) | True | True | True | True | True |
No_Access_Subprograms | RM H.4(17) | False | False | False | False | False |
No_Allocators | RM H.4(7) | True | True | True | True | True |
No_Asynchronous_Control | RM D.7(10) | True | True | True | True | True |
No_Delay | RM H.4(21) | False | False | False | False | False |
No_Dispatch | RM H.4(19) | True | True | True | True | True |
No_Dynamic_Priorities | RM D.7(9) | True | True | True | True | True |
No_Exceptions | RM H.4(12) | False | False | False | False | False |
No_Exception_Handlers | XGC RM H.4(12) | True | True | True | True | True |
No_Fixed_Point | RM H.4(15) | False | False | False | False | False |
No_Floating_Point | RM H.4(14) | False | False | False | False | False |
No_Implementation_Attributes | XGC Ada specific | False | False | False | False | False |
No_Implementation_Pragmas | XGC Ada specific | False | False | False | False | False |
No_IO | RM H.4(20) | True | True | True | True | True |
No_Implicit_Heap_Allocations | RM D.7(8), H.4(2) | True | True | True | True | True |
No_Local_Allocators | RM H.4(8) | True | True | True | True | True |
No_Nested_Finalization | RM D.7(4) | True | True | True | True | True |
No_Protected_Types | RM H.4(5) | False | False | False | False | False |
No_Recursion | RM H.4(22) | True | True | True | True | True |
No_Reentrancy | RM H.4(23) | False | False | False | False | False |
No_Task_Allocators | RM D.7(7) | True | True | True | True | True |
No_Task_Hierarchy | RM D.7(3), H.4(2) | True | True | True | True | True |
No_Terminate_Alternatives | RM D.7(6) | True | True | True | True | True |
No_Unchecked_Access | RM H.4(18) | True | True | True | True | True |
No_Unchecked_Conversion | RM H.4(16) | False | False | False | False | False |
No_Unchecked_Deallocation | RM H.4(9) | True | True | True | True | True |
Simple_Barrier_Variables | Ravenscar specific | True | True | True | True | True |
No_Calendar | Ravenscar specific | True | True | True | True | True |
No_Relative_Delay | Ravenscar specific | True | True | True | True | True |
No_Protected_Type_Allocators | Ravenscar specific | True | True | True | True | True |
No_Local_Protected_Objects | Ravenscar specific | True | True | True | True | True |
No_Requeue | Ravenscar specific | True | True | True | True | True |
No_Select_Statements | Ravenscar specific | True | True | True | True | True |
No_Task_Attributes | Ravenscar specific | True | True | True | True | True |
No_Task_Termination | Ravenscar specific | True | True | True | True | True |
Table A-3 gives the restrictions concerning numerical limits.
Table A-3. Profiles and Numerical Restrictions
Restriction | Ada 95 Reference Manual Section | Default Value | No_Runtime | Minimal_Runtime | Ravenscar | APEX |
---|---|---|---|---|---|---|
Max_Asynchronous_Select_Nesting | RM D.7(18), H.4(2) | 0 | 0 | 0 | 0 | 0 |
Max_Protected_Entries | RM D.7(14) | 1 | 1 | 1 | 1 | 1 |
Max_Select_Alternatives | RM D.7(12) | 0 | 0 | 0 | 0 | 0 |
Max_Storage_At_Blocking | RM D.7(17) | 0 | 0 | 0 | 0 | 0 |
Max_Task_Entries | RM D.7(13), H.4(2) | 0 | 0 | 0 | 0 | 0 |
Max_Tasks | RM D.7(19), H.4(2) | Undefined | Undefined | Undefined | Undefined | Undefined |
Max_Entry_Queue_Depth | Ravenscar specific | 1 | 1 | 1 | 1 | 1 |
Violation of the restriction Max_Entry_Queue_Depth is detected at run time and raises the predefined exception Program_Error.