
\chapter{Running manual}

The executable program was implemented as part of this diploma thesis. Source code
files for this program are delivered on the memory medium that comes with the diploma
thesis, or can be downloaded from the following GIT repository:
\begin{lstlisting}
https://github.com/w0301/dp_thesis
\end{lstlisting}

To build the executable, following steps are needed:
\begin{enumerate}
  \item Change current working directory to the main source directory located on
  the memory medium:
  \begin{lstlisting}
    cd "interpreter/"
  \end{lstlisting}

  \item Create the build directory and enter it:
  \begin{lstlisting}
    mkdir -p "build/" && cd "build/"
  \end{lstlisting}

  \item Run \textit{CMake} to generate makefiles:
  \begin{lstlisting}
    cmake ..
  \end{lstlisting}

  \item Run \textit{make} to compile the source codes:
  \begin{lstlisting}
    make
  \end{lstlisting}

  \item Sometimes, the first build fails because of some \textit{CMake} dependencies issues.
  If it happened rerun \textit{CMake} and \textit{make} again.
  \begin{lstlisting}
    cmake .. && make
  \end{lstlisting}
\end{enumerate}

The executable allows to perform all experiments that were presented in this diploma thesis:
\begin{enumerate}
  \item To perform simple scheduler performance experiment:
  \begin{lstlisting}
    ./build/interpreter --test-scheduler \\
        <messages_count> <variables_count>
  \end{lstlisting}
  Here the \textit{<messages\_count>} and the \textit{<variables\_count>} are integer parameters.

  \item To perform server-client application test:
  \begin{lstlisting}
    ./build/interpreter --test-server <duration>
  \end{lstlisting}
  Here the \textit{<duration>} is an integer parameter.

  \item To perform GUI application test:
  \begin{lstlisting}
    ./build/interpreter --test-gui <duration>
  \end{lstlisting}
  Here the \textit{<duration>} is an integer parameter.

  \item To interpret specific source code file:
  \begin{lstlisting}
    ./build/interpreter <path_to_file> <arg>
  \end{lstlisting}
  Here the \textit{<path\_to\_file>} is a path of the file that will be interpreted and
  the \textit{<arg>} is a string argument that will be passed to the main function.
\end{enumerate}
