Learn ADA-SPARK with Real Code Examples
Updated Nov 27, 2025
Learning Path
Learn Ada fundamentals
Understand SPARK restrictions
Add simple contracts
Use GNATprove
Master formal program design
Skill Improvement Plan
Week 1: Ada basics
Week 2: SPARK subset rules
Week 3: Contracts and subtypes
Week 4: GNATprove practice
Week 5: Verified ADTs and loops
Interview Questions
What is SPARK and why is it used?
How do contracts work in SPARK?
What is GNATprove?
Explain absence of runtime errors (AoRTE).
How do you design a provable package?
Cheat Sheet
pragma SPARK_Mode(On)
with Pre => Condition
with Post => Condition
Loop_Invariant => Expression
Run: gnatprove -P project.gpr
Books
Building High Integrity Applications with SPARK
Programming in Ada
High Integrity Software Engineering
Formal Methods for Safety-Critical Software
Real-Time Systems and SPARK
Tutorials
SPARK by Example
SPARK 2014 Tutorials
GNATprove essentials
Contract-based programming in Ada
High-integrity embedded systems with SPARK
Official Docs
https://www.adacore.com/sparkpro
https://learn.adacore.com/courses/SPARK_for_the_MISRA_C_Developer
Community Links
AdaCore community
Alire package registry
Ada subreddit
Ada-Europe conferences
Embedded & safety-critical communities
Community Support
AdaCore community
Alire package ecosystem
comp.lang.ada forum
GitHub Ada/SPARK projects
Ada-Europe conferences