Think Stitch


Sequential Compositions

Sequential Composition represents a process which executes argument processes sequentially. The Sequential Composition can be described by seq form, which has the following format:

(seq process-expr ...)

(seq P Q R) behaves as follows: Firstly it behaves as the process P. If P terminates successfully, it shifts to the process Q and behaves as Q. If Q terminates successfully, it also shifts to the process R and behaves as R. Finally, If R terminates successfully, it means (seq P Q R) terminates successfully.

An Example of Sequential Composition

Process Definitions

We define process S which is a sequential composition of processes P and Q.

(define-process S
  (seq P Q))

(define-process P
  (alt (! a SKIP) (! b STOP)))

(define-process Q
  (! c SKIP))

Computation Tree

29 July, 2013