<s>
PROMELA	B-Application
(	O
Process	O
or	O
Protocol	O
Meta	O
Language	O
)	O
is	O
a	O
verification	O
modeling	B-Language
language	I-Language
introduced	O
by	O
Gerard	O
J	O
.	O
Holzmann	O
.	O
</s>
<s>
The	O
language	O
allows	O
for	O
the	O
dynamic	O
creation	O
of	O
concurrent	B-Operating_System
processes	O
to	O
model	O
,	O
for	O
example	O
,	O
distributed	B-Architecture
systems	I-Architecture
.	O
</s>
<s>
In	O
PROMELA	B-Application
models	O
,	O
communication	O
via	O
message	O
channels	O
can	O
be	O
defined	O
to	O
be	O
synchronous	O
(	O
i.e.	O
,	O
rendezvous	O
)	O
,	O
or	O
asynchronous	O
(	O
i.e.	O
,	O
buffered	O
)	O
.	O
</s>
<s>
PROMELA	B-Application
models	O
can	O
be	O
analyzed	O
with	O
the	O
SPIN	B-Application
model	I-Application
checker	I-Application
,	O
to	O
verify	O
that	O
the	O
modeled	O
system	O
produces	O
the	O
desired	O
behavior	O
.	O
</s>
<s>
An	O
implementation	O
verified	O
with	O
Isabelle/HOL	B-Application
is	O
also	O
available	O
,	O
as	O
part	O
of	O
the	O
Computer	O
Aided	O
Verification	O
of	O
Automata	O
(	O
CAVA	O
)	O
project	O
.	O
</s>
<s>
Files	O
written	O
in	O
Promela	B-Application
traditionally	O
have	O
a	O
.pml	O
file	O
extension	O
.	O
</s>
<s>
PROMELA	B-Application
is	O
a	O
process-modeling	O
language	O
whose	O
intended	O
use	O
is	O
to	O
verify	O
the	O
logic	O
of	O
parallel	O
systems	O
.	O
</s>
<s>
Given	O
a	O
program	O
in	O
PROMELA	B-Application
,	O
Spin	B-Application
can	O
verify	O
the	O
model	O
for	O
correctness	O
by	O
performing	O
random	O
or	O
iterative	O
simulations	O
of	O
the	O
modeled	O
system	O
's	O
execution	O
,	O
or	O
it	O
can	O
generate	O
a	O
C	B-Language
program	I-Language
that	O
performs	O
a	O
fast	O
exhaustive	O
verification	O
of	O
the	O
system	O
state	O
space	O
.	O
</s>
<s>
During	O
simulations	O
and	O
verifications	O
,	O
SPIN	B-Application
checks	O
for	O
the	O
absence	O
of	O
deadlocks	O
,	O
unspecified	O
receptions	O
,	O
and	O
unexecutable	O
code	O
.	O
</s>
<s>
Finally	O
,	O
it	O
supports	O
the	O
verification	O
of	O
linear	O
time	O
temporal	O
constraints	O
;	O
either	O
with	O
Promela	B-Application
never-claims	O
or	O
by	O
directly	O
formulating	O
the	O
constraints	O
in	O
temporal	O
logic	O
.	O
</s>
<s>
Each	O
model	O
can	O
be	O
verified	O
with	O
SPIN	B-Application
under	O
different	O
types	O
of	O
assumptions	O
about	O
the	O
environment	O
.	O
</s>
<s>
Once	O
the	O
correctness	O
of	O
a	O
model	O
has	O
been	O
established	O
with	O
SPIN	B-Application
,	O
that	O
fact	O
can	O
be	O
used	O
in	O
the	O
construction	O
and	O
verification	O
of	O
all	O
subsequent	O
models	O
.	O
</s>
<s>
PROMELA	B-Application
programs	O
consist	O
of	O
processes	O
,	O
message	O
channels	O
,	O
and	O
variables	O
.	O
</s>
<s>
Processes	O
are	O
global	O
objects	O
that	O
represent	O
the	O
concurrent	B-Operating_System
entities	O
of	O
the	O
distributed	B-Architecture
system	I-Architecture
.	O
</s>
<s>
The	O
basic	O
data	O
types	O
used	O
in	O
PROMELA	B-Application
are	O
presented	O
in	O
the	O
table	O
below	O
.	O
</s>
<s>
Multi-dimensional	O
arrays	O
can	O
be	O
defined	O
indirectly	O
with	O
the	O
help	O
of	O
the	O
typedef	B-Language
construct	O
(	O
see	O
below	O
)	O
.	O
</s>
<s>
Initially	O
,	O
in	O
the	O
PROMELA	B-Application
model	O
,	O
just	O
one	O
process	O
will	O
be	O
executed	O
:	O
a	O
process	O
of	O
type	O
init	O
,	O
that	O
must	O
be	O
declared	O
explicitly	O
in	O
every	O
PROMELA	B-Application
specification	O
.	O
</s>
<s>
This	O
allows	O
for	O
dynamic	O
creation	O
of	O
processes	O
in	O
PROMELA	B-Application
.	O
</s>
<s>
Note	O
that	O
atomic	O
sequences	O
restrict	O
the	O
amount	O
of	O
interleaving	O
that	O
is	O
allowed	O
in	O
a	O
distributed	B-Architecture
system	I-Architecture
.	O
</s>
<s>
There	O
are	O
three	O
control	O
flow	O
constructs	O
in	O
PROMELA	B-Application
.	O
</s>
<s>
The	O
first	O
statement	O
of	O
a	O
control	O
sequence	O
is	O
called	O
a	O
guard	B-Language
.	O
</s>
<s>
If	O
more	O
than	O
one	O
guard	B-Language
is	O
executable	O
,	O
one	O
of	O
the	O
corresponding	O
sequences	O
is	O
selected	O
non-deterministically	O
.	O
</s>
<s>
(	O
Opposite	O
,	O
the	O
occam	B-Language
programming	I-Language
language	I-Language
would	O
stop	O
or	O
not	O
be	O
able	O
to	O
proceed	O
on	O
no	O
executable	O
guards	O
.	O
)	O
</s>
<s>
describes	O
a	O
repetition	O
structure	O
in	O
PROMELA	B-Application
.	O
</s>
<s>
An	O
important	O
language	B-Language
construct	I-Language
in	O
PROMELA	B-Application
that	O
needs	O
a	O
little	O
explanation	O
is	O
the	O
assert	O
statement	O
.	O
</s>
<s>
If	O
,	O
however	O
,	O
the	O
condition	O
does	O
not	O
necessarily	O
hold	O
,	O
the	O
statement	O
will	O
produce	O
an	O
error	O
during	O
verifications	O
with	O
SPIN	B-Application
.	O
</s>
<s>
A	O
PROMELA	B-Application
definition	O
can	O
be	O
used	O
to	O
introduce	O
a	O
new	O
name	O
for	O
a	O
list	O
of	O
data	O
objects	O
of	O
predefined	O
or	O
earlier	O
defined	O
types	O
.	O
</s>
<s>
The	O
access	O
to	O
the	O
fields	O
declared	O
in	O
a	O
typedef	B-Language
construction	O
is	O
done	O
in	O
the	O
same	O
manner	O
as	O
in	O
C	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
is	O
a	O
valid	O
PROMELA	B-Application
sequence	O
that	O
assigns	O
to	O
the	O
field	O
Field1	O
of	O
the	O
variable	O
x	O
the	O
value	O
1	O
.	O
</s>
<s>
The	O
semantics	O
of	O
executability	O
provides	O
the	O
basic	O
means	O
in	O
Promela	B-Application
for	O
modeling	O
process	O
synchronizations	O
.	O
</s>
<s>
When	O
Spin	B-Application
analyzes	O
a	O
model	O
like	O
the	O
above	O
,	O
it	O
will	O
verify	O
the	O
choices	O
with	O
a	O
non-deterministic	O
algorithm	O
,	O
where	O
all	O
executable	O
choices	O
will	O
be	O
explored	O
.	O
</s>
<s>
However	O
,	O
when	O
Spin	B-Application
's	O
simulator	O
visualizes	O
possible	O
non-verified	O
communication	O
patterns	O
,	O
it	O
may	O
use	O
a	O
random	O
generator	O
to	O
resolve	O
the	O
"	O
non-deterministic	O
"	O
choice	O
.	O
</s>
<s>
In	O
addition	O
,	O
it	O
is	O
also	O
possible	O
to	O
generate	O
executable	O
code	O
from	O
Promela	B-Application
models	O
using	O
Refinement	O
.	O
</s>
