Intermediate Ada Programming
Duration: 3 Days
Description
This comprehensive hands-on training course is designed to advance participants’ Ada programming skills beyond the fundamentals, focusing on object-oriented programming, concurrent and real-time programming, and advanced language features. Through practical exercises and real-world examples, learners will master Ada’s powerful features for building complex, concurrent, and safety-critical systems. Participants will explore tagged types and inheritance, task-based concurrency, protected objects, generic programming, and techniques for developing robust, high-performance Ada applications suitable for mission-critical environments.
Audience
This course is designed for software developers who have completed an introductory Ada course or have equivalent experience with Ada programming fundamentals. It is ideal for engineers working on concurrent systems, real-time applications, or large-scale software projects requiring advanced modularity and type safety. Participants should be comfortable with basic Ada syntax, packages, and procedural programming concepts.
Objectives
- Master object-oriented programming concepts in Ada
- Implement tagged types, inheritance, and polymorphism
- Understand and apply generic programming techniques
- Develop concurrent programs using tasks and protected objects
- Implement real-time programming concepts and features
- Work with advanced access types and dynamic data structures
- Apply design patterns in Ada
- Utilize representation clauses and low-level programming features
- Implement contract-based programming with preconditions and postconditions
- Optimize Ada code for performance and safety
- Build complex, multi-threaded applications
- Apply advanced exception handling and program verification techniques
Prerequisites
Participants should have completed an Introduction to Ada course or have equivalent experience. Required knowledge includes: Ada syntax and basic data types, control structures, procedures and functions, packages and modular programming, arrays and records, basic exception handling, and file I/O operations. Familiarity with at least one other object-oriented or concurrent programming language is helpful but not required.
Course Outline
- Module 1: Tagged Types and Object-Oriented Concepts
- OOP in Ada overview
- Tagged types, type extension, and hierarchies
- Primitive operations, dispatching, and classwide types
- Abstract types/subprograms, null procedures/records
- Module 2: Polymorphism, Interfaces, and Dynamic Dispatching
- Static vs dynamic dispatching
- Controlling vs classwide parameters
- Overriding and redispatching
- Interfaces and multiple inheritance via interfaces
- Practical OOP patterns and examples
- Module 3: Advanced Package Structures
- Package hierarchies and organization
- Private, limited, and controlled visibility
- Deferred constants; initialization/finalization concepts
- Separate compilation and large-project structure
- Module 4: Generic Programming Techniques
- Generic formal types and subprograms
- Designing reusable generic components
- Instantiations and signature packages
- Generic data structures, sorting, and searching
- Module 5: Tasking Fundamentals
- Concurrency concepts in Ada
- Task types/objects, activation, termination
- Entries, rendezvous, accept statements, entry calls
- Select statements (selective accept, timed/conditional)
- Module 6: Advanced Tasking Features
- Priorities and scheduling basics
- Delays and timing
- Asynchronous transfer of control and aborting
- Task hierarchies, master-dependent relationships, requeue
- Module 7: Protected Objects and Synchronization
- Protected types, procedures/functions/entries
- Barriers and entry queues
- Protected vs task-based synchronization
- Monitors, semaphores, reader-writer locks
- Priority ceiling protocol and performance notes
- Module 8: Real-Time Programming
- Real-Time Systems Annex overview
- Real_Time and monotonic time concepts
- Timing events and execution time
- Periodic/sporadic tasks and CPU time management
- Interrupt handling and Ravenscar profile overview
- Module 9: Advanced Access Types, Data Structures, and Memory Management
- Access-to-subprogram and classwide access types
- Storage pools; controlled and limited controlled types
- User-defined assignment/adjustment
- Building advanced structures (trees/graphs) with safety in mind
- Module 10: Contracts, Low-Level Features, and Capstone
- Pre/postconditions, type invariants, subtype predicates, assert pragmas
- Representation clauses and packed data
- Interfacing to C/C++ and common pitfalls
- Capstone lab: concurrent, multi-module application using OOP + tasking