\documentclass{beamer}
\usetheme[style=plain]{uu}

%% unicode support, for text and code :)
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{autofe}

\usepackage{amsmath}
\usepackage{stmaryrd}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{hyperref}


%% imports, colors and other definitions for source code
\usepackage{listingsutf8}

\usepackage{color}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{
    language=Haskell,
    extendedchars=\true,
    basicstyle=\footnotesize,
    numbers=left,
    numberstyle=\tiny\color{gray},
    stepnumber=1,
    numbersep=5pt,
    backgroundcolor=\color{white},
    showspaces=false,
    showtabs=false,
    tabsize=4,
    captionpos=b,
    breakatwhitespace=false,
    title=\lstname,
    keywordstyle=\color{blue},
    commentstyle=\color{dkgreen},
    stringstyle=\color{mauve},
    morekeywords={*,...}
}


%% Metainformation
\title[Ants]{AntGen EDSL}

\date{\today}

\author[Alpuim, Binsbergen, Pizani Flor]
{
    J.~Alpuim
    \and L.T. van~Binsbergen
    \and J.P.~Pizani Flor
}

\institute[Utrecht University]
{
    Department of Information and Computing Sciences,
    Utrecht University
}


%% The document itself
\begin{document}
    \begin{frame}
        \titlepage
    \end{frame}

    \begin{frame}
        \frametitle{Table of Contents}
        \tableofcontents
    \end{frame}

    \section{The Application}
        \subsection{Current strategy}
        \begin{frame}
            \frametitle{Current strategy}
            Our main strategy consists of
            \begin{itemize}
                \item Draw ``highways'' from the corners of the nest
                \item Look for food using a ``ricochet'' movement
                \item Use ``highways'' to come back to the nest
            \end{itemize}
        \end{frame}

        \subsection{Improvements}
        \begin{frame}
            \frametitle{Possible improvements}
            \begin{itemize}
                \item Protecting corners of the nest
                \item Drawing local roads
                \item Avoiding congestions
            \end{itemize}
        \end{frame}


    \section{The Library}
        \subsection{AntStrategies}
        \begin{frame}
        \frametitle{AntStrategies}
            Some examples of high-level strategies include:
            \begin{itemize}
                \item Ricochet walk
                \item Random walk
                \item Follow any pheromone track
                \item Draw any pheromone track
            \end{itemize}
        \end{frame}

        \subsection{AntMoves}
        \begin{frame}
        \frametitle{Ant moves}
            Some examples of simple moves include:
            \begin{itemize}
                \item Safe move
                \item Random choices
                \item Interleaving strategies
            \end{itemize}
        \end{frame}


    \section{The Language (EDSL)}
        \subsection{Imperative-ish constructs}
        \begin{frame}
            \frametitle{Imperative-ish constructs}
            We developed some imperative-like constructs in order to get a well
            defined flow of control for each program:

            \begin{itemize}
                \item Sequence
                \item Loops (while, forever)
                \item Conditionals (ifThen, ifThenElse, side-effecting test, case)
                \item Boolean operators
            \end{itemize}
        \end{frame}

        \subsection{Translation to Ant assembly}
        \begin{frame}
            \frametitle{Translation to Ant assembly}

            \begin{itemize}
                \item EDSL datatypes
                \item Semantic functions
                \item Boolean algebra
            \end{itemize}
        \end{frame}


    \section{Compiling to Assembly}
        \subsection{Composing assembly blocks}
        \begin{frame}
            \frametitle{Composing assembly blocks}
            \begin{itemize}
                \item One composing function per imperative construct
                \item Using supply monad to get ant states
                \item Map AntState AntInstruction
                \begin{itemize}
                    \item with an initial and final state
                \end{itemize}
            \end{itemize}
        \end{frame}

        \subsection{Program transformations}
        \begin{frame}
            \frametitle{Program transformations}
            We have used two functions to get a full-working ant assembly code:
            \begin{itemize}
                \item Ghostbusters
                \item Keys to line numbers (ordering the map to $ [0, n-1] $)
            \end{itemize}
        \end{frame}


\end{document}
