Parallel composition

The notion of instant really becomes visible when parallel computations occur. The parallel execution of two expressions is denoted e1 || e2 (boolean disjuction is denoted e1 or e2). It guarantees that the two expressions are executed at each instant.

#exec (   run (non_instantaneous_loop 10)
       || run (non_instantaneous_loop 10) );;

Notice that each instance of the process non_instantaneous_loop prints one number per instant. In the following example, the function instantaneous_loop is executed in one instant (since it is not a process, run is not needed to apply it)

#exec (   run (non_instantaneous_loop 10)
       || instantaneous_loop 10 );;

Notice that when instantaneous_loop starts executing, it only stops after having printed the ten numbers (i.e., at termination), and not after each number.