Logo
  • About

Courses

  • Introduction to Ada
    • Introduction
      • History
      • Ada today
      • Philosophy
      • SPARK
    • Imperative Language
      • Hello world
      • Imperative language - If/Then/Else
      • Imperative language - Loops
        • For loops
        • Bare loops
        • While loops
      • Imperative language - Case statement
      • Imperative language - Declarative regions
      • Imperative language - conditional expressions
        • If expressions
        • Case expressions
    • Subprograms
      • Subprograms
        • Subprogram calls
        • Nested subprograms
        • Function calls
      • Parameter modes
      • Subprogram calls
        • In parameters
        • In out parameters
        • Out parameters
        • Forward declaration of subprograms
      • Renaming
    • Modular Programming
      • Packages
      • Using a package
      • Package body
      • Child packages
        • Child of a child package
        • Multiple children
        • Visibility
      • Renaming
    • Strongly Typed Language
      • What is a type?
      • Integers
        • Operational semantics
      • Unsigned types
      • Enumerations
      • Floating-point types
        • Basic properties
        • Precision of floating-point types
        • Range of floating-point types
      • Strong typing
      • Derived types
      • Subtypes
        • Subtypes as type aliases
    • Records
      • Record type declaration
      • Aggregates
      • Component selection
      • Renaming
    • Arrays
      • Array type declaration
      • Indexing
      • Simpler array declarations
      • Range attribute
      • Unconstrained arrays
      • Predefined array type: String
      • Restrictions
      • Returning unconstrained arrays
      • Declaring arrays (2)
      • Array slices
      • Renaming
    • More About Types
      • Aggregates: A primer
      • Overloading and qualified expressions
      • Character types
    • Access Types
      • Overview
      • Allocation (by type)
      • Dereferencing
      • Other features
      • Mutually recursive types
    • More About Records
      • Dynamically sized record types
      • Records with discriminant
      • Variant records
    • Fixed-Point Types
      • Decimal fixed-point types
      • Ordinary fixed-point types
    • Privacy
      • Basic encapsulation
      • Abstract data types
      • Limited types
      • Child packages & privacy
    • Generics
      • Introduction
      • Formal type declaration
      • Formal object declaration
      • Generic body definition
      • Generic instantiation
      • Generic packages
      • Formal subprograms
      • Example: I/O instances
      • Example: ADTs
      • Example: Swap
      • Example: Reversing
      • Example: Test application
    • Exceptions
      • Exception declaration
      • Raising an exception
      • Handling an exception
      • Predefined exceptions
    • Tasking
      • Tasks
        • Simple task
        • Simple synchronization
        • Delay
        • Synchronization: rendezvous
        • Select loop
        • Cycling tasks
      • Protected objects
        • Simple object
        • Entries
      • Task and protected types
        • Task types
        • Protected types
    • Design by contracts
      • Pre- and postconditions
      • Predicates
      • Type invariants
    • Interfacing With C
      • Multi-language project
      • Type convention
      • Foreign subprograms
        • Calling C subprograms in Ada
        • Calling Ada subprograms in C
      • Foreign variables
        • Using C global variables in Ada
        • Using Ada variables in C
      • Generating bindings
        • Adapting bindings
    • Object Oriented Programming
      • Derived types
      • Tagged types
      • Classwide types
      • Dispatching operations
      • Dot notation
      • Private & Limited
      • Classwide access types
    • Standard Library: Containers
      • Vectors
        • Instantiation
        • Initialization
        • Appending and prepending elements
        • Accessing first and last elements
        • Iterating
        • Finding and changing elements
        • Inserting elements
        • Removing elements
        • Other Operations
      • Sets
        • Initialization and iteration
        • Operations on elements
        • Other Operations
      • Indefinite maps
        • Hashed maps
        • Ordered maps
        • Complexity
    • Standard Library: Dates & Times
      • Date and time handling
        • Delaying using date
      • Real-time
        • Benchmarking
    • Standard Library: Strings
      • String operations
      • Limitation of fixed-length strings
      • Bounded strings
      • Unbounded strings
    • Standard Library: Files & Streams
      • Text I/O
      • Sequential I/O
      • Direct I/O
      • Stream I/O
    • Standard Library: Numerics
      • Elementary Functions
      • Random Number Generation
      • Complex Types
      • Vector and Matrix Manipulation
    • Appendices
      • Appendix A: Generic Formal Types
        • Indefinite version
      • Appendix B: Containers
  • Advanced Journey With Ada
    • Data types
      • Types
        • Names
        • Objects
        • Scalar Types
        • Enumerations
        • Universal and Root Types
        • Definite and Indefinite Subtypes
        • Incomplete types
        • Type view
        • Type conversion
        • Qualified Expressions
        • Default initial values
        • Deferred Constants
        • User-defined literals
      • Types and Representation
        • Enumeration Representation Clauses
        • Data Representation
        • Sizes
        • Alignment
        • Overlapping Storage
        • Packed Representation
        • Record Representation and storage clauses
        • Changing Data Representation
        • Valid Attribute
        • Unchecked Union
        • Addresses
        • Discarding names
      • Shared variable control
        • Volatile
        • Independent
        • Atomic
        • Full-access only
        • Atomic operations
      • Records
        • Default Initialization
        • Mutually dependent types
        • Null records
        • Record discriminants
        • Discriminant constraints and operations
        • Unknown discriminants
        • Unconstrained subtypes
        • Variant parts
        • Per-Object Expressions
      • Aggregates
        • Container Aggregates
        • Record aggregates
        • Full coverage rules for Aggregates
        • Array aggregates
        • Extension Aggregates
        • Delta Aggregates
      • Arrays
        • Array constraints
        • Multidimensional Arrays
        • Derived array types and array subtypes
      • Strings
        • Character and String Literals
        • Wide and Wide-Wide Strings
        • String Encoding
        • UTF-8 applications
        • Image attribute
        • Put_Image aspect
        • Universal text buffer
      • Numerics
        • Numeric Literals
        • Modular Types
        • Floating-Point Types
        • Fixed-Point Types
        • Big Numbers
    • Control Flow
      • Expressions
        • Expressions: Definition
        • Conditional Expressions
        • Quantified Expressions
        • Declare Expressions
        • Reduction Expressions
      • Statements
        • Simple and Compound Statements
        • Labels
        • Exit loop statement
        • If, case and loop statements
        • Block Statements
        • Extended return statement
      • Subprograms
        • Parameter Modes and Associations
        • Operators
        • Expression functions
        • Overloading
        • Operator Overloading
        • Operator Overriding
        • Nonreturning procedures
        • Inline subprograms
        • Null Procedures
      • Exceptions
        • Classification of Errors
        • Asserts
        • Assertion policies
        • Checks and exceptions
        • Ada.Exceptions package
        • Exception renaming
        • Out and Uninitialized
        • Suppressing checks
    • Modular programming
      • Packages
        • Package renaming
        • Private packages
        • Private with clauses
        • Limited Visibility
        • Visibility
        • Use type clause
        • Use clauses and naming conflicts
      • Subprograms and Modularity
        • Private subprograms
    • Resource Management
      • Access Types
        • Access types: Terminology
        • Access types: Allocation
        • Discriminants as Access Values
        • Parameters as Access Values
        • Self-reference
        • Mutually dependent types using access types
        • Dereferencing
        • Ragged arrays
        • Aliasing
        • Accessibility Levels and Rules: An Introduction
        • Unchecked Access
        • Unchecked Deallocation
        • Null & Not Null Access
        • Design strategies for access types
        • Access to subprograms
        • Accessibility Rules and Access-To-Subprograms
        • Access and Address
      • Anonymous Access Types
        • Named and Anonymous Access Types
        • Anonymous Access-To-Object Types
        • Access discriminants
        • Self-reference
        • Mutually dependent types using anonymous access types
        • Access parameters
        • User-Defined References
        • Anonymous Access Types and Accessibility Rules
        • Anonymous Access-To-Subprograms
        • Accessibility Rules and Anonymous Access-To-Subprograms
      • Limited Types
        • Assignment and equality
        • Limited private types
        • Explicitly limited types
        • Subtypes of Limited Types
        • Deriving from limited types
        • Immutably Limited Types
        • Limited Types with Discriminants
        • Record components of limited type
        • Limited types and aggregates
        • Constructor functions for limited types
        • Return objects
        • Building objects from constructors
        • Limited types as parameter
      • Controlled Types
        • Overview
        • Initialization
        • Assignment
        • Finalization
        • Controlled Types and Exception Handling
        • Applications of Controlled Types
  • Ada In Practice
    • Introduction
      • Assumptions
      • Definitions
        • Suppliers and Clients
        • Compile-time Visibility
        • Views
        • Partial and Full Views
    • Essential Design Idioms for Packages
      • Motivation
      • Implementation(s)
        • Named Collection of Declarations
        • Groups of Related Program Units
      • Notes
    • Abstract Data Types
      • Motivation
      • Implementation(s)
      • Pros
      • Cons
      • Relationship With Other Idioms
      • Notes
    • Abstract Data Machines
      • Motivation
      • Implementation(s)
      • Pros
      • Cons
    • Programming by Extension
      • Motivation
      • Implementation(s)
      • Pros
      • Cons
      • Relationship With Other Idioms
      • Notes
    • Constructor Functions For Abstract Data Types
      • Motivation
      • Implementation(s)
      • Pros
      • Cons
      • Relationship With Other Idioms
      • Notes
    • Controlling Object Initialization and Creation
      • Motivation
      • Implementation(s)
        • Compile-Time Legality
        • Run-Time Checks
        • Preventing Object Creation by Clients
      • Pros
      • Cons
      • Relationship With Other Idioms
      • Notes
    • Type Punning
      • Motivation
      • Implementation(s)
        • Overlays
        • Unchecked Conversions on Address Values
      • Pros
      • Cons
      • Relationship With Other Idioms
      • Notes
    • Expressing Inheritance Idioms
      • Motivation
        • Building Blocks
      • Implementation(s)
        • Subtype Inheritance
        • Implementation Inheritance
      • Pros
      • Cons
      • Relationship With Other Idioms
    • Providing Component Access to Enclosing Record Objects
      • Motivation
      • Implementation(s)
      • Real-World Example
      • Pros
      • Cons
      • Relationship With Other Idioms
      • Notes
      • Full Source Code for Selected Units
    • Interrupt Handling
      • Motivation
      • Implementation(s)
        • First Level Handler Alone
        • Task Notification Introduction
        • Task Notification With Communication
        • Task Notification Without Communication
      • Pros
      • Cons
      • Relationship With Other Idioms
      • What About Priorities?
      • Notes
    • Reducing Object Code from Generic Package Instantiations
      • Motivation
      • Implementation(s)
      • Pros
      • Cons
      • Relationship With Other Idioms
      • Notes
  • Introduction to SPARK
    • Overview
      • What is it?
      • What do the tools do?
      • Key Tools
      • A trivial example
      • The Programming Language
      • Limitations
        • No side-effects in expressions
        • No aliasing of names
      • Designating SPARK Code
      • Code Examples / Pitfalls
        • Example #1
        • Example #2
        • Example #3
        • Example #4
        • Example #5
        • Example #6
        • Example #7
        • Example #8
        • Example #9
        • Example #10
    • Flow Analysis
      • What does flow analysis do?
      • Errors Detected
        • Uninitialized Variables
        • Ineffective Statements
        • Incorrect Parameter Mode
      • Additional Verifications
        • Global Contracts
        • Depends Contracts
      • Shortcomings
        • Modularity
        • Composite Types
        • Value Dependency
        • Contract Computation
      • Code Examples / Pitfalls
        • Example #1
        • Example #2
        • Example #3
        • Example #4
        • Example #5
        • Example #6
        • Example #7
        • Example #8
        • Example #9
        • Example #10
    • Proof of Program Integrity
      • Runtime Errors
      • Modularity
        • Exceptions
      • Contracts
        • Executable Semantics
        • Additional Assertions and Contracts
      • Debugging Failed Proof Attempts
        • Debugging Errors in Code or Specification
        • Debugging Cases where more Information is Required
        • Debugging Prover Limitations
      • Code Examples / Pitfalls
        • Example #1
        • Example #2
        • Example #3
        • Example #4
        • Example #5
        • Example #6
        • Example #7
        • Example #8
        • Example #9
        • Example #10
    • State Abstraction
      • What's an Abstraction?
      • Why is Abstraction Useful?
      • Abstraction of a Package's State
      • Declaring a State Abstraction
      • Refining an Abstract State
      • Representing Private Variables
      • Additional State
        • Nested Packages
        • Constants that Depend on Variables
      • Subprogram Contracts
        • Global and Depends
        • Preconditions and Postconditions
      • Initialization of Local Variables
      • Code Examples / Pitfalls
        • Example #1
        • Example #2
        • Example #3
        • Example #4
        • Example #5
        • Example #6
        • Example #7
        • Example #8
        • Example #9
        • Example #10
    • Proof of Functional Correctness
      • Beyond Program Integrity
      • Advanced Contracts
        • Ghost Code
        • Ghost Functions
        • Global Ghost Variables
      • Guide Proof
        • Local Ghost Variables
        • Ghost Procedures
        • Handling of Loops
        • Loop Invariants
      • Code Examples / Pitfalls
        • Example #1
        • Example #2
        • Example #3
        • Example #4
        • Example #5
        • Example #6
        • Example #7
        • Example #8
        • Example #9
        • Example #10
  • Introduction to Embedded Systems Programming
    • Introduction
      • So, what will we actually cover?
      • Definitions
      • Down To The Bare Metal
      • The Ada Drivers Library
    • Low Level Programming
      • Separation Principle
      • Guaranteed Level of Support
      • Querying Implementation Limits and Characteristics
      • Querying Representation Choices
      • Specifying Representation
      • Unchecked Programming
      • Data Validity
    • Multi-Language Development
      • General Interfacing
        • Aspect/Pragma Convention
        • Aspect/Pragma Import and Export
        • Aspect/Pragma External_Name and Link_Name
        • Package Interfaces
      • Language-Specific Interfacing
        • Package Interfaces.C
        • Package Interfaces.C.Strings
        • Package Interfaces.C.Pointers
        • Package Interfaces.Fortran
        • Machine Code Insertions (MCI)
      • When Ada Is Not the Main Language
    • Interacting with Devices
      • Non-Memory-Mapped Devices
      • Memory-Mapped Devices
      • Dynamic Address Conversion
      • Address Arithmetic
    • General-Purpose Code Generators
      • Aspect Independent
      • Aspect Volatile
      • Aspect Atomic
      • Aspect Full_Access_Only
    • Handling Interrupts
      • Background
      • Language-Defined Interrupt Model
      • Interrupt Handlers
      • Interrupt Management
      • Associating Handlers With Interrupts
      • Interrupt Priorities
      • Common Design Idioms
        • Parameterizing Handlers
        • Multi-Level Handlers
      • Final Points
    • Conclusion
  • What's New in Ada 2022
    • Introduction
      • References
    • 'Image attribute for any type
      • 'Image attribute for a value
      • 'Image attribute for any type
      • References
    • Redefining the 'Image attribute
      • What's the Root_Buffer_Type?
      • Outdated draft implementation
      • References
    • User-Defined Literals
      • Turn Ada into JavaScript
      • References
    • Advanced Array Aggregates
      • Square brackets
      • Iterated Component Association
      • References
    • Container Aggregates
      • References
    • Delta Aggregates
      • Delta aggregate for records
      • Delta aggregate for arrays
      • References
    • Target Name Symbol (@)
      • Alternatives
      • References
    • Enumeration representation
      • Literal positions
      • Representation values
      • Before Ada 2022
      • References
    • Big Numbers
      • Big Integers
      • Tiny RSA implementation
      • Big Reals
      • References
    • Interfacing C variadic functions
      • References
  • Ada for the C++ or Java Developer
    • Preface
    • Basics
    • Compilation Unit Structure
    • Statements, Declarations, and Control Structures
      • Statements and Declarations
      • Conditions
      • Loops
    • Type System
      • Strong Typing
      • Language-Defined Types
      • Application-Defined Types
      • Type Ranges
      • Generalized Type Contracts: Subtype Predicates
      • Attributes
      • Arrays and Strings
      • Heterogeneous Data Structures
      • Pointers
    • Functions and Procedures
      • General Form
      • Overloading
      • Subprogram Contracts
    • Packages
      • Declaration Protection
      • Hierarchical Packages
      • Using Entities from Packages
    • Classes and Object Oriented Programming
      • Primitive Subprograms
      • Derivation and Dynamic Dispatch
      • Constructors and Destructors
      • Encapsulation
      • Abstract Types and Interfaces
      • Invariants
    • Generics
      • Generic Subprograms
      • Generic Packages
      • Generic Parameters
    • Exceptions
      • Standard Exceptions
      • Custom Exceptions
    • Concurrency
      • Tasks
      • Rendezvous
      • Selective Rendezvous
      • Protected Objects
    • Low Level Programming
      • Representation Clauses
      • Embedded Assembly Code
      • Interfacing with C
    • Conclusion
    • References
  • Ada for the Embedded C Developer
    • Introduction
      • So, what is this Ada thing anyway?
      • Ada — The Technical Details
    • The C Developer's Perspective
      • What we mean by Embedded Software
      • The GNAT Toolchain
      • The GNAT Toolchain for Embedded Targets
      • Hello World in Ada
      • The Ada Syntax
      • Compilation Unit Structure
      • Packages
        • Declaration Protection
        • Hierarchical Packages
        • Using Entities from Packages
      • Statements and Declarations
      • Conditions
      • Loops
      • Type System
        • Strong Typing
        • Language-Defined Types
        • Application-Defined Types
        • Type Ranges
        • Unsigned And Modular Types
        • Attributes
        • Arrays and Strings
        • Heterogeneous Data Structures
        • Pointers
      • Functions and Procedures
        • General Form
        • Overloading
        • Aspects
    • Concurrency and Real-Time
      • Understanding the various options
      • Tasks
      • Rendezvous
      • Selective Rendezvous
      • Protected Objects
      • Ravenscar
    • Writing Ada on Embedded Systems
      • Understanding the Ada Run-Time
      • Low Level Programming
        • Representation Clauses
        • Embedded Assembly Code
      • Interrupt Handling
      • Dealing with Absence of FPU with Fixed Point
      • Volatile and Atomic data
        • Volatile
        • Atomic
      • Interfacing with Devices
        • Size aspect and attribute
        • Register overlays
        • Data streams
      • ARM and svd2ada
    • Enhancing Verification with SPARK and Ada
      • Understanding Exceptions and Dynamic Checks
      • Understanding Dynamic Checks versus Formal Proof
      • Initialization and Correct Data Flow
      • Contract-Based Programming
      • Replacing Defensive Code
      • Proving Absence of Run-Time Errors
      • Proving Abstract Properties
      • Final Comments
    • C to Ada Translation Patterns
      • Naming conventions and casing considerations
      • Manually interfacing C and Ada
      • Building and Debugging mixed language code
      • Automatic interfacing
      • Using Arrays in C interfaces
      • By-value vs. by-reference types
      • Naming and prefixes
      • Pointers
      • Bitwise Operations
      • Mapping Structures to Bit-Fields
        • Overlays vs. Unchecked Conversions
    • Handling Variability and Re-usability
      • Understanding static and dynamic variability
      • Handling variability & reusability statically
        • Genericity
        • Simple derivation
        • Configuration pragma files
        • Configuration packages
      • Handling variability & reusability dynamically
        • Records with discriminants
        • Variant records
        • Object orientation
        • Pointer to subprograms
      • Design by components using dynamic libraries
    • Performance Considerations
      • Overall expectations
      • Switches and optimizations
        • Optimizations levels
        • Inlining
      • Checks and assertions
        • Checks
        • Assertions
      • Dynamic vs. static structures
      • Pointers vs. data copies
        • Function returns
    • Argumentation and Business Perspectives
      • What's the expected ROI of a C to Ada transition?
      • Who is using Ada today?
      • What is the future of the Ada technology?
      • Is the Ada toolset complete?
      • Where can I find Ada or SPARK developers?
      • How to introduce Ada and SPARK in an existing code base?
    • Conclusion
    • Hands-On: Object-Oriented Programming
      • System Overview
      • Non Object-Oriented Approach
        • Starting point in C
        • Initial translation to Ada
        • Improved Ada implementation
      • First Object-Oriented Approach
        • Interfaces
        • Base type
        • Derived types
        • Subprograms from parent
        • Type AB
        • Updated source-code
      • Further Improvements
        • Dispatching calls
        • Dynamic allocation
        • Limited controlled types
        • Updated source-code
  • SPARK Ada for the MISRA C Developer
    • Preface
    • Enforcing Basic Program Consistency
      • Taming Text-Based Inclusion
      • Hardening Link-Time Checking
      • Going Towards Encapsulation
    • Enforcing Basic Syntactic Guarantees
      • Distinguishing Code and Comments
      • Specially Handling Function Parameters and Result
        • Handling the Result of Function Calls
        • Handling Function Parameters
      • Ensuring Control Structures Are Not Abused
        • Preventing the Semicolon Mistake
        • Avoiding Complex Switch Statements
        • Avoiding Complex Loops
        • Avoiding the Dangling Else Issue
    • Enforcing Strong Typing
      • Enforcing Strong Typing for Pointers
        • Pointers Are Not Addresses
        • Pointers Are Not References
        • Pointers Are Not Arrays
        • Pointers Should Be Typed
      • Enforcing Strong Typing for Scalars
        • Restricting Operations on Types
        • Restricting Explicit Conversions
        • Restricting Implicit Conversions
    • Initializing Data Before Use
      • Detecting Reads of Uninitialized Data
      • Detecting Partial or Redundant Initialization of Arrays and Structures
    • Controlling Side Effects
      • Preventing Undefined Behavior
      • Reducing Programmer Confusion
      • Side Effects and SPARK
    • Detecting Undefined Behavior
      • Preventing Undefined Behavior in SPARK
      • Proof of Absence of Run-Time Errors in SPARK
    • Detecting Unreachable Code and Dead Code
    • Conclusion
    • References
      • About MISRA C
      • About SPARK
      • About MISRA C and SPARK
  • Introduction to the GNAT Toolchain
    • GNAT Toolchain Basics
      • Basic commands
      • Compiler warnings
        • -gnatwa switch and warning suppression
        • Style checking
    • GPRbuild
      • Basic commands
      • Project files
        • Basic structure
        • Customization
      • Project dependencies
        • Simple dependency
        • Dependencies to dynamic libraries
      • Configuration pragma files
      • Configuration packages
    • GNAT Studio
      • Start-up
        • Windows
        • Linux
      • Creating projects
      • Building
      • Debugging
        • Debug information
        • Improving main application
        • Debugging the application
      • Formal verification
    • GNAT Tools
      • gnatchop
      • gnatprep
      • gnatmem
      • gnatdoc
      • gnatpp
      • gnatstub
  • Guidelines for Safe and Secure Ada/SPARK
    • Introduction
      • Scope
      • Structure
      • Enforcement
      • About the Rules
        • Mapping to Other Standards
    • Definitions
      • Level
      • Remediation
    • Dynamic Storage Management
      • Common High Integrity Restrictions (DYN01)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Traditional Static Allocation Policy (DYN02)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Access Types Without Allocators Policy (DYN03)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Minimal Dynamic Allocation Policy (DYN04)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • User-Defined Storage Pools Policy (DYN05)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Statically Determine Maximum Stack Requirements (DYN06)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
    • Safe Reclamation
      • No Multiple Reclamations (RCL01)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Only Reclaim Allocated Storage (RCL02)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Only Reclaim To The Same Pool (RCL03)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
    • Concurrency
      • Use the Ravenscar Profile (CON01)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Use the Jorvik Profile (CON02)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Avoid Shared Variables for Inter-task Communication (CON03)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
    • Robust Programming Practice
      • No Use of "others" in Case Constructs (RPP01)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • No Enumeration Ranges in Case Constructs (RPP02)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Limited Use of "others" In Aggregates (RPP03)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • No Unassigned Mode-Out Procedure Parameters (RPP04)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • No Use of "others" in Exception Handlers (RPP05)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Avoid Function Side-Effects (RPP06)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Functions Only Have Mode "in" (RPP07)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Limit Parameter Aliasing (RPP08)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Use Precondition and Postcondition Contracts (RPP09)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Do Not Re-Verify Preconditions In Subprogram Bodies (RPP10)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Always Use the Result of Function Calls (RPP11)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • No Recursion (RPP12)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • No Reuse of Standard Typemarks (RPP13)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Use Symbolic Constants For Literal Values (RPP14)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
    • Exception Usage
      • Do Not Raise Language-Defined Exceptions (EXU01)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • No Unhandled Application-Defined Exceptions (EXU02)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • No Exception Propagation Beyond Name Visibility (EXU03)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Prove Absence of Run-time Exceptions (EXU04)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
    • Object-Oriented Programming
      • No Class-wide Constructs Policy (OOP01)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Static Dispatching Only Policy (OOP02)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Limit Inheritance Hierarchy Depth (OOP03)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Limit Statically-Dispatched Calls To Primitive Operations (OOP04)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Use Explicit Overriding Annotations (OOP05)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Use Class-wide Pre/Post Contracts (OOP06)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Ensure Local Type Consistency (OOP07)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
    • Software Engineering
      • Use SPARK Extensively (SWE01)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Enable Optional Warnings and Treat As Errors (SWE02)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Use A Static Analysis Tool Extensively (SWE03)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
      • Hide Implementation Artifacts (SWE04)
        • Reference
        • Description
        • Applicable Vulnerability within ISO TR 24772-2
        • Applicable Common Weakness Enumeration
        • Noncompliant Code Example
        • Compliant Code Example
        • Notes
    • References

Labs

  • Introduction to Ada: Laboratories
    • Imperative Language
      • Hello World
      • Greetings
      • Positive Or Negative
      • Numbers
    • Subprograms
      • Subtract procedure
      • Subtract function
      • Equality function
      • States
      • States #2
      • States #3
      • States #4
    • Modular Programming
      • Months
      • Operations
    • Strongly Typed Language
      • Colors
      • Integers
      • Temperatures
    • Records
      • Directions
      • Colors
      • Inventory
    • Arrays
      • Constrained Array
      • Colors: Lookup-Table
      • Unconstrained Array
      • Product info
      • String_10
      • List of Names
    • More About Types
      • Aggregate Initialization
      • Versioning
      • Simple todo list
      • Price list
    • Privacy
      • Directions
      • Limited Strings
      • Bonus exercise
        • Colors
        • List of Names
        • Price List
    • Generics
      • Display Array
      • Average of Array of Float
      • Average of Array of Any Type
      • Generic list
    • Exceptions
      • Uninitialized Value
      • Numerical Exception
      • Re-raising Exceptions
    • Tasking
      • Display Service
      • Event Manager
      • Generic Protected Queue
    • Design by contracts
      • Price Range
      • Pythagorean Theorem: Predicate
      • Pythagorean Theorem: Precondition
      • Pythagorean Theorem: Postcondition
      • Pythagorean Theorem: Type Invariant
      • Primary Color
    • Object Oriented Programming
      • Simple type extension
      • Online Store
    • Standard Library: Containers
      • Simple todo list
      • List of unique integers
    • Standard Library: Dates & Times
      • Holocene calendar
      • List of events
    • Standard Library: Strings
      • Concatenation
      • List of events
    • Standard Library: Numerics
      • Decibel Factor
      • Root-Mean-Square
      • Rotation
    • Solutions
      • Imperative Language
        • Hello World
        • Greetings
        • Positive Or Negative
        • Numbers
      • Subprograms
        • Subtract Procedure
        • Subtract Function
        • Equality function
        • States
        • States #2
        • States #3
        • States #4
      • Modular Programming
        • Months
        • Operations
      • Strongly typed language
        • Colors
        • Integers
        • Temperatures
      • Records
        • Directions
        • Colors
        • Inventory
      • Arrays
        • Constrained Array
        • Colors: Lookup-Table
        • Unconstrained Array
        • Product info
        • String_10
        • List of Names
      • More About Types
        • Aggregate Initialization
        • Versioning
        • Simple todo list
        • Price list
      • Privacy
        • Directions
        • Limited Strings
      • Generics
        • Display Array
        • Average of Array of Float
        • Average of Array of Any Type
        • Generic list
      • Exceptions
        • Uninitialized Value
        • Numerical Exception
        • Re-raising Exceptions
      • Tasking
        • Display Service
        • Event Manager
        • Generic Protected Queue
      • Design by contracts
        • Price Range
        • Pythagorean Theorem: Predicate
        • Pythagorean Theorem: Precondition
        • Pythagorean Theorem: Postcondition
        • Pythagorean Theorem: Type Invariant
        • Primary Colors
      • Object-oriented programming
        • Simple type extension
        • Online Store
      • Standard library: Containers
        • Simple todo list
        • List of unique integers
      • Standard library: Dates & Times
        • Holocene calendar
        • List of events
      • Standard library: Strings
        • Concatenation
        • List of events
      • Standard library: Numerics
        • Decibel Factor
        • Root-Mean-Square
        • Rotation
  • Bug Free Coding
    • Let's Build a Stack
      • Background
      • Input Format
      • Constraints
      • Output Format
      • Sample Input
      • Sample Output
learn.adacore.com
  • Search


© Copyright 2018 – 2025, AdaCore. All rights reserved.    Creative Commons License
Legal   |   Privacy Policy   |   Report an Issue