SPARK (Pro 25)

This assessment applies the coupling account — coupling as access to a shared resource, and the coupling floor [1], [2] — and the knowledge-embodiment theorem [3]; the language is assessed against its official reference [4].

Snapshot SPARK (Pro 25) — released 2025 · lifecycle current

Family SPARK — shelf: Embedded and Real-Time

The language targets bare hardware, fixed timing, or a certification regime for a safety-critical system. A shelf groups; it does not classify — the tags below carry every use, paradigm, and platform of this snapshot.

Trajectory SPARK (1988 — first release) · Pro 25 (2025 — assessed tool release)

Tags

Use — Embedded, Verification

Paradigm — Object-oriented, Imperative, Concurrent

Platform — Native, Embedded target

Lifecycle — Current

Memory — Manual

Typing — Static, strong

Resources

The language’s official entry points, and the documents that name the release this page assesses. A link marked this release pins the document to SPARK (Pro 25); an unmarked link is the current reference for the language.

Landing page

Specification and reference

API documentation

Tutorial

1 Assessment

This page assesses SPARK in five parts: core coupling — what the language’s own constructs force; ecosystem coupling — what the surrounding platform, tooling, and community cost; engineering readiness — whether the artifact can be reproduced, verified, observed, worked in quickly, connected to other languages, and governed openly; the profile — the unscored facts a score cannot express; and the scoring detail — the mechanism marks and the arithmetic behind every score. A ✅ bullet marks a construct that helps. A ⚠️ or ❌ bullet marks a cost; the scoring model does not price every cost named here.

Core coupling 85.4/100 · Ecosystem coupling 75.8/100 · Engineering readiness 39.2/100

1.1 Core coupling

1.1.1 Type

  • ✅ The static type system is Ada’s: Every object, parameter, and function result has a declared type, and the compiler checks every assignment and call
  • ✅ Subtypes carry range constraints: subtype narrows a base type with a range or a predicate, and in the proved subset a violation is a proof obligation rather than a run-time check
  • ✅ Enumeration and discriminated record types express alternatives: An enumeration gives a finite value set, and a variant record’s discriminant states which branch is active
  • ✅ Generics are checked at each instantiation: An Ada generic is analysed where it is instantiated, so a reusable abstraction is verified at its use site
  • ✅ Type_Invariant states a property of a private type: The invariant is an obligation on every value of the type
  • ⚠️ Access types are admitted only under an ownership policy: SPARK allows a pointer when its owner is declared, so indirection is available but constrained
  • ❌ Inherits the JVM answer: string length counts UTF-16 units (T15)

1.1.2 Construction

  • ✅ Contracts are part of the subprogram declaration: Pre, Post, and Contract_Cases state the obligation beside the parameters, so a caller reads it with the signature
  • ✅ Flow contracts state what a subprogram reads and writes: Global, Depends, and Refined_Global make the data flow a declared artefact
  • ✅ Abstract states confine a package’s state: Abstract_State declares the state as an abstraction, Refined_State binds it to concrete variables, and Initializes states what a package sets up
  • ✅ Separation is proved rather than advised: The ownership policy, the flow aspects, and the contracts are analysed by GNATprove, so a declared separation is verified and not merely recommended
  • ⚠️ The declarations carry more than the code needs: A proof requires a contract for every subprogram on the path, so construction carries an annotation burden
  • ⚠️ A unit can opt out with SPARK_Mode => Off: An analysed region and an unchecked region can sit in the same program
  • ❌ Inherits the Java class-init rule: first-touch, with the documented cycle (C8)

1.1.3 Memory

  • ✅ An ownership policy governs any access type: SPARK’s data-ownership regime gives a pointer a stated owner, so a dangling or duplicated reference is a proof failure rather than a run-time defect
  • ✅ No manual deallocation in the subset: Unchecked_Deallocation is outside SPARK, so a program never frees memory by hand
  • ✅ No garbage collector: SPARK compiles to native code and runs without a collector
  • ✅ Bounded containers remove the heap: Ada.Containers.Bounded_Vectors and its siblings hold their storage in the object
  • ✅ A local object’s lifetime is its scope: A stack variable’s extent is fixed by the block that declares it
  • ⚠️ An owned access type still allocates at run time: The allocation is allowed and proved, but the allocator’s behaviour remains a run-time fact
  • ❌ The undeclared class has no catch: the proof covers declared failures; storage exhaustion on the runtime reaches Program_Error, outside the contract (Er6)

1.1.4 Error

  • ✅ A failure is a proof obligation: GNATprove reports an unproved check, so a fault is found in the toolchain rather than in a test run
  • ✅ A raise is stated in the contract: Exceptional_Cases names the exceptions a subprogram may propagate, so the failure set is declared
  • ✅ Run-time checks are proved impossible rather than disabled: Once GNATprove proves that an index, a range, or a division cannot fail, the check costs nothing
  • ✅ Assert becomes a proof obligation: pragma Assert states a property that the analysis must establish or report
  • ✅ Assume records an unproved fact explicitly: An assumption is written in the source and appears in the analysis report
  • ⚠️ The proof is no stronger than its assumptions: An Assume, an unproved check, or a SPARK_Mode => Off unit leaves a gap in the guarantee

1.1.5 Concurrency

  • ✅ Ada tasking is available and analysable: A task and a protected object are language constructs, and SPARK analyses the data flow of the supported subset
  • ✅ A protected object is the synchronisation boundary: A protected operation enforces mutual exclusion and a barrier, so the lock is not written by hand
  • ✅ The Ravenscar profile gives a static task set: No task is created dynamically, and the ceiling-locking protocol prevents priority inversion
  • ✅ Shared state must be declared: A variable shared between tasks appears in a Global or Depends aspect, so the sharing is visible
  • ⚠️ The analysed subset of tasking is smaller than Ada’s: An entry family, a dynamic rendezvous, or an unrestricted task is outside the analysed subset

1.1.6 Platform

  • ❌ SPARK is a subset of Ada and a program is an Ada program: GNAT compiles the code, and the language has no existence apart from the Ada platform (P1)
  • ❌ A foreign call leaves the proved region: An interface to C or another language is declared outside SPARK, so it cannot be analysed with the rest
  • ✅ GNAT is a mature and portable Ada compiler: The same source compiles for x86-64, ARM, and the embedded targets used in avionics
  • ✅ The qualified toolchain targets the certificated platforms: GNAT Pro supports VxWorks, LynxOS-178, and bare metal with a qualification for DO-178C
  • ⚠️ Full support is a commercial subscription: GNATprove is available in the community toolchain, and SPARK Pro adds support, libraries, and qualification
  • ⚠️ The build is a GNAT project: gprbuild and a project file describe the build, so the project couples to the Ada toolchain

1.1.7 Trade-offs (not coupling)

  • The proved subset is smaller than Ada: A feature outside SPARK is left out or isolated behind a SPARK_Mode => Off boundary
  • The restriction on pointers is a deliberate exchange: Aliasing is removed in return for an ownership regime and an array or a bounded container in place of a linked structure
  • The annotation burden is the price of the proof: A contract, an invariant, and a flow aspect are written for each unit on the path
  • The target domain is high-assurance by design: Aviation, space, and medical devices are the intended context, and the domain mark records that scope
  • Verification effort is a project decision: Zero-defect software is achievable given sufficient effort, which is a budget choice
  • The proof checks the contract, not the requirement: A verified program can implement the wrong specification, which no toolchain detects

1.2 Ecosystem coupling

1.2.1 Performance

  • ✅ The compiled output is an Ada program’s native binary: SPARK compiles to the same native code, so the verification adds no run-time cost
  • ✅ A proved check need not execute: A check that GNATprove established can be suppressed at that point, so the verified code does not pay for the guard
  • ✅ No collector and no interpreter: The run-time has neither a garbage collector nor a JIT, so the timing is the Ada run-time’s
  • ✅ The Ravenscar profile bounds the run-time behaviour: The task set, the priorities, and the locking are static, which makes the timing analysable
  • ⚠️ The run-time is the Ada run-time: Tasking, the secondary stack, and exception propagation cost what GNAT’s run-time costs
  • ⚠️ The proof is a build-time cost: GNATprove can take far longer than the compilation, which delays the build but not the program

1.2.2 Ecosystem

  • ❌ The SPARK ecosystem is a subset of Ada’s: A library must itself be in the SPARK subset to be analysed with the program (Ec3)
  • ✅ Ada’s tooling serves the project: Alire supplies packages and gprbuild builds the project
  • ✅ GNATprove and SPARK Pro are purpose-built and mature: The analyser and the commercial support layer are actively developed
  • ✅ The industrial community sustains the toolchain: The requirements of the certificated industries drive the analyser and the library work
  • ✅ A verified library base exists: SPARK’s own libraries and verified components ship with the toolchain
  • ⚠️ A library that uses pointers must be isolated: An Ada library outside the subset is reached through an unproved boundary
  • ❌ No object-code promise across compiler releases: the proved library travels as the .ali-bound objects of one GNAT release [5] (Ec8)

1.2.3 Evolution

  • ✅ SPARK tracks a published Ada standard: The subset is defined against Ada 2012 and Ada 2022, so a language change follows the standard revision
  • ✅ Successive SPARK releases widened the subset: The ownership policy, the functional contracts, and the proof of type invariants were added over several releases
  • ✅ Ada’s compatibility record is strong: An older Ada program generally compiles under a later revision
  • ⚠️ A new feature arrives with a toolchain release: The analyser states the subset it supports, so adoption follows the release
  • ⚠️ A proof depends on the toolchain version: A check proved under one GNATprove release can need a new annotation under another
  • ❌ Build variants multiply: the GNAT toolchain’s preprocessor runs over the Ada sources the SPARK checks consume, so a proved unit can compile from a guarded selection (V7)

1.2.4 Domain

  • ❌ The language exists for high-assurance systems: Aviation, space, and medical devices, where DO-178C, EN 50128, or IEC 62304 applies, are the intended domains (D1)
  • ❌ Outside those domains it is rarely chosen: A general application gains little from the proof and pays the toolchain cost (D1)
  • ✅ The fit in the intended domain is excellent: The tools, the libraries, and the certification evidence all target it
  • ✅ DO-333 credits the proof against the certification objectives: The formal-methods supplement to DO-178C lets the analysis substitute for some test objectives
  • ✅ The shipping uses are real: Airbus, Thales, and Lockheed Martin build critical software on it
  • ⚠️ The labour pool is small: An engineer with both Ada and formal-methods experience is hard to find

1.2.5 Learning

  • ❌ Two skills must be learned, not one: SPARK requires Ada fluency and formal-methods practice, so contracts, invariants, and the proof tool must all be mastered (L1)
  • ❌ A proof failure must be read as a counterexample: GNATprove reports an unproved check with a path, and turning the report into a fix takes experience
  • ✅ The analysis report is actionable: The tool names the check, the path, and the assumption that blocks the proof
  • ✅ The learning material is complete: AdaCore’s tutorial and the SPARK course material cover the language and the proof method
  • ⚠️ The learning curve is very steep: A first proved subprogram is quick to write, and a first proved package with an abstract state is not

1.2.6 Syntax

  • ✅ The syntax is Ada’s: A package, a subprogram, and a loop read as they do in Ada, and a contract appears as an aspect or a pragma
  • ✅ The block structure is explicit: A begin/end pair closes a block, and the end repeats the name it closes
  • ✅ Contracts sit beside the parameters: Pre =>, Post =>, and Global => are part of the subprogram declaration
  • ✅ Quantified expressions are first-class: (for all I in A'Range => A (I) > 0) states a property in the source
  • ⚠️ An aspect clause can be long: A Depends aspect over much state is a long expression that needs careful reading

1.2.7 Testing

  • ✅ The proof covers the property the contract states: An obligation is discharged for every value it quantifies, not for a sample
  • ✅ The test suite no longer has to trigger every check: A bounds or range check proved impossible needs no test to reach it
  • ✅ gnattest generates a unit-test harness: It reads a package specification and emits AUnit test stubs
  • ✅ AUnit covers the behaviour a contract does not state: The proof and the test suite answer different questions
  • ⚠️ A property that no contract states is not proved: The analysis reaches exactly the contracts and invariants that are written

1.2.8 Security

  • ✅ The classic memory-safety faults are proved absent: A buffer overflow, a use-after-free, and a null dereference are removed by the subset and the proof, so the vulnerability class does not exist in the analysed code
  • ✅ Input validity is stated and checked: A range constraint or a Pre aspect states what the caller must guarantee, and the proof covers the rest
  • ✅ Unchecked_Conversion and pointer arithmetic are outside the subset: The unsafe operations are not available to analysed code
  • ⚠️ The guarantee stops at the SPARK_Mode => Off boundary: An imported C function, a device driver, or an unchecked allocation is not proved
  • ⚠️ The trusted base includes the prover and the compiler: A defect in GNATprove or in the code generator is outside the proof
  • ❌ Inherits the JVM rule: integer wraparound in UDFs and expressions (Q4)

1.2.9 Delivery targets

What ships from a producer to a consumer, and whether the interface across a release boundary is promised. Ec8 is present when one compiled target crosses with no promise.

Target Ships as Crosses a producer boundary Cross-release promise
.ads and .adb source source no Source compiles and proves in the GNAT release the site installs
object file with its .ali record compiled yes no — GNAT records the dependence graph in the .ali file, so the proved library travels as that compiler release’s objects [5]

1.3 Engineering readiness

1.3.1 Reproducibility

  • ❌ Builds embed compiler switches and library state. (Y1)
  • ❌ Library versions resolve from the environment unless locked. (Y2)
  • ❌ The distribution records no toolchain version per project. (Y14)

1.3.2 Supply chain

  • ❌ Alire crates and vendored sources carry no signed provenance. (Y3)
  • ❌ The crate registry is a flat name space. (Y4)
  • ❌ No advisory feed covers SPARK libraries. (Y16)

1.3.3 Observability

  • ❌ No tracing standard exists in the language. (Y5)
  • ❌ Text_IO carries no structure. (Y6)

1.3.4 Feedback

  • ✅ The SPARK toolchain includes the GNAT debugger. (Y13)
  • ⚠️ The proof tools are the verification instrument; editor analysis rides GNAT Studio.

1.3.5 Interop

  • ❌ The artifact runs on the targets the Pro toolchain ports cover. (Y10)

1.3.6 Governance

  • ❌ AdaCore decides the Pro toolchain’s direction and release cadence. (Y11)
  • ❌ The SPARK Reference Manual is the vendor’s; the checking contract is not an independent standard. (Y12)

1.4 Profile

Unscored, and kept separate from every score on purpose. The profile records what a mechanism price cannot express: what a running program costs, how well a coding model and an agent work in the language, and whether a safety-critical path exists.

1.4.1 Energy and cost

What this axis asks: what does a running program cost in energy and time?

  • ✅ Compiles to native code: the fastest class in the language energy and time benchmarks [6], [7]. A causal re-analysis attributes the difference to execution time [8].

1.4.2 AI and agent readiness

What this axis asks: how well does a coding model and an agent work in this language?

  • ❌ Sparse training data: models write it unreliably [9].

1.4.3 Safety certification

What this axis asks: is there a certified or standards-qualified path to a safety-critical system?

  • ✅ A standards-qualified toolchain or an established safety standard covers this language.

1.5 Scoring detail

1.5.1 Core coupling Dimensions

Dimension Mechanism Description Imposed by Present Weight
Type T1 dynamic no static check language — 0
T2 weak static language — 0
T3 dynamic/duck dispatch language — 0
T4 no sum types language — 0
T5 no generics language — 0
T6 no namespaces language — 0
T7 type erasure/reflection language — 0
T8 operator overloading language — 0
T9 inheritance required for polymorphism language — 0
T10 no null-safety language — 0
T11 no module boundary language — 0
T12 no effect tracking language ✅ −8
T13 async/sync colouring language — 0
T14 unchecked foreign boundary language ✅ −4
T15 chars are encoding units language ✅ −8
Type cost −5.7 (−20)
Construction C1 global mutable state by default language — 0
C2 no immutability by default language — 0
C3 constructors coupled to allocation language — 0
C4 no constructor/validation language — 0
C5 unpinned collection order language — 0
C6 aliasing by default language — 0
C7 undeclared control transfer language — 0
C8 no source-visible init order language ✅ −8
Construction cost −2.3 (−8)
Memory M1 manual deallocation runtime — 0
M2 GC non-deterministic pauses runtime — 0
M3 no RAII language — 0
M4 no ownership model language — 0
M5 uninitialized reads language — 0
M6 unchecked reinterpretation language — 0
Er6 uncatchable runtime fault language ✅ −8
M7 reference cycles leak runtime — 0
Memory cost −2.3 (−8)
Error Er1 no structured path language — 0
Er2 unchecked exceptions only language — 0
Er3 errors ignored/non-exhaustive language — 0
Er4 no composable result type language — 0
Er5 no isolation unit for a fault runtime — 0
Error cost 0
Concurrency K1 GIL/no parallel runtime — 0
K2 shared mutable state default language — 0
K3 manual sync no race detection runtime — 0
K4 no structured concurrency language — 0
K5 no primitives language — 0
K6 thread-per-task cost runtime — 0
Concurrency cost 0
Platform P1 cannot function outside one vendor/domain context ✅ −15
P2 single-vendor but other uses context — 0
P3 legacy/discontinued platform context — 0
P4 poor domain fit context — 0
Platform cost −4.3 (−15)

Core coupling score: 85.4/100 — 51 of the 350 inventory points are present, so the axis cost is 100 × 51 ÷ 350 = 14.6 and the score is 100 − 14.6. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

1.5.2 Ecosystem coupling Dimensions

Dimension Mechanism Description Imposed by Present Weight
Performance R1 interpreted no AOT/JIT runtime — 0
R2 GC pauses runtime — 0
R3 JIT warmup runtime — 0
Performance cost 0
Ecosystem Ec1 no package manager context — 0
Ec2 fragmented tooling context — 0
Ec3 small/niche/discontinued context ✅ −8
Ec4 proprietary context — 0
Ec5 platform-locked tooling context — 0
Ec6 monoculture context — 0
Ec7 legacy burden context — 0
Ec8 unpromised binary boundary context ✅ −8
Ec9 unpromised data boundary context — 0
Ecosystem cost −6.2 (−16)
Evolution V1 breaking changes language — 0
V2 frozen context — 0
V3 discontinued context — 0
V4 glacial standards context — 0
V5 silent default drift runtime — 0
V7 build-variant state space context ✅ −8
Evolution cost −3.1 (−8)
Domain D1 domain/vendor lock-in context ✅ −15
D3 framework forces architecture context — 0
Domain cost −5.9 (−15)
Learning L1 steep context ✅ −8
L2 large surface/multi-paradigm context — 0
L3 sparse docs context — 0
Learning cost −3.1 (−8)
Syntax S1 verbose language — 0
S2 inconsistent language — 0
S3 punctuation-heavy language — 0
Syntax cost 0
Testing G1 weak tooling context — 0
G2 poor debugging context — 0
G3 runtime-only errors context — 0
G4 no published monotonic clock runtime — 0
Testing cost 0
Security Q1 memory-unsafe language — 0
Q2 dynamic/weak typing risk language — 0
Q3 known vulnerability/injection context — 0
Q4 silent integer overflow language ✅ −15
Security cost −5.9 (−15)

Ecosystem coupling score: 75.8/100 — 62 of the 256 inventory points are present, so the axis cost is 100 × 62 ÷ 256 = 24.2 and the score is 100 − 24.2. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

1.5.3 Engineering readiness Dimensions

Dimension Mechanism Description Imposed by Present Weight
Reproducibility Y1 build not reproducible context ✅ −15
Y2 dependencies not pinned context ✅ −8
Y14 no toolchain version pin context ✅ −8
Y18 no machine-read project contract context — 0
Reproducibility cost −18.1 (−31)
Supply chain Y3 no signed provenance context ✅ −15
Y4 registry without namespacing context ✅ −4
Y16 no advisory feed context ✅ −8
Supply chain cost −15.8 (−27)
Observability Y5 no stable tracing standard context ✅ −8
Y6 no structured logging context ✅ −4
Y15 no post-mortem diagnostics runtime — 0
Observability cost −7.0 (−12)
Feedback Y7 slow build context — 0
Y8 no fast in-editor analysis context — 0
Y13 no bundled debugger context — 0
Feedback cost 0
Interop Y9 no foreign-function interface language — 0
Y10 no portable target context ✅ −4
Interop cost −2.3 (−4)
Governance Y11 single-vendor governance context ✅ −15
Y12 closed specification context ✅ −15
Y17 no conformance mechanism context — 0
Y19 no published parser context — 0
Governance cost −17.5 (−30)

Engineering readiness score: 39.2/100 — 104 of the 171 inventory points are present, so the axis cost is 100 × 104 ÷ 171 = 60.8 and the score is 100 − 60.8. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

Verdict: SPARK’s design yields low core coupling for the work it is built for, and its platform cost is the price of a narrow domain. The static type system is Ada’s, the contracts and flow aspects make every global dependency explicit, an ownership policy removes coupling through shared references, and the toolchain proves the run-time checks that other languages leave to a test suite. The only scored core loss is P1: the language is a subset of Ada and does not exist apart from that platform. Main strengths: GNATprove, a toolchain qualified for DO-178C, DO-333 credit for the proof, and industrial use at Airbus, Thales, and Lockheed Martin; main weaknesses: an ecosystem that is a subset of Ada’s, a domain lock-in to high-assurance systems, and one of the steepest learning curves here.


The formal development. The definitions, theorems, and proofs behind this page are published in:

All published papers

References

[1]
Y. Loth, “On the nature of coupling: All coupling as shared resource access.” Zenodo, Aug. 2026. doi: 10.5281/zenodo.21925121.
[2]
Y. Loth, “Coupling as a consequence of cohesion: Decomposition, the coupling floor, and domain-imposed coupling.” Zenodo, Aug. 2026. doi: 10.5281/zenodo.21925201.
[3]
Y. Loth, “On the nature of cohesion: Cohesion as correctness relative to a partitioning rule.” Zenodo, Jul. 2026. doi: 10.5281/zenodo.20492912.
[4]
AdaCore and ALTRAIN, “SPARK user’s guide.” AdaCore, 2024. Available: https://docs.adacore.com/spark2014-docs/html/ug/
[5]
AdaCore, “GNAT user’s guide — building executable programs with GNAT.” AdaCore, 2026. Available: https://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn/building_executable_programs_with_gnat.html
[6]
R. Pereira et al., “Energy efficiency across programming languages: How do energy, time, and memory relate?” in Proceedings of the 10th ACM SIGPLAN international conference on software language engineering (SLE), 2017, pp. 256–267. doi: 10.1145/3136014.3136031.
[7]
R. Pereira et al., “Ranking programming languages by energy efficiency,” Science of Computer Programming, 2021, doi: 10.1016/j.scico.2021.102609.
[8]
N. van Kempen, H.-J. Kwon, D. T. Nguyen, and E. D. Berger, “It’s not easy being green: On the energy efficiency of programming languages,” in Proceedings of the 40th IEEE/ACM international conference on automated software engineering (ASE), 2025. doi: 10.1109/ASE63991.2025.00131.
[9]
S. Joel, J. J. Wu, and F. H. Fard, “A survey on LLM-based code generation for low-resource and domain-specific programming languages,” ACM Transactions on Software Engineering and Methodology, 2025, doi: 10.1145/3770084.