PROMELA and SPIN:
Verification of Parallel Programming Models
(http://cm.bell-labs.com/cm/cs/what/spin/Man/promela.html)

Definitions:

SPIN: a generic verification system that supports the design and verification of asynchronous process systems

SPIN as a formal methods tool:

SPIN

PROMELA Example: A model of the mars lunar lander Sojourner

PROMELA Example: A model of an Alarm Clock

PROMELA: Elements

while(a!=b) -> skip is same semantics as (a==b) ->


    chan Transfer = [2] of (mtype, bit, short, chan),
        Device[3] = [0] of (byte),
        Channel

q!var1,const,var2,... or, equivalently q!var1(const,var2,...)
q?var1,const,var2,... or, equivalently q?var1(const,var2,...)
 

Msg foo;
chan stream = [0] of {mtype, Msg}
"accessed as"
foo.a[1]


proctype pname{ chan In, Out; byte id)
{statements}
run pname(Transfer, Device[0], 0)
OR
active [N] proctype pname(...) provided (E) priority M, where E is enabling expression(condition)


init{....}

Statements are executed if enabled: assignments, declarations, assert, skip, goto, and break are always enabled.


if
:: statements
:: statements
fi


do
:: statements
:: statements
od