I am new to Promela and I'm having some difficulties understanding how to calculate the interleaving possibilities of a model. Which one of the statements is counted in the calculation (how do I know which one to take)? Does process P have 5, as well as Q?
#define N 2
proctype P(){
int counter = 0
do
:: counter<N -> printf("P␣"); counter++
:: else -> break
od
}
proctype Q(){
int counter = 0
do
:: counter<N -> printf("Q␣"); counter++
:: else -> break
od
}
init {
atomic{ run P();
run Q();}
}```
1. Run the model in random and interactive mode. How many interleaving possibilities does
the program have and which?
2. How many possibilities are there for arbitrary values of N?