<s>
The	O
Java	B-Language
Modeling	I-Language
Language	I-Language
(	O
JML	O
)	O
is	O
a	O
specification	B-Application
language	I-Application
for	O
Java	B-Language
programs	O
,	O
using	O
Hoare	O
style	O
pre	O
-	O
and	O
postconditions	O
and	O
invariants	B-Application
,	O
that	O
follows	O
the	O
design	B-Application
by	I-Application
contract	I-Application
paradigm	O
.	O
</s>
<s>
Specifications	O
are	O
written	O
as	O
Java	B-Language
annotation	I-Language
comments	O
to	O
the	O
source	O
files	O
,	O
which	O
hence	O
can	O
be	O
compiled	B-Language
with	O
any	O
Java	B-Language
compiler	B-Language
.	O
</s>
<s>
Various	O
verification	O
tools	O
,	O
such	O
as	O
a	O
runtime	O
assertion	O
checker	O
and	O
the	O
Extended	O
Static	O
Checker	O
(	O
ESC/Java	B-Application
)	O
aid	O
development	O
.	O
</s>
<s>
JML	O
is	O
a	O
behavioural	O
interface	O
specification	B-Application
language	I-Application
for	O
Java	B-Language
modules	O
.	O
</s>
<s>
JML	O
provides	O
semantics	B-Application
to	O
formally	O
describe	O
the	O
behavior	O
of	O
a	O
Java	B-Language
module	O
,	O
preventing	O
ambiguity	O
with	O
regard	O
to	O
the	O
module	O
designers	O
 '	O
intentions	O
.	O
</s>
<s>
JML	O
inherits	O
ideas	O
from	O
Eiffel	B-Language
,	O
Larch	B-Language
and	O
the	O
Refinement	B-Application
Calculus	I-Application
,	O
with	O
the	O
goal	O
of	O
providing	O
rigorous	O
formal	O
semantics	B-Application
while	O
still	O
being	O
accessible	O
to	O
any	O
Java	B-Language
programmer	O
.	O
</s>
<s>
Because	O
specifications	O
can	O
be	O
written	O
as	O
annotations	O
in	O
Java	B-Language
program	O
files	O
,	O
or	O
stored	O
in	O
separate	O
specification	O
files	O
,	O
Java	B-Language
modules	O
with	O
JML	O
specifications	O
can	O
be	O
compiled	B-Language
unchanged	O
with	O
any	O
Java	B-Language
compiler	B-Language
.	O
</s>
<s>
JML	O
specifications	O
are	O
added	O
to	O
Java	B-Language
code	I-Language
in	O
the	O
form	O
of	O
annotations	O
in	O
comments	O
.	O
</s>
<s>
Java	B-Language
comments	O
are	O
interpreted	O
as	O
JML	O
annotations	O
when	O
they	O
begin	O
with	O
an	O
@	O
sign	O
.	O
</s>
<s>
requires	O
Defines	O
a	O
precondition	O
on	O
the	O
method	B-Language
that	O
follows	O
.	O
</s>
<s>
ensures	O
Defines	O
a	O
postcondition	O
on	O
the	O
method	B-Language
that	O
follows	O
.	O
</s>
<s>
signals	O
Defines	O
a	O
postcondition	O
for	O
when	O
a	O
given	O
Exception	B-General_Concept
is	O
thrown	O
by	O
the	O
method	B-Language
that	O
follows	O
.	O
</s>
<s>
assignable	O
Defines	O
which	O
fields	O
are	O
allowed	O
to	O
be	O
assigned	O
to	O
by	O
the	O
method	B-Language
that	O
follows	O
.	O
</s>
<s>
pure	O
Declares	O
a	O
method	B-Language
to	O
be	O
side	O
effect	O
free	O
(	O
like	O
assignable	O
\nothing	O
but	O
can	O
also	O
throw	O
exceptions	O
)	O
.	O
</s>
<s>
Furthermore	O
,	O
a	O
pure	O
method	B-Language
is	O
supposed	O
to	O
always	O
either	O
terminate	O
normally	O
or	O
throw	O
an	O
exception	B-General_Concept
.	O
</s>
<s>
invariant	B-Application
Defines	O
an	O
invariant	B-Application
property	I-Application
of	I-Application
the	I-Application
class	I-Application
.	O
</s>
<s>
loop_invariant	O
Defines	O
a	O
loop	B-Application
invariant	I-Application
for	O
a	O
loop	O
.	O
</s>
<s>
also	O
Combines	O
specification	O
cases	O
and	O
can	O
also	O
declare	O
that	O
a	O
method	B-Language
is	O
inheriting	O
specifications	O
from	O
its	O
supertypes	O
.	O
</s>
<s>
\result	O
An	O
identifier	O
for	O
the	O
return	O
value	O
of	O
the	O
method	B-Language
that	O
follows	O
.	O
</s>
<s>
</s>
<s>
(	O
\exists	O
<decl>; <range-exp>; <body-exp>	O
)	O
The	O
existential	B-Algorithm
quantifier	I-Algorithm
.	O
</s>
<s>
as	O
well	O
as	O
standard	O
Java	B-Language
syntax	I-Language
for	O
logical	O
and	O
,	O
or	O
,	O
and	O
not	O
.	O
</s>
<s>
JML	O
annotations	O
also	O
have	O
access	O
to	O
Java	B-Language
objects	O
,	O
object	O
methods	O
and	O
operators	O
that	O
are	O
within	O
the	O
scope	O
of	O
the	O
method	B-Language
being	O
annotated	O
and	O
that	O
have	O
appropriate	O
visibility	O
.	O
</s>
<s>
The	O
Iowa	O
State	O
JML	O
tools	O
provide	O
an	O
assertion	O
checking	O
compiler	B-Language
jmlc	O
which	O
converts	O
JML	O
annotations	O
into	O
runtime	O
assertions	O
,	O
a	O
documentation	O
generator	O
jmldoc	O
which	O
produces	O
Javadoc	B-Language
documentation	O
augmented	O
with	O
extra	O
information	O
from	O
JML	O
annotations	O
,	O
and	O
a	O
unit	O
test	O
generator	O
jmlunit	O
which	O
generates	O
JUnit	B-Language
test	O
code	O
from	O
JML	O
annotations	O
.	O
</s>
<s>
ESC/Java2	B-Application
,	O
an	O
extended	O
static	O
checker	O
which	O
uses	O
JML	O
annotations	O
to	O
perform	O
more	O
rigorous	O
static	O
checking	O
than	O
is	O
otherwise	O
possible	O
.	O
</s>
<s>
declares	O
itself	O
the	O
successor	O
of	O
ESC/Java2	B-Application
.	O
</s>
<s>
,	O
a	O
dynamic	O
invariant	B-Application
generator	O
.	O
</s>
<s>
KeY	O
,	O
which	O
provides	O
an	O
open	O
source	O
theorem	O
prover	O
with	O
a	O
JML	O
front-end	O
and	O
an	O
Eclipse	B-Application
plug-in	O
(	O
)	O
with	O
support	O
for	O
syntax	O
highlighting	O
of	O
JML	O
.	O
</s>
<s>
,	O
a	O
static	O
verification	O
tool	O
based	O
on	O
the	O
verification	O
platform	O
and	O
using	O
the	O
Coq	B-Application
proof	I-Application
assistant	I-Application
.	O
</s>
<s>
,	O
a	O
plugin	O
for	O
the	O
Eclipse	B-Application
integrated	O
development	O
environment	O
with	O
support	O
for	O
JML	O
syntax	O
and	O
interfaces	O
to	O
various	O
tools	O
that	O
make	O
use	O
of	O
JML	O
annotations	O
.	O
</s>
<s>
,	O
a	O
tool	O
to	O
generate	O
files	O
for	O
running	O
JUnit	B-Language
tests	O
on	O
JML	O
annotated	O
Java	B-Language
files	O
.	O
</s>
<s>
,	O
an	O
open	O
source	O
program	O
analysis	O
tool	O
that	O
statically	O
checks	O
the	O
compliance	O
of	O
a	O
Java	B-Language
program	O
against	O
its	O
Java	B-Language
Modeling	I-Language
Language	I-Language
specification	O
.	O
</s>
