How can I write the following code in Promela:
I tried the following but I do not think that it is correct:
int c0 = 0;
int d1 = 0;
int d2 = 0;
do
:: true ->
d1 = x1;
d2 = x2;
if
:: (c0 == c) ->
if
:: (c0%2==0) ->
c0 = c;
:: else;
fi;
:: else;
fi;
printf(" To simulate use(d1,d2) “);
od;
The variables in the code are not important. I just want the logic to be similar to the example algorithm above.