<s>
SPARK	B-Language
is	O
a	O
formally	B-Application
defined	I-Application
computer	O
programming	O
language	O
based	O
on	O
the	O
Ada	B-Language
programming	I-Language
language	I-Language
,	O
intended	O
for	O
the	O
development	O
of	O
high	B-Application
integrity	I-Application
software	I-Application
used	O
in	O
systems	O
where	O
predictable	O
and	O
highly	O
reliable	O
operation	O
is	O
essential	O
.	O
</s>
<s>
Originally	O
,	O
there	O
were	O
three	O
versions	O
of	O
the	O
SPARK	B-Language
language	I-Language
(	O
SPARK83	O
,	O
SPARK95	O
,	O
SPARK2005	O
)	O
based	O
on	O
Ada	B-Language
83	I-Language
,	O
Ada	B-Language
95	I-Language
and	O
Ada	B-Language
2005	I-Language
respectively	O
.	O
</s>
<s>
A	O
fourth	O
version	O
of	O
the	O
SPARK	B-Language
language	I-Language
,	O
SPARK	B-Language
2014	O
,	O
based	O
on	O
Ada	B-Language
2012	I-Language
,	O
was	O
released	O
on	O
April	O
30	O
,	O
2014	O
.	O
</s>
<s>
SPARK	B-Language
2014	O
is	O
a	O
complete	O
re-design	O
of	O
the	O
language	O
and	O
supporting	O
verification	O
tools	O
.	O
</s>
<s>
The	O
SPARK	B-Language
language	I-Language
consists	O
of	O
a	O
well-defined	O
subset	O
of	O
the	O
Ada	B-Language
language	I-Language
that	O
uses	O
contracts	B-Application
to	O
describe	O
the	O
specification	O
of	O
components	O
in	O
a	O
form	O
that	O
is	O
suitable	O
for	O
both	O
static	O
and	O
dynamic	O
verification	O
.	O
</s>
<s>
In	O
SPARK83/95/2005	O
,	O
the	O
contracts	B-Application
are	O
encoded	O
in	O
Ada	B-Language
comments	O
and	O
so	O
are	O
ignored	O
by	O
any	O
standard	O
Ada	B-Language
compiler	B-Language
,	O
but	O
are	O
processed	O
by	O
the	O
SPARK	B-Language
"	O
Examiner	O
"	O
and	O
its	O
associated	O
tools	O
.	O
</s>
<s>
SPARK	B-Language
2014	O
,	O
in	O
contrast	O
,	O
uses	O
Ada	B-Language
2012	I-Language
's	O
built-in	O
"	O
aspect	O
"	O
syntax	O
to	O
express	O
contracts	B-Application
,	O
bringing	O
them	O
into	O
the	O
core	O
of	O
the	O
language	O
.	O
</s>
<s>
The	O
main	O
tool	O
for	O
SPARK	B-Language
2014	O
(	O
GNATprove	O
)	O
is	O
based	O
on	O
the	O
GNAT/GCC	B-Language
infrastructure	I-Language
,	O
and	O
re-uses	O
almost	O
the	O
entirety	O
of	O
the	O
GNAT	B-Language
Ada	B-Language
2012	I-Language
front-end	O
.	O
</s>
<s>
SPARK	B-Language
utilises	O
the	O
strengths	O
of	O
Ada	B-Language
while	O
trying	O
to	O
eliminate	O
all	O
its	O
potential	O
ambiguities	O
and	O
insecure	O
constructs	O
.	O
</s>
<s>
SPARK	B-Language
programs	O
are	O
by	O
design	O
meant	O
to	O
be	O
unambiguous	O
,	O
and	O
their	O
behavior	O
is	O
required	O
to	O
be	O
unaffected	O
by	O
the	O
choice	O
of	O
Ada	B-Language
compiler	B-Language
.	O
</s>
<s>
These	O
goals	O
are	O
achieved	O
partly	O
by	O
omitting	O
some	O
of	O
Ada	B-Language
's	O
more	O
problematic	O
features	O
(	O
such	O
as	O
unrestricted	O
parallel	B-Operating_System
tasking	I-Operating_System
)	O
and	O
partly	O
by	O
introducing	O
contracts	B-Application
which	O
encode	O
the	O
application	O
designer	O
's	O
intentions	O
and	O
requirements	O
for	O
certain	O
components	O
of	O
a	O
program	O
.	O
</s>
<s>
The	O
combination	O
of	O
these	O
approaches	O
allows	O
SPARK	B-Language
to	O
meet	O
its	O
design	O
objectives	O
,	O
which	O
are	O
:	O
</s>
<s>
Consider	O
the	O
Ada	B-Language
subprogram	O
specification	O
below	O
:	O
</s>
<s>
In	O
pure	O
Ada	B-Language
this	O
might	O
increment	O
the	O
variable	O
X	O
by	O
one	O
or	O
one	O
thousand	O
;	O
or	O
it	O
might	O
set	O
some	O
global	O
counter	O
to	O
X	O
and	O
return	O
the	O
original	O
value	O
of	O
the	O
counter	O
in	O
X	O
;	O
or	O
it	O
might	O
do	O
absolutely	O
nothing	O
with	O
X	O
at	O
all	O
.	O
</s>
<s>
With	O
SPARK	B-Language
2014	O
,	O
contracts	B-Application
are	O
added	O
to	O
the	O
code	O
to	O
provide	O
additional	O
information	O
regarding	O
what	O
a	O
subprogram	O
actually	O
does	O
.	O
</s>
<s>
This	O
,	O
now	O
,	O
specifies	O
not	O
only	O
that	O
X	O
is	O
derived	O
from	O
itself	O
alone	O
,	O
but	O
also	O
that	O
before	O
Increment	O
is	O
called	O
X	O
must	O
be	O
strictly	O
less	O
than	O
the	O
last	O
possible	O
value	O
of	O
its	O
type	O
(	O
to	O
ensure	O
that	O
the	O
result	O
will	O
never	O
overflow	B-Error_Name
)	O
and	O
that	O
afterwards	O
X	O
will	O
be	O
equal	O
to	O
the	O
initial	O
value	O
of	O
X	O
plus	O
one	O
.	O
</s>
<s>
GNATprove	O
can	O
also	O
generate	O
a	O
set	O
of	O
verification	B-Application
conditions	I-Application
or	O
VCs	O
.	O
</s>
<s>
numerical	O
overflow	B-Error_Name
.	O
</s>
<s>
Under	O
the	O
hood	O
,	O
GNATprove	O
uses	O
the	O
Why3	O
intermediate	O
language	O
and	O
VC	O
Generator	O
,	O
and	O
the	O
CVC4	O
,	O
Z3	B-Language
,	O
and	O
Alt-Ergo	B-Language
theorem	O
provers	O
to	O
discharge	O
VCs	O
.	O
</s>
<s>
The	O
first	O
version	O
of	O
SPARK	B-Language
(	O
based	O
on	O
Ada	B-Language
83	I-Language
)	O
was	O
produced	O
at	O
the	O
University	O
of	O
Southampton	O
(	O
with	O
UK	O
Ministry	O
of	O
Defence	O
sponsorship	O
)	O
by	O
Bernard	O
Carré	O
and	O
Trevor	O
Jennings	O
.	O
</s>
<s>
The	O
name	O
SPARK	B-Language
was	O
derived	O
from	O
SPADE	B-Language
Ada	I-Language
Kernel	I-Language
,	O
in	O
reference	O
to	O
the	O
SPADE	O
subset	O
of	O
the	O
Pascal	B-Application
programming	I-Application
language	I-Application
.	O
</s>
<s>
In	O
January	O
2010	O
,	O
the	O
company	O
became	O
Altran	B-Language
Praxis	O
.	O
</s>
<s>
In	O
early	O
2009	O
,	O
Praxis	O
formed	O
a	O
partnership	O
with	O
AdaCore	O
,	O
and	O
released	O
"	O
SPARK	B-Language
Pro	O
"	O
under	O
the	O
terms	O
of	O
the	O
GPL	B-License
.	O
</s>
<s>
This	O
was	O
followed	O
in	O
June	O
2009	O
by	O
the	O
SPARK	B-Language
GPL	B-License
Edition	O
2009	O
,	O
aimed	O
at	O
the	O
FOSS	B-License
and	O
academic	O
communities	O
.	O
</s>
<s>
In	O
June	O
2010	O
,	O
Altran-Praxis	O
announced	O
that	O
the	O
SPARK	B-Language
programming	I-Language
language	I-Language
would	O
be	O
used	O
in	O
the	O
software	O
of	O
US	O
Lunar	O
project	O
CubeSat	O
,	O
expected	O
to	O
be	O
completed	O
in	O
2015	O
.	O
</s>
<s>
In	O
January	O
2013	O
,	O
Altran-Praxis	O
changed	O
its	O
name	O
to	O
Altran	B-Language
which	O
in	O
April	O
2021	O
became	O
Capgemini	O
Engineering	O
(	O
following	O
Altran	B-Language
's	O
merger	O
with	O
Capgemini	O
)	O
.	O
</s>
<s>
The	O
first	O
Pro	O
release	O
of	O
SPARK	B-Language
2014	O
was	O
announced	O
on	O
April	O
30	O
,	O
2014	O
,	O
and	O
was	O
quickly	O
followed	O
by	O
the	O
SPARK	B-Language
2014	O
GPL	B-License
edition	O
,	O
aimed	O
at	O
the	O
FLOSS	B-License
and	O
academic	O
communities	O
.	O
</s>
<s>
SPARK	B-Language
has	O
been	O
used	O
in	O
several	O
high	O
profile	O
safety-critical	O
systems	O
,	O
covering	O
commercial	O
aviation	O
(	O
Rolls-Royce	O
Trent	O
series	O
jet	O
engines	O
,	O
the	O
ARINC	O
ACAMS	O
system	O
,	O
the	O
Lockheed	O
Martin	O
C130J	O
)	O
,	O
military	O
aviation	O
(	O
EuroFighter	B-Application
Typhoon	I-Application
,	O
Harrier	O
GR9	O
,	O
AerMacchi	O
M346	O
)	O
,	O
air-traffic	O
management	O
(	O
UK	O
NATS	O
iFACTS	O
system	O
)	O
,	O
rail	O
(	O
numerous	O
signalling	O
applications	O
)	O
,	O
medical	O
(	O
the	O
LifeFlow	O
ventricular	O
assist	O
device	O
)	O
,	O
and	O
space	O
applications	O
(	O
the	O
Vermont	O
Technical	O
College	O
CubeSat	O
project	O
)	O
.	O
</s>
<s>
SPARK	B-Language
has	O
also	O
been	O
used	O
in	O
secure	O
systems	O
development	O
.	O
</s>
<s>
Users	O
include	O
Rockwell	O
Collins	O
(	O
Turnstile	O
and	O
SecureOne	O
cross-domain	O
solutions	O
)	O
,	O
the	O
development	O
of	O
the	O
original	O
MULTOS	O
CA	O
,	O
the	O
NSA	O
Tokeneer	O
demonstrator	O
,	O
the	O
secunet	O
multi-level	O
workstation	O
,	O
the	O
Muen	O
separation	O
kernel	O
and	O
Genode	B-Language
block-device	O
encrypter	O
.	O
</s>
<s>
In	O
August	O
2010	O
,	O
Rod	O
Chapman	O
,	O
principal	O
engineer	O
of	O
Altran	B-Language
Praxis	O
,	O
implemented	O
Skein	B-Algorithm
,	O
one	O
of	O
candidates	O
for	O
SHA-3	B-Algorithm
,	O
in	O
SPARK	B-Language
.	O
</s>
<s>
In	O
comparing	O
the	O
performance	O
of	O
the	O
SPARK	B-Language
and	O
C	O
implementations	O
and	O
after	O
careful	O
optimization	O
,	O
he	O
managed	O
to	O
have	O
the	O
SPARK	B-Language
version	O
run	O
only	O
about	O
5	O
to	O
10%	O
slower	O
than	O
C	O
.	O
Later	O
improvement	O
to	O
the	O
Ada	B-Language
middle-end	O
in	O
GCC	O
(	O
implemented	O
by	O
Eric	O
Botcazou	O
of	O
AdaCore	O
)	O
closed	O
the	O
gap	O
,	O
with	O
the	O
SPARK	B-Language
code	O
matching	O
the	O
C	O
in	O
performance	O
exactly	O
.	O
</s>
<s>
NVIDIA	O
have	O
also	O
adopted	O
SPARK	B-Language
for	O
the	O
implementation	O
of	O
security-critical	O
firmware	O
.	O
</s>
<s>
In	O
2020	O
,	O
Rod	O
Chapman	O
re-implemented	O
the	O
TweetNaCl	O
cryptographic	O
library	O
in	O
SPARK	B-Language
2014	O
.	O
</s>
<s>
The	O
SPARK	B-Language
version	O
of	O
the	O
library	O
has	O
a	O
complete	O
auto-active	O
proof	O
of	O
type-safety	B-Language
,	O
memory-safety	O
and	O
some	O
correctness	O
properties	O
,	O
and	O
retains	O
constant-time	O
algorithms	O
throughout	O
.	O
</s>
<s>
The	O
SPARK	B-Language
code	O
is	O
also	O
significantly	O
faster	O
than	O
TweetNaCl	O
.	O
</s>
