\noindent{}\jip{This probably needs a ``why?''}

In this chapter, we revisit the \gls{rewriting} of \minizinc{} into \glspl{slv-mod}.
We describe a new \textbf{systematic view of the execution of \minizinc{}} and build on this to propose a new tool chain.
We show how this tool chain allows us to:

\begin{itemize}

	\item efficiently rewrite high-level constraint models with \textbf{minimal overhead},

	\item easily integrate a range of \textbf{optimisation and simplification} techniques,

	\item and effectively \textbf{detect and eliminate dead code} introduced by functional definitions.

\end{itemize}

This chapter is organised as follows.
\Cref{sec:rew-arch} provides an quick overview of the proposed architecture.
\Cref{sec:rew-micronano} introduces the core of our \gls{rewriting} system using the \microzinc{} and \nanozinc{} languages. These new languages provide a new intermediate representation that enables more efficient \gls{rewriting}.
\Cref{sec:rew-simplification} describes how we can perform various processing and simplification steps on this representation
Finally, in \cref{sec:rew-experiments} we report on the experimental results of the prototype implementation.


