\[
\newcommand{\tr}{\Rightarrow}
\newcommand{\trs}{\tr^{\!\ast}}
\newcommand{\rlnm}[1]{\mathsf{(#1)}}
\newcommand{\rred}[1]{\xrightarrow{#1}}
\newcommand{\rreds}[1]{\mathrel{\xrightarrow{#1}\!\!^*}}
\newcommand{\cl}{\mathsf{Cl}}
\newcommand{\pow}{\mathcal{P}}
\newcommand{\matches}{\mathrel{\mathsf{matches}}}
\newcommand{\kw}[1]{\mathsf{#1}}
\]
Concrete While Loops
1
2
3
4
| while (x > 0) {
x = x-1;
y = y+1;
}
|
1
2
3
| while x > 0:
x = x - 1
y = y + 1
|
1
2
3
4
| while !x > 0 do
x := !x - 1
y := !y + 1
done
|
1
2
3
4
| while x > 0 loop
x := x - 1;
y := y - 1;
end loop
|