\documentclass[
% TODO: book format
% paper=210mm:148mm,
% DIV=calc,
a4paper,
listof=totoc,
toc=bib,
]{scrbook}

\title{A Modern Architecture for Constraint Modelling Languages}
\author{Jip J. Dekker}

\input{assets/packages}
\input{assets/layout}
\input{assets/shorthands}

% Bibliography preamble
\addbibresource{assets/bibliography/references.bib}
\addbibresource[label=ownpubs]{assets/bibliography/dekker_publications.bib}

% Glossary / Acronym preamble
\input{assets/glossary}
\input{assets/acronyms}

\begin{document}

\frontmatter{}

\pdfbookmark{Title Page}{title}
\begin{titlepage}
  \begin{center}
    \includegraphics[width=1\linewidth]{assets/img/monash-university-logo}
    \vspace{2cm}

    {%
      \usekomafont{title}{%
        \Huge%
        A Modern Architecture for \\Constraint Modelling Languages%
        \par
      }%
    }
    \vspace{2em}
    {%
      \usekomafont{author}{%
        Jip J. Dekker\par
      }%
    }
    \vspace{3em}
		{
			Master of Computer Science,\\ Uppsala University, Uppsala, Sweden \par
		}
    \vspace{1em}
		{
			Bachelor of Computing Science,\\ Radboud University, Nijmegen, The Netherlands \par
		}

    \vfill
    A thesis submitted for the degree of Doctor of Philosophy at\par
    Monash University in \the\year{}\par
    Dept.\ of Data Science and AI, Faculty of IT
  \end{center}
\end{titlepage}


\hspace{0pt}
\vfill
\begin{center}
  {\Large \textcopyright\ Jip J. Dekker \the\year{}}\par
  \vspace{2em}

	I certify that I have made all reasonable efforts to secure copyright permissions for third-party content included in this thesis and have not knowingly added copyright content to my work without the owner's permission.

\end{center}
\vfill
\pagebreak

\defglsentryfmt[main]{\glsgenentryfmt}
\include{chapters/0_abstract}

\chapter{Declaration}

\noindent{}This thesis is an original work of my research and contains no material which has been accepted for the award of any other degree or diploma at any university or equivalent institution and, to the best of my knowledge and belief, this thesis contains no material previously published or written by another person, except where due reference is made in the text of the thesis.

\vspace{5em}

\hspace{0.3em}\includegraphics[width=2in]{assets/img/signature.pdf}\par
\vspace{-2em}
\makebox[2in]{\dotfill}\par
\vspace{2em}
\hspace{0.6em}Jip J. Dekker\par
\vspace{1em}
\hspace{0.5em}Date: \today

\chapter{Publications}

\noindent{}Some ideas and figures included in this thesis have previously appeared in the following publication:

\begin{refsection}[ownpubs]
  \small
  \nocite{*} % is local to to the enclosing refsection
  \printbibliography[heading=none]
\end{refsection}

\chapter{Acknowledgements}
\vspace{-1em}
\noindent{}This work would not have been possible without the amazing supervision I received during my candidature.
First and foremost, I would like to thank Guido Tack.
Searching for a thousand years, I do not imagine I would find another mentor as knowledgable, kind, and patient.
I would also like to express my deepest thanks to Peter J. Stuckey, whose insights and guidance were instrumental in my research. I will forever be envious of his ability to instantly grasp even the most complex problems.
Furthermore, my sincere thanks go to Andreas Schutt for always keeping an eye out for me and providing an outside perspective when it was required.
Last but not least, appreciation is due to Graeme Gange and Maria Garcia de la Banda for their advice, feedback, and contributions to my research.
I am truly honoured to have had such an excellent team guiding me on this journey.

This thesis has been funded by CSIRO’s Data61.
In addition, I give thanks to Monash University for providing an environment conducive to learning, working, and socializing.
In particular, I would like to thank my friends and colleagues at Monash University.
Their interest in my research and the always captivating discussions have on many occasions given me the motivation required to keep going.
In no particular order, I would like to thank: David, Kevin, Dora, Senthoo, Ali, Alexander, Eddie, Jason, Henk, Mark, Pierre, Daniel, Ariel, Gleb, and Dani.
Especially, I would like to thank Julie Holden, whose writing advice and proofreading helped improve this thesis.

I was introduced to Constraint Programming and \minizinc{} by Pierre Flener when I studied at Uppsala University.
I will forever be grateful for him for introducing me to this field and the other optimizers at Uppsala University that made the field so much fun to work in, such as Jean-Noël, Gustav, Justin, Mats, and Linnea.

Finally, heartfelt thanks to my friends and family, who have kept me sane for the last four years:
my mother, Saskia, for the unlimited amount of support she has always offered me;
my father, Marco, and Natalja, for helping me look to the future;
my siblings, Bram, Guus, and Layla, for providing the necessary distraction from time to time;
my friends abroad, Dries, Johan, Mats, Adrian, and Manon, for staying in contact despite the awful time differences;
and the new friends I made in Australia, Kyron, Rachel, Erin, and Carl, for giving me such a warm welcome.
Above all, I cannot begin to express my thanks to Caitlin, who provided me with her love and support when I needed it most.

\cleardoublepage
\pdfbookmark{\contentsname}{Contents}
\tableofcontents{}
% \listoffigures{}
% \listoftables{}
% \listoflistings{}

\defglsentryfmt[main]{\ifglsused{\glslabel}{\glsgenentryfmt}{\textit{\glsgenentryfmt}}}
\glsresetall{}

\mainmatter{}
\include{chapters/1_introduction}
\include{chapters/2_background}
\include{chapters/3_rewriting}
\include{chapters/4_half_reif}
\include{chapters/5_incremental}
\include{chapters/6_conclusions}

\appendix{}
\include{chapters/A1_minizinc_grammar}
\include{chapters/A2_benchmark}

\backmatter{}
\printbibliography{}

% -- Acronyms
\printglossary[nonumberlist,type=\acronymtype]{}

% -- Glossary
\renewcommand{\glsnamefont}[1]{\titlecap{#1}}
\defglsentryfmt[main]{\textit{\glsgenentryfmt}}
\printglossary[style=altlistgroup]{}

\end{document}
