% control-incon-upd-asmetal.tex -*-latex-*-

% Copyright (C) 2020 Amin Bandali <bandali@uwaterloo.ca>

% This file is part of Amin Bandali's MMath thesis.

% This thesis is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.

% This thesis is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.

% You should have received a copy of the GNU General Public License
% along with this thesis.  If not, see <https://www.gnu.org/licenses/>.


\begin{figure*}
\begin{lstlisting}[style=asmetal]
// AsmetaL
asm inconupd
import StandardLibrary

signature:
	controlled var: Integer

definitions:
	rule r_varinc = var := var + 1
	rule r_vardec = var := var - 1

	main rule r_Main =
		par
			r_varinc[]
			r_vardec[]
		endpar

default init s0:
	function var = 42
\end{lstlisting}
\caption{Inconsistent update of a snapshot variable in \asmetal}
\label{fig:control/incon-upd-asmetal}
\end{figure*}


%% Local Variables:
%% tex-main-file: "../bandali-mmath-thesis.tex"
%% End:
