Source

thesis / index.tex

% NTNU M.SC thesis B5 page size standard
\documentclass[pdftex,10pt,b5paper,twoside]{book}
\usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{url} % breakes long urls prettier over more than one line
\usepackage{graphicx} % support graphics
\usepackage{float} % position of figures
\usepackage{paralist} % inline lists
\usepackage{verbatim} % multi-line comments
\usepackage{booktabs} % Professional tables
\usepackage{tabularx} % Simple column stretching
\usepackage{multirow} % Row spanning
\usepackage{wrapfig} % Wrap text around figures
\usepackage{caption} % Hide some tables from list of tables
\usepackage{lmodern} % Include font in generated PDF
\usepackage{appendix} % More control over appendices
\usepackage{todonotes} % Add todo notes to the paper
\usepackage{xspace} % Smartly adds correct space after simple macros
\usepackage{array}
\usepackage{listings}
\usepackage[chapter]{minted} % Nice syntax coloring of source code
\usepackage{color}
\usepackage[Sonny]{fncychap} % Only Lenny and Sonny seems to work!!
\usepackage{textcomp}
\usepackage[square, numbers, sort&compress]{natbib}
\usepackage[colorlinks,pageanchor,linkcolor=black,anchorcolor=black,filecolor=black,citecolor=black,menucolor=black,urlcolor=black,bookmarksopen=true,bookmarksopenlevel=1]{hyperref}
\usepackage[acronym, toc]{glossaries} % Handle acronyms


%=======================
% Settings and commands
%=======================
\setcounter{tocdepth}{1} % Depth of table of contents
\glsdisablehyper % Make glossaries plain text instead of hyperlinks
\makeglossaries

% Configure links in pdfs
%-------------------------
\hypersetup{%
    bookmarksopen=false, % Hide bookmarks menu
    colorlinks=true, % Don't wrap links in colored boxes
    pdfborder={0 0 0} % Remove ugly boxes
}

% Minted options
%----------------
\makeatletter
\minted@define@extra{numbers} % Expose numbers option from fancyvbr
\makeatother

% Command for Python minted listing
%-----------------------------------
\newcommand{\mypycode}[3]{%
\begin{listing}[htbp]
	\inputminted[numbersep=2pt,numbers=right,fontsize=\footnotesize,frame=lines]{python}{#1}
	\vspace{-10pt}
	\caption{#3\label{lst:#2}}
\end{listing}}

% Command for Haskell minted listing
%------------------------------------
\newcommand{\myhacode}[3]{%
\begin{listing}[htbp]
	\inputminted[numbersep=2pt,numbers=right,fontsize=\footnotesize,frame=lines]{haskell}{#1}
	\vspace{-10pt}
	\caption{#3\label{lst:#2}}
\end{listing}}

% System F commands
%-------------------
\newcommand{\sysf}{System \( F \)\xspace}
\newcommand{\sysfo}{System \( F_\omega \)\xspace}
\newcommand{\sysfc}{System \( F_C \)\xspace}
\newcommand{\sysft}{System \( FC_2 \)\xspace}
\newcommand{\sysfp}{System \( F_C^\uparrow \)\xspace}

% PyPy JIT hints
%----------------
\newcommand{\hint}[1]{\texttt{#1}\xspace}
\newcommand{\hintmp}{\texttt{merge\_point}\xspace}
\newcommand{\hintcej}{\texttt{can\_enter\_jit}\xspace}

% Autoref and pageref command
%-----------------------------
\newcommand{\mypref}[1]{\autoref{#1} on page~\pageref{#1}}
\newcommand{\mysref}[1]{\autoref{#1}, \hyperref[#1]{page \pageref{#1}}}
\newcommand{\mycref}[1]{\hyperref[#1]{Chapter~\ref*{#1}}}
\newcommand{\mylisting}[1]{\hyperref[#1]{Listing~\ref*{#1}} on page~\pageref{#1}}
\newcommand{\mylst}[1]{\hyperref[#1]{Listing~\ref*{#1}}}

% Misc commands
%---------------
\newcommand{\mybash}[1]{\begin{quote}\texttt{#1}\end{quote}}
\newcommand{\myrevision}{branch ``even'', revision \texttt{89f8127667bb}}
\newcommand\ie{i.e.,\xspace}
\newcommand\eg{e.g.,\xspace}
\newcommand\etc{etc.\@\xspace}
\newcommand{\mycode}[1]{\texttt{#1}} % Short code emphasize
\newcommand{\mytodo}[1]{\todo[inline, size=\tiny]{#1}}


\title{Trace-based just-in-time compiler for Haskell with RPython}
\author{Even Wiik Thomassen}
\date{\today}
\include{acronyms}
\begin{document}


%==============
% Front matter
%==============
\frontmatter

% Title page
%------------
\include{title}

% Preface
%---------
%\include{preface}

% Table of contents
%-------------------
\phantomsection
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents

% List of todos
%----------------
\phantomsection
\addcontentsline{toc}{chapter}{List of todos}
\listoftodos

% List of figures
%-----------------
\phantomsection
\addcontentsline{toc}{chapter}{List of figures}
\renewcommand{\listfigurename}{List of figures}
\listoffigures

% List of tables
%----------------
\phantomsection
\addcontentsline{toc}{chapter}{List of tables}
\renewcommand{\listtablename}{List of tables}
\listoftables

% List of listings
%------------------
\phantomsection
\addcontentsline{toc}{chapter}{List of listings}
\listoflistings


%=============
% Main matter
%=============
\mainmatter

% Chapters
%----------
\include{introduction}
\include{ghc} % Haskell, GHC, Core
\include{rpython} % Python, PyPy, RPython, JIT
\include{pyhaskell} % Everyhing about PyHaskell
\include{extcore} % GHC's External Core
\include{jit} % JIT techniques (method)
\include{lowlevel} % Low level code examples
\include{benchmarks} % Describe how we benchmark
\include{evaluation}  % (result)
%\include{discussion}
%\include{conclusion}
\include{related}

% Appendices
%------------
\appendix
\include{appendices}


%=============
% Back matter
%=============
\backmatter

% References
%------------
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\bibliography{bibliography}{}
\bibliographystyle{plainnat}

% List of acronyms
%------------------
\phantomsection
\printglossaries

\end{document}