\documentclass[10pt,a4paper]{report}
\usepackage[top=3cm, bottom=2.5cm, left=3cm, right=2.5cm] {geometry}
\usepackage {bsymb,b2latex}
\usepackage{fancyhdr,lastpage,color}
\lhead{\rm An Event-B Specification of pw0}
\rhead {\rm Page \thepage~of \pageref{LastPage}}
\lfoot{}\cfoot{}\rfoot{}
\pagestyle{fancy}
%---------------------------------------------------------
\begin{document}
\thispagestyle{empty}
\begin{description}
\BTitle{pw0}{13 Dec 2011}{11:10:16 PM}
\MACHINE{pw0}
\VARIABLES
	\begin{description}
		\Item{ ENVIRONMENT }
		\Item{ CONTROLLING }
	\end{description}
\INVARIANTS
	\begin{description}
		\nItemX{ typeof\_ENVIRONMENT }{ ENVIRONMENT \in  BOOL }
		\nItemX{ typeof\_CONTROLLING }{ CONTROLLING \in  BOOL }
		\nItemX{ distinct\_states\_in\_rrm01 }{ partition(\{ TRUE\} , \{ ENVIRONMENT\}  \binter  \{ TRUE\} , \{ CONTROLLING\}  \binter  \{ TRUE\} ) }
	\end{description}
\EVENTS
	\INITIALISATION
		\begin{description}
		\BeginAct
			\begin{description}
			\nItemX{ init\_CONTROLLING }{ CONTROLLING :=  FALSE }
			\nItemX{ init\_ENVIRONMENT }{ ENVIRONMENT :=  TRUE }
			\end{description}
		\EndAct
		\end{description}
	\EVT {Controller}
		\begin{description}
		\WhenGrd
			\begin{description}
			\nItemX{ isin\_CONTROLLING }{ CONTROLLING = TRUE }
			\end{description}
		\ThenAct
			\begin{description}
			\nItemX{ enter\_ENVIRONMENT }{ ENVIRONMENT :=  TRUE }
			\nItemX{ leave\_CONTROLLING }{ CONTROLLING :=  FALSE }
			\end{description}
		\EndAct
		\end{description}
	\EVT {PE}
		\begin{description}
		\WhenGrd
			\begin{description}
			\nItemX{ isin\_ENVIRONMENT }{ ENVIRONMENT = TRUE }
			\end{description}
		\ThenAct
			\begin{description}
			\nItemX{ enter\_CONTROLLING }{ CONTROLLING :=  TRUE }
			\nItemX{ leave\_ENVIRONMENT }{ ENVIRONMENT :=  FALSE }
			\end{description}
		\EndAct
		\end{description}
\END
\end{description}
\end{document}
