<s>
Invariant-based	B-Application
programming	I-Application
is	O
a	O
programming	O
methodology	O
where	O
specifications	B-Application
and	O
invariants	B-Application
are	O
written	O
before	O
the	O
actual	O
program	O
statements	O
.	O
</s>
<s>
Writing	O
down	O
the	O
invariants	B-Application
during	O
the	O
programming	O
process	O
has	O
a	O
number	O
of	O
advantages	O
:	O
it	O
requires	O
the	O
programmer	O
to	O
make	O
their	O
intentions	O
about	O
the	O
program	O
behavior	O
explicit	O
before	O
actually	O
implementing	O
it	O
,	O
and	O
invariants	B-Application
can	O
be	O
evaluated	O
dynamically	O
during	O
execution	O
to	O
catch	O
common	O
programming	O
errors	O
.	O
</s>
<s>
Furthermore	O
,	O
if	O
strong	O
enough	O
,	O
invariants	B-Application
can	O
be	O
used	O
to	O
prove	O
the	O
correctness	O
of	O
the	O
program	O
based	O
on	O
the	O
formal	B-Application
semantics	I-Application
of	O
program	O
statements	O
.	O
</s>
<s>
A	O
combined	O
programming	O
and	O
specification	B-Application
language	O
,	O
connected	O
to	O
a	O
powerful	O
formal	O
proof	O
system	O
,	O
will	O
generally	O
be	O
required	O
for	O
full	O
verification	O
of	O
non-trivial	O
programs	O
.	O
</s>
<s>
In	O
most	O
existing	O
programming	O
languages	O
the	O
main	O
organizing	O
structures	O
are	O
control	O
flow	O
blocks	O
such	O
as	O
for	B-Language
loops	I-Language
,	O
while	O
loops	O
and	O
if	O
statements	O
.	O
</s>
<s>
Such	O
languages	O
may	O
not	O
be	O
ideal	O
for	O
invariants-first	O
programming	O
,	O
since	O
they	O
force	O
the	O
programmer	O
to	O
make	O
decisions	O
about	O
control	O
flow	O
before	O
writing	O
the	O
invariants	B-Application
.	O
</s>
<s>
Furthermore	O
,	O
most	O
programming	O
languages	O
do	O
not	O
have	O
good	O
support	O
for	O
writing	O
specifications	B-Application
and	O
invariants	B-Application
,	O
since	O
they	O
lack	O
quantifier	O
operators	O
and	O
one	O
can	O
typically	O
not	O
express	O
higher	O
order	O
properties	O
.	O
</s>
<s>
Actually	O
writing	O
invariants	B-Application
before	O
program	O
statements	O
has	O
been	O
considered	O
in	O
a	O
number	O
of	O
different	O
forms	O
by	O
M.H.	O
</s>
