%************************************************
\chapter{Abstract}\label{ch:abstract}
%************************************************

\vspace{-5em}

\noindent{}\Cmls{} are a prominent way to model and solve real world problems.
Their use extends to areas such as scheduling, supply chain management, and transportation.
In the past, these languages served mainly as a standardized interface between different \solvers{}.
The \gls{rewriting} required to translate an \instance{} of a \cmodel{} into a \gls{slv-mod} was negligible.
However, \cmls{} have evolved to include functionality that is no longer directly supported by the target \solver{}.
As such, the \gls{rewriting} process has become more important and complex.

\minizinc{}, one such language, was originally designed for constraint programming \solvers{}, whose \glspl{slv-mod} contain small number of highly complex \constraints{}.
The same \minizinc{} models can now target mixed integer programming and Boolean satisfiability \solvers{}, resulting is a large number of very simple \constraints{}.
Distinctively, the \minizinc{}'s \gls{rewriting} process is founded on its functional language.
It generates \glspl{slv-mod} through the application of increasingly complex \minizinc{} functions from \solver{}-specific libraries.
Consequently, the efficiency of the functional evaluation of the language can be a limiting factor.
For many applications, the current \minizinc{} implementation now requires a significant, and sometimes prohibitive, amount of time to rewrite \instances{}.
This problem is exacerbated by the emerging use of \gls{meta-optimisation} algorithms, which require solving a sequence of closely related \instances{}.

In this thesis we revisit the \gls{rewriting} of functional \cmls{} into \glspl{slv-mod}.
We design and evaluate an architecture for \cmls{} that can accommodate its the modern uses.
At its core lies a formal execution model that allows us rewrite \cmodels{} efficiently and actively manage the \gls{slv-mod}.
We show how it can better detect and eliminate parts of the model that have become unused.
The architecture is extended using a range of well-known simplification techniques to unsure the quality of the produced \glspl{slv-mod}.
In addition, we incorporate new analysis techniques to avoid the use of \glspl{reif} or replace them with \glspl{half-reif}, where possible.

Crucially, the architecture is designed to incorporate incremental \constraint{} modelling in two ways.
Primarily, the \gls{rewriting} process is fully incremental: changes made to the \instance{} through a provided interface require minimal addition \gls{rewriting} effort.
Moreover, we introduce \gls{rbmo}, a way to specify \gls{meta-optimisation} algorithms directly in \minizinc{}.
These specification are executed by a normal \minizinc{} \solver{}, requiring only a slight extension of its capabilities.

Together, the functionality of this architecture helps make \cmls{} a more powerful and attractive approach to solve real world problems.
