\chapter{Implementation} \label{chap:implementation} Our implementation of the Demand Driven Strategy Improvement algorithm presented in Chapter \ref{chap:contribution} is in C++. We chose to develop it in C++ for two major reasons: \begin{itemize} \item C++ provides a programmer with fine-grained control of resources, in particular memory. \item The LLVM/Clang framework is written in C++. As integration with LLVM/Clang was always a major goal for this project, C++ was the obvious choice of language. \end{itemize} The solver was developed using only the STL for the core of the solver. A front-end was developed using the ANTLR parser generator \cite{antlr} to test the solver separately to the LLVM/Clang integration. \section{Solver} \section{LLVM/Clang} \subsection{Chain construction} \lstinputlisting{implementation/experiments/chain.c}