Source Code to Object Code Traceability Study Release 1.0 Use of Terms See - Document ID: TEC.PB04-045, Issue 1.0 Example Adacore 2017, (C)

Source Code to Object Code Traceability Study Release 1.0 Use of Terms See - Document ID: TEC.PB04-045, Issue 1.0 Example Adacore 2017, (C)

use of terms See - Source Code to Object Code Document ID: TEC.PB04-045, Issue 1.0 Example AdaCore Traceability Study 2017, (c) December 16, 2016 Release 1.0 Copyright (c) 2017, AdaCore All rights reserved. You are permitted to reproduce and redistribute this document, unmod- ified, for any purpose. All other uses, including modification, adaptation or translation, require prior approval by AdaCore. use ADACORE PROVIDES NO WARRANTY FOR THIS DOCUMENT, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THIS DOC- of UMENT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY terms AND USE OF THIS DOCUMENT IS WITH YOU. See IN NO EVENT, UNLESS SPECIFIED BY APPLICABLE LAW, WILL - ADACORE BE LIABLE FOR ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR INCORRECT USE OF THIS DOCUMENT, EVEN IF ADACORE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN PARTICULAR, THIS DOCUMENT IS MEANT AS A TECHNICAL EXAMPLE AND SHOULD NOT BE USED AS IS FOR THE CERTIFI- Example CATION OF ANY CRITICAL SYSTEM. AdaCore 2017, (c) Source Code to Object Code Traceability Study (version 1.0) CONTENTS use 1 Revision history 7 of 2 Introduction 9 2.1 Context ................................................ 9 2.1.1 Compiler Identification ................................... 9 2.1.2 Compilation Options and Restrictions ........................... 9 terms 2.1.3 Link Control ........................................ 10 2.2 Strategy ................................................ 10 See 2.2.1 Source to Object Code Traceability Analysis ........................ 10 2.2.2 Additional Verifications for Untraceable Code ....................... 11 - 2.3 Structure of the Document ...................................... 12 3 Ada Features Survey 13 3.1 General ................................................ 13 3.2 Lexical Elements ........................................... 13 3.3 Declarations ............................................. 13 Example 3.3.1 Declarations ......................................... 13 3.3.2 Types and Subtypes ..................................... 13 3.3.2.1 Subtype Predicates ................................. 13 3.3.3 Objects and Named Numbers ................................ 24 3.3.4 Derived Types and Classes ................................. 24 3.3.5 Scalar Types ......................................... 24 3.3.5.1 Enumeration Types ................................ 24 AdaCore 3.3.5.2 Character Types .................................. 29 3.3.5.3 Boolean Types ................................... 31 3.3.5.4 Integer Types ................................... 32 3.3.5.5 Operations of Discrete Types ........................... 45 2017, 3.3.5.6 Real Types ..................................... 47 3.3.5.7 Floating Point Types ................................ 47 3.3.5.8 Operations of Floating Point Types ........................ 48 (c) 3.3.5.9 Fixed Point Types ................................. 49 3.3.5.10 Operations of Fixed Point Types ......................... 50 3.3.6 Array Types ......................................... 52 3.3.6.1 Index Constraints and Discrete Ranges ...................... 59 3.3.6.2 Operations of Array Types ............................ 67 3.3.6.3 String Types .................................... 69 3.3.7 Discriminants ........................................ 72 3.3.7.1 Discriminant Constraints ............................. 75 3.3.7.2 Operations of Discriminated Types ........................ 76 3.3.8 Record Types ........................................ 77 3.3.8.1 Variant Parts and Discrete Choices ........................ 84 3.3.9 Tagged Types and Type Extensions ............................. 87 3.3.9.1 Type Extensions ..................................101 TEC.PB04-045 1 of 545 3.3.9.2 Dispatching Operations of Tagged Types .....................108 3.3.9.3 Abstract Types and Subprograms .........................125 3.3.9.4 Interface Types ..................................136 3.3.10 Access Types ........................................146 3.3.10.1 Incomplete Type Declarations ...........................150 3.3.10.2 Operations of Access Types ............................151 3.3.11 Declarative Parts ......................................158 3.4 Names and Expressions .......................................158 3.4.1 Names ............................................158 3.4.1.1 Indexed Components ...............................158 3.4.1.2 Slices ........................................164 3.4.1.3 Selected Components ...............................168 3.4.1.4 Attributes .....................................170 3.4.1.5 User Defined References .............................170 3.4.1.6 User Defined Indexing ...............................175 use 3.4.2 Literals ...........................................177 3.4.3 Aggregates .........................................177 of 3.4.3.1 Record Aggregates ................................177 3.4.3.2 Extension Aggregates ...............................189 3.4.3.3 Array Aggregates .................................192 3.4.4 Expressions .........................................198 terms 3.4.5 Operators and Expression Evaluation ............................198 3.4.5.1 Logical Operators and Short ............................198 3.4.5.2 Relational Operators and Membership Tests ...................201 See 3.4.5.3 Binary Adding Operators .............................211 - 3.4.5.4 Unary Adding Operators .............................212 3.4.5.5 Multiplying Operators ...............................213 3.4.5.6 Highest Precedence Operators ...........................217 3.4.5.7 Conditional Expressions ..............................219 3.4.5.8 Quantified Expressions ..............................227 3.4.6 Type Conversions ......................................232 3.4.7 Qualified Expressions ....................................244 Example 3.4.8 Allocators ..........................................252 3.4.9 Static Expressions and Static Subtypes ...........................264 3.5 Statements ..............................................264 3.5.1 Simple and Compound Statements .............................264 3.5.2 Assignment Statements ...................................264 3.5.3 If Statements ........................................276 3.5.4 Case Statements .......................................278 AdaCore 3.5.5 Loop Statements ......................................284 3.5.5.1 User Defined Iterator Types ............................290 3.5.5.2 Generalized Loop Iteration ............................290 3.5.6 Block Statements ......................................293 2017, 3.5.7 Exit Statements .......................................294 3.5.8 Goto Statements .......................................295 (c) 3.6 Subprograms .............................................295 3.6.1 Subprogram Declarations ..................................295 3.6.1.1 Preconditions and Postconditions .........................301 3.6.2 Formal Parameter Modes ..................................305 3.6.3 Subprogram Bodies .....................................305 3.6.3.1 Conformance Rules ................................315 3.6.3.2 Inline Expansion of Subprograms .........................315 3.6.4 Subprogram Calls ......................................316 3.6.4.1 Parameter Associations ..............................321 3.6.5 Return Statements ......................................322 3.6.6 Overloading of Operators ..................................325 3.6.7 Null Procedures .......................................325 3.6.8 Expression Functions ....................................329 3.7 Packages ...............................................332 3.7.1 Package Specifications and Declarations ..........................332 3.7.2 Package Bodies .......................................333 3.7.3 Private Types and Private Extensions ............................334 3.7.3.1 Private Operations .................................335 3.7.3.2 Type Invariants ..................................336 3.7.4 Deferred Constants .....................................343 3.7.5 Limited Types ........................................344 3.7.6 User-Defined Assignment and Finalization .........................345 3.8 Visibility Rules ............................................345 3.8.1 Declarative Region .....................................345 3.8.2 Scope of Declarations ....................................345 3.8.3 Visibility ..........................................345 3.8.4 Use Clauses .........................................345 3.8.5 Renaming Declarations ...................................347 use 3.8.5.1 Object Renaming Declarations ..........................347 3.8.5.2 Exception Renaming Declarations ........................348 of 3.8.5.3 Package Renaming Declarations .........................349 3.8.5.4 Subprogram Renaming Declarations .......................350 3.8.5.5 Generic Renaming Declarations ..........................352 3.8.6 The Context of Overload Resolution ............................355 terms 3.9 Tasks and Synchronization ......................................355 3.10 Program Structure and Compilation Issues .............................355 3.10.1 Separate Compilation ....................................355 See 3.10.1.1 Compilation Units .................................355 - 3.10.1.2 Context Clauses ..................................356 3.10.1.3 Subunits of Compilation

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    37 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us