Current: Free Programming Books » Programming Languages » Ada Reference Manual ISO/IEC 8652:2012(E)

Ada Reference Manual ISO/IEC 8652:2012(E)

Title
Ada Reference Manual ISO/IEC 8652:2012(E)
Subtitle
Language and Standard Libraries
Pages
947
Read
PDF
http://www.ada-auth.org/standards/12rm/RM-Final.pdf

Preface/Excerpt:

This is the Ada Reference Manual.

Other available Ada documents include:

  • Ada 2012 Rationale. This gives an introduction to the changes and new features in Ada 2012, and explains the rationale behind them. Programmers should read this rationale before reading this Standard in depth. Rationales for Ada 83, Ada 95, and Ada 2005 are also available.
  • This paragraph was deleted.
  • The Annotated Ada Reference Manual (AARM). The AARM contains all of the text in this

International Standard, plus various annotations. It is intended primarily for compiler writers, validation test writers, and others who wish to study the fine details. The annotations include detailed rationale for individual rules and explanations of some of the more arcane interactions among the rules.

Table of Contents:
Table of Contents............................................................................................................i
Foreword........................................................................................................................xi
Introduction ..................................................................................................................xii
1 General.......................................................................................................................1
1.1 Scope .............................................................................................................................................1
1.1.1 Extent......................................................................................................................................1
1.1.2 Structure.................................................................................................................................2
1.1.3 Conformity of an Implementation with the Standard.........................................................4
1.1.4 Method of Description and Syntax Notation.......................................................................5
1.1.5 Classification of Errors .........................................................................................................7
1.2 Normative References ..................................................................................................................8
1.3 Terms and Definitions ..................................................................................................................8
2 Lexical Elements.....................................................................................................11
2.1 Character Set...............................................................................................................................11
2.2 Lexical Elements, Separators, and Delimiters.........................................................................13
2.3 Identifiers .....................................................................................................................................14
2.4 Numeric Literals..........................................................................................................................15
2.4.1 Decimal Literals ...................................................................................................................15
2.4.2 Based Literals ......................................................................................................................16
2.5 Character Literals .......................................................................................................................16
2.6 String Literals..............................................................................................................................17
2.7 Comments....................................................................................................................................17
2.8 Pragmas .......................................................................................................................................18
2.9 Reserved Words..........................................................................................................................20
3 Declarations and Types..........................................................................................21
3.1 Declarations.................................................................................................................................21
3.2 Types and Subtypes ...................................................................................................................22
3.2.1 Type Declarations................................................................................................................24
3.2.2 Subtype Declarations..........................................................................................................25
3.2.3 Classification of Operations...............................................................................................26
3.2.4 Subtype Predicates .............................................................................................................27
3.3 Objects and Named Numbers....................................................................................................29
3.3.1 Object Declarations.............................................................................................................31
3.3.2 Number Declarations...........................................................................................................33
3.4 Derived Types and Classes .......................................................................................................34
3.4.1 Derivation Classes...............................................................................................................37
3.5 Scalar Types................................................................................................................................39
3.5.1 Enumeration Types .............................................................................................................44
3.5.2 Character Types...................................................................................................................45
3.5.3 Boolean Types .....................................................................................................................46
3.5.4 Integer Types .......................................................................................................................46
3.5.5 Operations of Discrete Types.............................................................................................49
3.5.6 Real Types............................................................................................................................50
3.5.7 Floating Point Types ...........................................................................................................51
3.5.8 Operations of Floating Point Types...................................................................................53
3.5.9 Fixed Point Types................................................................................................................53
ISO/IEC 8652:2012(E) — Ada Reference Manual
Table of Contents 13 December 2012 ii
3.5.10 Operations of Fixed Point Types..................................................................................... 55
3.6 Array Types ................................................................................................................................. 56
3.6.1 Index Constraints and Discrete Ranges........................................................................... 59
3.6.2 Operations of Array Types ................................................................................................. 60
3.6.3 String Types......................................................................................................................... 61
3.7 Discriminants.............................................................................................................................. 62
3.7.1 Discriminant Constraints ................................................................................................... 64
3.7.2 Operations of Discriminated Types .................................................................................. 65
3.8 Record Types.............................................................................................................................. 66
3.8.1 Variant Parts and Discrete Choices .................................................................................. 68
3.9 Tagged Types and Type Extensions ........................................................................................ 70
3.9.1 Type Extensions.................................................................................................................. 74
3.9.2 Dispatching Operations of Tagged Types........................................................................ 75
3.9.3 Abstract Types and Subprograms .................................................................................... 78
3.9.4 Interface Types.................................................................................................................... 79
3.10 Access Types............................................................................................................................ 82
3.10.1 Incomplete Type Declarations ......................................................................................... 84
3.10.2 Operations of Access Types............................................................................................ 87
3.11 Declarative Parts ...................................................................................................................... 93
3.11.1 Completions of Declarations ........................................................................................... 93
4 Names and Expressions ........................................................................................95
4.1 Names.......................................................................................................................................... 95
4.1.1 Indexed Components.......................................................................................................... 96
4.1.2 Slices .................................................................................................................................... 97
4.1.3 Selected Components ........................................................................................................ 98
4.1.4 Attributes............................................................................................................................ 100
4.1.5 User-Defined References ................................................................................................. 101
4.1.6 User-Defined Indexing ...................................................................................................... 102
4.2 Literals ....................................................................................................................................... 104
4.3 Aggregates................................................................................................................................ 105
4.3.1 Record Aggregates ........................................................................................................... 105
4.3.2 Extension Aggregates ...................................................................................................... 107
4.3.3 Array Aggregates .............................................................................................................. 109
4.4 Expressions .............................................................................................................................. 112
4.5 Operators and Expression Evaluation ................................................................................... 113
4.5.1 Logical Operators and Short-circuit Control Forms ..................................................... 114
4.5.2 Relational Operators and Membership Tests ................................................................ 115
4.5.3 Binary Adding Operators ................................................................................................. 119
4.5.4 Unary Adding Operators .................................................................................................. 120
4.5.5 Multiplying Operators ....................................................................................................... 120
4.5.6 Highest Precedence Operators ....................................................................................... 123
4.5.7 Conditional Expressions..................................................................................................124
4.5.8 Quantified Expressions .................................................................................................... 125
4.6 Type Conversions .................................................................................................................... 126
4.7 Qualified Expressions.............................................................................................................. 131
4.8 Allocators .................................................................................................................................. 131
4.9 Static Expressions and Static Subtypes................................................................................ 134
4.9.1 Statically Matching Constraints and Subtypes.............................................................. 138
5 Statements.............................................................................................................139
5.1 Simple and Compound Statements - Sequences of Statements ........................................ 139
5.2 Assignment Statements........................................................................................................... 140
5.3 If Statements ............................................................................................................................. 142
ISO/IEC 8652:2012(E) — Ada Reference Manual
iii 13 December 2012 Table of Contents
5.4 Case Statements .......................................................................................................................143
5.5 Loop Statements.......................................................................................................................144
5.5.1 User-Defined Iterator Types .............................................................................................146
5.5.2 Generalized Loop Iteration ...............................................................................................147
5.6 Block Statements......................................................................................................................149
5.7 Exit Statements .........................................................................................................................149
5.8 Goto Statements .......................................................................................................................150
6 Subprograms.........................................................................................................153
6.1 Subprogram Declarations........................................................................................................153
6.1.1 Preconditions and Postconditions ..................................................................................156
6.2 Formal Parameter Modes.........................................................................................................159
6.3 Subprogram Bodies..................................................................................................................160
6.3.1 Conformance Rules...........................................................................................................161
6.3.2 Inline Expansion of Subprograms ...................................................................................163
6.4 Subprogram Calls .....................................................................................................................163
6.4.1 Parameter Associations....................................................................................................165
6.5 Return Statements ....................................................................................................................168
6.5.1 Nonreturning Procedures.................................................................................................171
6.6 Overloading of Operators ........................................................................................................172
6.7 Null Procedures ........................................................................................................................173
6.8 Expression Functions ..............................................................................................................174
7 Packages................................................................................................................175
7.1 Package Specifications and Declarations..............................................................................175
7.2 Package Bodies ........................................................................................................................176
7.3 Private Types and Private Extensions....................................................................................177
7.3.1 Private Operations.............................................................................................................180
7.3.2 Type Invariants...................................................................................................................182
7.4 Deferred Constants...................................................................................................................184
7.5 Limited Types............................................................................................................................185
7.6 Assignment and Finalization ...................................................................................................187
7.6.1 Completion and Finalization.............................................................................................189
8 Visibility Rules.......................................................................................................193
8.1 Declarative Region....................................................................................................................193
8.2 Scope of Declarations ..............................................................................................................194
8.3 Visibility......................................................................................................................................195
8.3.1 Overriding Indicators ........................................................................................................198
8.4 Use Clauses...............................................................................................................................199
8.5 Renaming Declarations............................................................................................................200
8.5.1 Object Renaming Declarations ........................................................................................200
8.5.2 Exception Renaming Declarations ..................................................................................202
8.5.3 Package Renaming Declarations.....................................................................................202
8.5.4 Subprogram Renaming Declarations..............................................................................203
8.5.5 Generic Renaming Declarations ......................................................................................205
8.6 The Context of Overload Resolution ......................................................................................205
9 Tasks and Synchronization .................................................................................209
9.1 Task Units and Task Objects...................................................................................................209
9.2 Task Execution - Task Activation............................................................................................212
9.3 Task Dependence - Termination of Tasks..............................................................................213
9.4 Protected Units and Protected Objects..................................................................................215
9.5 Intertask Communication.........................................................................................................218
ISO/IEC 8652:2012(E) — Ada Reference Manual
Table of Contents 13 December 2012 iv
9.5.1 Protected Subprograms and Protected Actions............................................................220
9.5.2 Entries and Accept Statements ....................................................................................... 221
9.5.3 Entry Calls.......................................................................................................................... 224
9.5.4 Requeue Statements......................................................................................................... 227
9.6 Delay Statements, Duration, and Time................................................................................... 228
9.6.1 Formatting, Time Zones, and other operations for Time.............................................. 231
9.7 Select Statements..................................................................................................................... 237
9.7.1 Selective Accept................................................................................................................ 238
9.7.2 Timed Entry Calls.............................................................................................................. 240
9.7.3 Conditional Entry Calls..................................................................................................... 241
9.7.4 Asynchronous Transfer of Control ................................................................................. 241
9.8 Abort of a Task - Abort of a Sequence of Statements.......................................................... 242
9.9 Task and Entry Attributes........................................................................................................ 244
9.10 Shared Variables .................................................................................................................... 244
9.11 Example of Tasking and Synchronization........................................................................... 246
10 Program Structure and Compilation Issues ....................................................249
10.1 Separate Compilation............................................................................................................. 249
10.1.1 Compilation Units - Library Units.................................................................................. 249
10.1.2 Context Clauses - With Clauses .................................................................................... 252
10.1.3 Subunits of Compilation Units ...................................................................................... 254
10.1.4 The Compilation Process............................................................................................... 256
10.1.5 Pragmas and Program Units.......................................................................................... 257
10.1.6 Environment-Level Visibility Rules ............................................................................... 258
10.2 Program Execution................................................................................................................. 259
10.2.1 Elaboration Control......................................................................................................... 261
11 Exceptions...........................................................................................................265
11.1 Exception Declarations.......................................................................................................... 265
11.2 Exception Handlers................................................................................................................ 266
11.3 Raise Statements.................................................................................................................... 267
11.4 Exception Handling................................................................................................................ 267
11.4.1 The Package Exceptions................................................................................................ 268
11.4.2 Pragmas Assert and Assertion_Policy ......................................................................... 270
11.4.3 Example of Exception Handling .................................................................................... 273
11.5 Suppressing Checks.............................................................................................................. 274
11.6 Exceptions and Optimization................................................................................................ 277
12 Generic Units.......................................................................................................279
12.1 Generic Declarations.............................................................................................................. 279
12.2 Generic Bodies ....................................................................................................................... 281
12.3 Generic Instantiation.............................................................................................................. 282
12.4 Formal Objects ....................................................................................................................... 284
12.5 Formal Types .......................................................................................................................... 286
12.5.1 Formal Private and Derived Types ................................................................................ 287
12.5.2 Formal Scalar Types ....................................................................................................... 290
12.5.3 Formal Array Types......................................................................................................... 290
12.5.4 Formal Access Types .....................................................................................................291
12.5.5 Formal Interface Types................................................................................................... 292
12.6 Formal Subprograms ............................................................................................................. 292
12.7 Formal Packages.................................................................................................................... 295
12.8 Example of a Generic Package ............................................................................................. 297
13 Representation Issues .......................................................................................299
ISO/IEC 8652:2012(E) — Ada Reference Manual
v 13 December 2012 Table of Contents
13.1 Operational and Representation Aspects ............................................................................299
13.1.1 Aspect Specifications .....................................................................................................302
13.2 Packed Types ..........................................................................................................................305
13.3 Operational and Representation Attributes .........................................................................306
13.4 Enumeration Representation Clauses..................................................................................312
13.5 Record Layout.........................................................................................................................313
13.5.1 Record Representation Clauses ....................................................................................314
13.5.2 Storage Place Attributes.................................................................................................316
13.5.3 Bit Ordering......................................................................................................................317
13.6 Change of Representation .....................................................................................................318
13.7 The Package System ..............................................................................................................319
13.7.1 The Package System.Storage_Elements ......................................................................321
13.7.2 The Package System.Address_To_Access_Conversions ..........................................322
13.8 Machine Code Insertions .......................................................................................................322
13.9 Unchecked Type Conversions ..............................................................................................323
13.9.1 Data Validity .....................................................................................................................324
13.9.2 The Valid Attribute...........................................................................................................326
13.10 Unchecked Access Value Creation.....................................................................................326
13.11 Storage Management............................................................................................................327
13.11.1 Storage Allocation Attributes.......................................................................................330
13.11.2 Unchecked Storage Deallocation ................................................................................331
13.11.3 Default Storage Pools ...................................................................................................332
13.11.4 Storage Subpools..........................................................................................................333
13.11.5 Subpool Reclamation....................................................................................................335
13.11.6 Storage Subpool Example............................................................................................336
13.12 Pragma Restrictions and Pragma Profile...........................................................................338
13.12.1 Language-Defined Restrictions and Profiles .............................................................340
13.13 Streams..................................................................................................................................342
13.13.1 The Package Streams ...................................................................................................342
13.13.2 Stream-Oriented Attributes ..........................................................................................343
13.14 Freezing Rules ......................................................................................................................348
The Standard Libraries..............................................................................................351
Annex A (normative) Predefined Language Environment ......................................353
A.1 The Package Standard.............................................................................................................356
A.2 The Package Ada......................................................................................................................360
A.3 Character Handling ..................................................................................................................360
A.3.1 The Packages Characters, Wide_Characters, and Wide_Wide_Characters...............361
A.3.2 The Package Characters.Handling..................................................................................361
A.3.3 The Package Characters.Latin_1.....................................................................................364
A.3.4 The Package Characters.Conversions ...........................................................................369
A.3.5 The Package Wide_Characters.Handling.......................................................................371
A.3.6 The Package Wide_Wide_Characters.Handling ............................................................373
A.4 String Handling.........................................................................................................................374
A.4.1 The Package Strings.........................................................................................................374
A.4.2 The Package Strings.Maps ..............................................................................................374
A.4.3 Fixed-Length String Handling..........................................................................................377
A.4.4 Bounded-Length String Handling ...................................................................................386
A.4.5 Unbounded-Length String Handling...............................................................................393
A.4.6 String-Handling Sets and Mappings ...............................................................................398
A.4.7 Wide_String Handling.......................................................................................................399
A.4.8 Wide_Wide_String Handling ............................................................................................401
A.4.9 String Hashing...................................................................................................................404
ISO/IEC 8652:2012(E) — Ada Reference Manual
Table of Contents 13 December 2012 vi
A.4.10 String Comparison ......................................................................................................... 405
A.4.11 String Encoding.............................................................................................................. 406
A.5 The Numerics Packages.......................................................................................................... 411
A.5.1 Elementary Functions ...................................................................................................... 412
A.5.2 Random Number Generation........................................................................................... 415
A.5.3 Attributes of Floating Point Types.................................................................................. 420
A.5.4 Attributes of Fixed Point Types ...................................................................................... 424
A.6 Input-Output ............................................................................................................................. 425
A.7 External Files and File Objects............................................................................................... 425
A.8 Sequential and Direct Files..................................................................................................... 426
A.8.1 The Generic Package Sequential_IO .............................................................................. 427
A.8.2 File Management............................................................................................................... 428
A.8.3 Sequential Input-Output Operations .............................................................................. 430
A.8.4 The Generic Package Direct_IO ...................................................................................... 430
A.8.5 Direct Input-Output Operations....................................................................................... 431
A.9 The Generic Package Storage_IO .......................................................................................... 432
A.10 Text Input-Output................................................................................................................... 433
A.10.1 The Package Text_IO .....................................................................................................434
A.10.2 Text File Management ....................................................................................................439
A.10.3 Default Input, Output, and Error Files .......................................................................... 440
A.10.4 Specification of Line and Page Lengths ......................................................................441
A.10.5 Operations on Columns, Lines, and Pages ................................................................. 442
A.10.6 Get and Put Procedures................................................................................................. 445
A.10.7 Input-Output of Characters and Strings....................................................................... 447
A.10.8 Input-Output for Integer Types...................................................................................... 449
A.10.9 Input-Output for Real Types .......................................................................................... 450
A.10.10 Input-Output for Enumeration Types ......................................................................... 453
A.10.11 Input-Output for Bounded Strings.............................................................................. 454
A.10.12 Input-Output for Unbounded Strings ......................................................................... 456
A.11 Wide Text Input-Output and Wide Wide Text Input-Output............................................... 457
A.12 Stream Input-Output.............................................................................................................. 458
A.12.1 The Package Streams.Stream_IO ................................................................................. 458
A.12.2 The Package Text_IO.Text_Streams............................................................................. 460
A.12.3 The Package Wide_Text_IO.Text_Streams.................................................................. 461
A.12.4 The Package Wide_Wide_Text_IO.Text_Streams ....................................................... 461
A.13 Exceptions in Input-Output................................................................................................... 461
A.14 File Sharing............................................................................................................................. 463
A.15 The Package Command_Line............................................................................................... 463
A.16 The Package Directories ....................................................................................................... 464
A.16.1 The Package Directories.Hierarchical_File_Names.................................................... 472
A.17 The Package Environment_Variables.................................................................................. 474
A.18 Containers .............................................................................................................................. 477
A.18.1 The Package Containers................................................................................................ 477
A.18.2 The Generic Package Containers.Vectors................................................................... 477
A.18.3 The Generic Package Containers.Doubly_Linked_Lists............................................ 495
A.18.4 Maps................................................................................................................................. 506
A.18.5 The Generic Package Containers.Hashed_Maps........................................................ 513
A.18.6 The Generic Package Containers.Ordered_Maps....................................................... 517
A.18.7 Sets .................................................................................................................................. 521
A.18.8 The Generic Package Containers.Hashed_Sets ......................................................... 529
A.18.9 The Generic Package Containers.Ordered_Sets ........................................................ 534
A.18.10 The Generic Package Containers.Multiway_Trees ...................................................540
A.18.11 The Generic Package Containers.Indefinite_Vectors............................................... 554
ISO/IEC 8652:2012(E) — Ada Reference Manual
vii 13 December 2012 Table of Contents
A.18.12 The Generic Package Containers.Indefinite_Doubly_Linked_Lists........................555
A.18.13 The Generic Package Containers.Indefinite_Hashed_Maps....................................555
A.18.14 The Generic Package Containers.Indefinite_Ordered_Maps ...................................556
A.18.15 The Generic Package Containers.Indefinite_Hashed_Sets......................................556
A.18.16 The Generic Package Containers.Indefinite_Ordered_Sets.....................................556
A.18.17 The Generic Package Containers.Indefinite_Multiway_Trees .................................557
A.18.18 The Generic Package Containers.Indefinite_Holders...............................................557
A.18.19 The Generic Package Containers.Bounded_Vectors ...............................................561
A.18.20 The Generic Package Containers.Bounded_Doubly_Linked_Lists ........................562
A.18.21 The Generic Package Containers.Bounded_Hashed_Maps ....................................563
A.18.22 The Generic Package Containers.Bounded_Ordered_Maps ...................................564
A.18.23 The Generic Package Containers.Bounded_Hashed_Sets......................................565
A.18.24 The Generic Package Containers.Bounded_Ordered_Sets.....................................567
A.18.25 The Generic Package Containers.Bounded_Multiway_Trees..................................568
A.18.26 Array Sorting .................................................................................................................570
A.18.27 The Generic Package Containers.Synchronized_Queue_Interfaces ......................571
A.18.28 The Generic Package Containers.Unbounded_Synchronized_Queues .................572
A.18.29 The Generic Package Containers.Bounded_Synchronized_Queues......................573
A.18.30 The Generic Package Containers.Unbounded_Priority_Queues ............................574
A.18.31 The Generic Package Containers.Bounded_Priority_Queues.................................575
A.18.32 Example of Container Use ...........................................................................................576
A.19 The Package Locales.............................................................................................................578
Annex B (normative) Interface to Other Languages................................................581
B.1 Interfacing Aspects ..................................................................................................................581
B.2 The Package Interfaces ...........................................................................................................584
B.3 Interfacing with C and C++......................................................................................................585
B.3.1 The Package Interfaces.C.Strings...................................................................................593
B.3.2 The Generic Package Interfaces.C.Pointers ..................................................................596
B.3.3 Unchecked Union Types ..................................................................................................599
B.4 Interfacing with COBOL...........................................................................................................601
B.5 Interfacing with Fortran ...........................................................................................................607
Annex C (normative) Systems Programming...........................................................611
C.1 Access to Machine Operations...............................................................................................611
C.2 Required Representation Support..........................................................................................612
C.3 Interrupt Support......................................................................................................................612
C.3.1 Protected Procedure Handlers ........................................................................................614
C.3.2 The Package Interrupts ....................................................................................................616
C.4 Preelaboration Requirements .................................................................................................618
C.5 Pragma Discard_Names ..........................................................................................................619
C.6 Shared Variable Control ..........................................................................................................620
C.7 Task Information ......................................................................................................................622
C.7.1 The Package Task_Identification ....................................................................................622
C.7.2 The Package Task_Attributes..........................................................................................624
C.7.3 The Package Task_Termination ......................................................................................626
Annex D (normative) Real-Time Systems .................................................................629
D.1 Task Priorities...........................................................................................................................629
D.2 Priority Scheduling ..................................................................................................................631
D.2.1 The Task Dispatching Model ...........................................................................................631
D.2.2 Task Dispatching Pragmas..............................................................................................633
D.2.3 Preemptive Dispatching ...................................................................................................634
D.2.4 Non-Preemptive Dispatching...........................................................................................635
ISO/IEC 8652:2012(E) — Ada Reference Manual
Table of Contents 13 December 2012 viii
D.2.5 Round Robin Dispatching ............................................................................................... 637
D.2.6 Earliest Deadline First Dispatching................................................................................ 638
D.3 Priority Ceiling Locking........................................................................................................... 640
D.4 Entry Queuing Policies............................................................................................................ 642
D.5 Dynamic Priorities ................................................................................................................... 644
D.5.1 Dynamic Priorities for Tasks........................................................................................... 644
D.5.2 Dynamic Priorities for Protected Objects ...................................................................... 645
D.6 Preemptive Abort ..................................................................................................................... 646
D.7 Tasking Restrictions................................................................................................................ 647
D.8 Monotonic Time ....................................................................................................................... 649
D.9 Delay Accuracy ........................................................................................................................ 653
D.10 Synchronous Task Control................................................................................................... 654
D.10.1 Synchronous Barriers....................................................................................................655
D.11 Asynchronous Task Control.................................................................................................656
D.12 Other Optimizations and Determinism Rules ..................................................................... 657
D.13 The Ravenscar Profile ........................................................................................................... 658
D.14 Execution Time ...................................................................................................................... 659
D.14.1 Execution Time Timers .................................................................................................. 661
D.14.2 Group Execution Time Budgets.................................................................................... 663
D.14.3 Execution Time of Interrupt Handlers .......................................................................... 665
D.15 Timing Events......................................................................................................................... 666
D.16 Multiprocessor Implementation ........................................................................................... 668
D.16.1 Multiprocessor Dispatching Domains.......................................................................... 669
Annex E (normative) Distributed Systems ...............................................................673
E.1 Partitions................................................................................................................................... 673
E.2 Categorization of Library Units .............................................................................................. 675
E.2.1 Shared Passive Library Units.......................................................................................... 676
E.2.2 Remote Types Library Units............................................................................................ 676
E.2.3 Remote Call Interface Library Units................................................................................ 678
E.3 Consistency of a Distributed System .................................................................................... 679
E.4 Remote Subprogram Calls...................................................................................................... 679
E.4.1 Asynchronous Remote Calls........................................................................................... 681
E.4.2 Example of Use of a Remote Access-to-Class-Wide Type........................................... 682
E.5 Partition Communication Subsystem.................................................................................... 684
Annex F (normative) Information Systems...............................................................687
F.1 Machine_Radix Attribute Definition Clause .......................................................................... 687
F.2 The Package Decimal............................................................................................................... 688
F.3 Edited Output for Decimal Types ........................................................................................... 689
F.3.1 Picture String Formation.................................................................................................. 690
F.3.2 Edited Output Generation ................................................................................................ 694
F.3.3 The Package Text_IO.Editing........................................................................................... 698
F.3.4 The Package Wide_Text_IO.Editing................................................................................ 701
F.3.5 The Package Wide_Wide_Text_IO.Editing ..................................................................... 701
Annex G (normative) Numerics .................................................................................703
G.1 Complex Arithmetic................................................................................................................. 703
G.1.1 Complex Types................................................................................................................. 703
G.1.2 Complex Elementary Functions ..................................................................................... 708
G.1.3 Complex Input-Output .....................................................................................................711
G.1.4 The Package Wide_Text_IO.Complex_IO ...................................................................... 714
G.1.5 The Package Wide_Wide_Text_IO.Complex_IO............................................................ 714
G.2 Numeric Performance Requirements .................................................................................... 714
ISO/IEC 8652:2012(E) — Ada Reference Manual
ix 13 December 2012 Table of Contents
G.2.1 Model of Floating Point Arithmetic .................................................................................715
G.2.2 Model-Oriented Attributes of Floating Point Types ......................................................716
G.2.3 Model of Fixed Point Arithmetic......................................................................................717
G.2.4 Accuracy Requirements for the Elementary Functions ...............................................719
G.2.5 Performance Requirements for Random Number Generation ....................................721
G.2.6 Accuracy Requirements for Complex Arithmetic..........................................................721
G.3 Vector and Matrix Manipulation..............................................................................................723
G.3.1 Real Vectors and Matrices ...............................................................................................723
G.3.2 Complex Vectors and Matrices .......................................................................................728
Annex H (normative) High Integrity Systems ...........................................................741
H.1 Pragma Normalize_Scalars .....................................................................................................741
H.2 Documentation of Implementation Decisions.......................................................................742
H.3 Reviewable Object Code .........................................................................................................742
H.3.1 Pragma Reviewable ..........................................................................................................742
H.3.2 Pragma Inspection_Point.................................................................................................743
H.4 High Integrity Restrictions ......................................................................................................744
H.5 Pragma Detect_Blocking.........................................................................................................746
H.6 Pragma Partition_Elaboration_Policy....................................................................................747
Annex J (normative) Obsolescent Features.............................................................749
J.1 Renamings of Library Units.....................................................................................................749
J.2 Allowed Replacements of Characters ....................................................................................749
J.3 Reduced Accuracy Subtypes ..................................................................................................750
J.4 The Constrained Attribute........................................................................................................751
J.5 ASCII...........................................................................................................................................751
J.6 Numeric_Error...........................................................................................................................752
J.7 At Clauses..................................................................................................................................752
J.7.1 Interrupt Entries.................................................................................................................752
J.8 Mod Clauses..............................................................................................................................754
J.9 The Storage_Size Attribute......................................................................................................754
J.10 Specific Suppression of Checks...........................................................................................754
J.11 The Class Attribute of Untagged Incomplete Types ...........................................................755
J.12 Pragma Interface.....................................................................................................................755
J.13 Dependence Restriction Identifiers ......................................................................................755
J.14 Character and Wide_Character Conversion Functions......................................................756
J.15 Aspect-related Pragmas.........................................................................................................756
J.15.1 Pragma Inline ...................................................................................................................756
J.15.2 Pragma No_Return ..........................................................................................................757
J.15.3 Pragma Pack ....................................................................................................................757
J.15.4 Pragma Storage_Size......................................................................................................757
J.15.5 Interfacing Pragmas ........................................................................................................758
J.15.6 Pragma Unchecked_Union.............................................................................................759
J.15.7 Pragmas Interrupt_Handler and Attach_Handler.........................................................759
J.15.8 Shared Variable Pragmas ...............................................................................................760
J.15.9 Pragma CPU .....................................................................................................................760
J.15.10 Pragma Dispatching_Domain ......................................................................................761
J.15.11 Pragmas Priority and Interrupt_Priority......................................................................761
J.15.12 Pragma Relative_Deadline............................................................................................762
J.15.13 Pragma Asynchronous .................................................................................................762
Annex K (informative) Language-Defined Aspects and Attributes ........................763
K.1 Language-Defined Aspects.....................................................................................................763
K.2 Language-Defined Attributes..................................................................................................766
ISO/IEC 8652:2012(E) — Ada Reference Manual
Table of Contents 13 December 2012 x
Annex L (informative) Language-Defined Pragmas.................................................783
Annex M (informative) Summary of Documentation Requirements ......................787
M.1 Specific Documentation Requirements ................................................................................ 787
M.2 Implementation-Defined Characteristics .............................................................................. 789
M.3 Implementation Advice ........................................................................................................... 796
Annex N (informative) Glossary.................................................................................805
Annex P (informative) Syntax Summary ...................................................................811
Annex Q (informative) Language-Defined Entities ..................................................845
Q.1 Language-Defined Packages..................................................................................................845
Q.2 Language-Defined Types and Subtypes............................................................................... 848
Q.3 Language-Defined Subprograms........................................................................................... 852
Q.4 Language-Defined Exceptions............................................................................................... 863
Q.5 Language-Defined Objects ..................................................................................................... 864
Index............................................................................................................................869