Modeling Language for SPIN-Promela

Modeling Language: The modeling language used for SPIN is called Promela (Process Meta Language). In fact, the name SPIN stands for Simple Promela Interpreter. Promela is a powerful C-like specification language with a variety of synchronization primitives that enables construction of models of distributed systems. Promela is a guarded command language for specifying possibly non-deterministic system behaviors in a distributed system design. It allows for the dynamic creation of concurrent processes which communicate synchronously or asynchronously via message channels.

For example, the following Promela specification describes two processes P and Q that synchronize over a critical region.

2110_promela1.jpg

A Promela model consists of declarations of types, channels, variables, and processes, as well as facilities for initializing the processes. For example,

2359_promela2.jpg

A model consists of a set of concurrent processes, each in turn consisting of a set of atomic guarded actions or transitions. An action whose guard is true is called enabled and can be executed; otherwise, it is disabled and cannot be executed. Actions are not really executed concurrently; rather, they are non-deterministically interleaved, and this is used to model concurrency. Also processes do not have to terminate, which is useful when modeling reactive systems.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.