Ada Study Projects

Where single-file demos end, study projects begin. Each project below is a multi-file crate that combines the track's chapters — packages, private types, generics, contracts, tasking — into one working program, with a guided reading order.

Project Inventory

ProjectConcepts combinedEntry point
Temperature monitorprivate types, subtypes as contracts, exceptions on sensor faultsStart from the tasking demo
Generic math librarygenerics with formal operators, expression functions, attributesStart from the generics demo
Tasked event looptasks, protected objects, select with timeout, Ravenscar styleStart from the tasking demo

How to Study a Project

Read the specs first

Every Ada codebase documents its architecture in its .ads files. Read the specifications in dependency order (they mirror the with graph) and you have the design; bodies are implementation details you consult only when a behavior surprises you. This habit transfers directly to the open source projects on the next page.

Build with Alire

Recreate each project as a crate: alr init --bin <name>, copy the files into src/, and add dependencies with alr with <crate>. The build system compiles units in dependency order and refuses to link an incomplete program — the errors teach you the unit model from the Packages lesson.

Break it deliberately

For each project, write down its contracts (preconditions, ranges, invariants), then violate each one on purpose. Observing where each failure is caught — compile time, call site, or run time — is the fastest way to internalize the safety model that distinguishes Ada.