e01.org

SPARK (programming language)

SPARK is a formally defined computer programming language based on the Ada programming language, intended for developing high-integrity software used in systems where predictable and highly reliable operation is essential. It facilitates developing applications that demand safety, security, or business integrity. It has especially found use in real-time computing and embedded systems where issues of safety-criticality or computer security are paramount. Originally, three versions of SPARK existed (SPARK83, SPARK95, SPARK2005), based on Ada 83, Ada 95, and Ada 2005 respectively. A fourth version, SPARK 2014, based on Ada 2012, was released on April 30, 2014. SPARK 2014 is a complete re-design of the language and supports software verification tools. The SPARK language consists of a well-defined subset of the Ada language that uses contracts to describe the specification of components in a form that is suitable for both static and dynamic verification. SPARK is also designed to...

SPARK is a formally defined computer programming language based on the Ada programming language, intended for developing high-integrity software used in systems where predictable and highly reliable operation is essential. It facilitates developing applications that demand safety, security, or business integrity. It has especially found use in real-time computing and embedded systems where issues of safety-criticality or computer security are paramount. Originally, three versions of SPARK existed (SPARK83, SPARK95, SPARK2005), based on Ada 83, Ada 95, and Ada 2005 respectively. A fourth version, SPARK 2014, based on Ada 2012, was released on April 30, 2014. SPARK 2014 is a complete re-design of the language and supports software verification tools. The SPARK language consists of a well-defined subset of the Ada language that uses contracts to describe the specification of components in a form that is suitable for both static and dynamic verification. SPARK is also designed to eliminate all language constructs that can cause unpredictable behavior. In SPARK83/95/2005, the contracts are encoded in Ada comments and so are ignored by any standard Ada compiler, but are processed by the SPARK Examiner and its associated tools. These earlier versions focus on static verification of contracts. SPARK 2014, in contrast, uses Ada 2012's built-in syntax of aspects to express contracts, bringing them into the core of the language. The main tool for SPARK 2014 (GNATprove) is based on the GNAT/GCC infrastructure, and re-uses almost all of the GNAT Ada 2012 front-end. with Global => null, Depends => (X => X); This specifies that the Increment procedure uses no (neither update nor read) global variable and that the only data item used in calculating the new value of X is X alone. Alternatively, the specification may be written as: procedure Increment (X : in out Counter_Type) with Global => (In_Out => Count), Depends => (Count => (Count, X), X => null); This specifies that Increment will use the global variable Count in the same package as Increment , that the exported value of Count depends on the imported values of Count and X , and that the exported value of X does not depend on any variables at all and it will be derived from constant data only. If GNATprove is then run on the specification and corresponding body of a subprogram, it will analyse the body of the subprogram to build up a model of the information flow. This model is then compared against what has been specified by the annotations and any discrepancies reported to the user. These specifications can be further extended by asserting various properties that either need to hold when a subprogram is called (preconditions) or that will hold once execution of the subprogram has completed (postconditions). For example, if writing: procedure Increment (X : in out Counter_Type) with Global => null, Depends => (X => X), Pre => X X = X'Old + 1; This, now, specifies not only that X is derived from itself alone, but also that before Increment is called X must be strictly less than the last possible value of its type (to ensure that the result will never overflow) and that afterward X will be equal to the initial value of X plus one.

References

  1. ^ "Ada2012 Rationale" (PDF) . adacore.com . Archived (PDF) from the original on 18 April 2016 . Retrieved 5 May 2018 . Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  2. ^ "SPARKNaCl" . GitHub . 8 October 2021. Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  3. ^ Brandon, Carl S. (2013). "High Reliability CubeSat Software with SPARK/Ada" (PDF) . iCubeSat.org . Retrieved 20 December 2025 . Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  4. ^ "Securing the Future of Safety and Security of Embedded Software" . 8 January 2020. Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  5. ^ Zabrocki, Adam; Mitic, Marko (8 August 2025). "How to Secure Unique EcosystemShipping 1 Billion+ Cores?" (PDF) . Retrieved 13 August 2025 . {{ cite web }} : CS1 maint: url-status ( link ) Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  6. ^ a b c d e Chapman, Roderick (December 2000). "Industrial experience with SPARK". ACM SIGAda Ada Letters . XX (4): 64– 68. doi : 10.1145/369264.369270 . Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  7. ^ a b c d e f g h i j Chapman, Roderick; Dross, Claire; Matthews, Stuart; Moy, Yannick (March 2024). "Co-Developing Programs and Their Proof of Correctness" . Communications of the ACM . 67 (3): 84– 94. doi : 10.1145/3624728 . Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  8. ^ a b c d Ross, Philip E. (September 2005). "The Exterminators" . IEEE Spectrum . 42 (9): 36– 41. doi : 10.1109/MSPEC.2005.1502527 . ISSN 0018-9235 . S2CID 26369398 . Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  9. ^ a b Handy, Alex (24 August 2010). "Ada-derived Skein crypto shows SPARK" . SD Times . BZ Media LLC . Retrieved 31 August 2010 . Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
  10. ^ "SPARK – The SPADE Ada Kernel (including RavenSPARK)" . AdaCore . Retrieved 30 June 2021 . Wikipedia revision 1369373688, retrieved 2026-11-19 · 1795042800.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"SPARK (programming language)". 1786715669. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1369373688

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·