BIBTEX?=bibtex
BIBTEXFLAGS:=
MAKEGLOSSARIES?=makeglossaries
-MAKEGLOSSARIESFLAGS?=makeglossaries
+MAKEGLOSSARIESFLAGS?=
LATEXFLAGS:=-file-line-error -halt-on-error -no-shell-escape
.PHONY: all clean
$(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump"
%.pdf: %.mlog
- $(GREP) -iFq 'Rerun to get' $< && $(LATEX) $(LATEXFLAGS) $(basename $<) || true
+ if $(GREP) -iFq 'Rerun to get' $<; then $(LATEX) $(LATEXFLAGS) $(basename $<); fi
%.mlog: %.tex %.fmt $(wildcard *.bib) $(wildcard *.tex)
$(LATEX) $(LATEXFLAGS) $<
- $(GREP) -q '^\\bibdata{' $(basename $<).aux && $(BIBTEX) $(BIBTEXFLAGS) $(basename $<) || true
- $(GREP) -q '\@istfilename' $(basename $<).aux && $(MAKEGLOSSARIES) $(MAKEGLOSSARIESFLAGSFLAGS) $(basename $<)
+ if $(GREP) -q '^\\bibdata{' $(basename $<).aux; then $(BIBTEX) $(BIBTEXFLAGS) $(basename $<); fi
+ if $(GREP) -q '\@istfilename' $(basename $<).aux; then $(MAKEGLOSSARIES) $(MAKEGLOSSARIESFLAGSFLAGS) $(basename $<); fi
$(LATEX) $(LATEXFLAGS) $< | tee $@
clean:
--- /dev/null
+\usepackage{listings}
+
+\lstdefinelanguage{Clean}{%
+ alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_`1234567890},
+ alsoletter={~!@\#$\%^\&*-+=?<>:|\\.},
+ morekeywords={generic,implementation,definition,dynamic,module,import,from,where,in,of,case,let,infix,infixr,infixl,class,instance,with,if,derive},
+ sensitive=true,
+ morecomment=[l]{//},
+ morecomment=[n]{/*}{*/},
+ morestring=[b]",
+ morestring=[b]',
+ emptylines=1,
+ basicstyle=\small,
+ identifierstyle=\small\ttfamily,
+ commentstyle=\itshape,
+ keywordstyle=\bfseries,
+ stringstyle=\ttfamily,
+ numbers=none,
+ showstringspaces=false,
+ basewidth=0.45em,
+ columns=[c]fixed,
+ keepspaces=true,
+ breaklines=false,
+ tabsize=4,
+ texcl=true,
+ escapeinside={(\#}{\#)},
+ literate=%
+ % Basic Clean constructs
+ {\\}{{$\lambda\:$}}1
+ {A.}{{$\forall\;\,$}}1
+ {E.}{{$\exists\;\,$}}1
+ {>}{{$>$}}1
+ {<}{{$<$}}1
+ {<=}{{$\leq$}}1
+ {>=}{{$\geq$}}1
+ {<>}{{$\neq$}}1
+ {->}{{$\rightarrow$}}2
+ {<-}{{$\leftarrow$}}1
+ {=}{{$=$}}1
+ {~}{{$\sim$}}1
+ {\#}{{$\sharp$}}1
+ {\{|}{{$\{\!|\!$}}1
+ {|\}}{{$\!|\!\}$}}1
+ {:=}{{$:=$}}2
+ {==}{{$==$}}2
+ {++}{{$+\!\!+$}}2
+ {+++}{{$+\!\!\!\!+\!\!\!\!+$}}2
+ {:==}{{$:==$}}3
+ {\{|*|\}}{{$\{\!|\!\!\star\!\!|\!\}$}}3
+ %
+ % Basic iTask constructs
+ {>||>}{{$\triangleright\triangleright$}}2
+ {>>=}{{\texttt{>>=}}}3
+ {>>|}{{\texttt{>>|}}}3
+ {?>>}{{\texttt{?>>}}}3
+ {!>>}{{\texttt{!>>}}}3
+ {-||-}{{\texttt{-||-}}}4
+ {.||.}{{\texttt{.||.}}}4
+ {.&&.}{{\texttt{.\&\&.}}}4
+}
+
+\newcommand{\CleanInline}[1]{\lstinline[language=Clean]¦#1¦}
+\newcommand{\CI}[1]{\CleanInline{#1}}
+
+\lstdefinestyle{numbers}{numbers=left, stepnumber=1, numberstyle=\tiny, numbersep=5pt}
+
+\lstnewenvironment{CleanCode}{\lstset{language=Clean,identifierstyle=\ttfamily}}{}
+\lstnewenvironment{CleanCodeN}{\lstset{language=Clean,style=numbers}}{}
+\lstnewenvironment{CleanCodeB}{\lstset{language=Clean,frame=single}}{}
+\lstnewenvironment{CleanCodeNB}{\lstset{language=Clean,style=numbers,frame=single}}{}
The main goal of this thesis is to present a way to connect small \gls{IoT}
-devices with high level \gls{TOP} languages.
-
-\section{\acrlong{IoT}}
-
-
-\section{\acrlong{TOP}}
-
-\todo{Structure of the thesis}
-
-
-\gls{TOP} is a recent new programming paradigm implemented as
-\gls{iTasks}~\cite{achten_introduction_2015} in
-the pure lazy functional language \gls{Clean}
-
-\todo{Main terms}
-The lazy functional programming language based on graph rewriting
-\gls{Clean}~\cite{brus_cleanlanguage_1987}
-
-\todo{What am I doing}
-
-
+devices with high level \gls{TOP} implementations languages. This thesis shows
+how a new frontend for the class based shallowly embedded \glspl{DSL} called
+\gls{mTask} written in \gls{Clean} can be used to compile \gls{IoT}-tasks on
+the fly and send them to the device as bytecode which is interpreted. All of
+this adheres to the \gls{TOP} philosophy where familiar concepts such as
+\glspl{SDS} and task-combinators are available to use.
+
+
+\section{Motivation}
+\todo{Show relevance of the research}
+
+\section{Research questions}
+\todo{Formulate research question}
+
+\section{Document structure}
+The structure of the thesis is as follows.
+Chapter~\ref{chp:introduction} contains the research questions, motivation and
+the structure of the document
+Chapter~\ref{chp:theoretical-framework} introduces the reader with all the
+terminology and techniques lying at the foundation of the study.
+Chapter~\ref{chp:methods} will describe the actual techniques used for the
+integration.
+Chapter~\ref{chp:results} shows the results in the form of an example
+application accompanied with implementation.
+Chapter~\ref{chp:conclusion} concludes by answering the research question (s)
+and discusses future research.
+Appendix~\ref{app:communication-protocol} shows the concrete protocol used for
+communicating between the server and client.
+\section{Devices}
+\subsection{Specification}
-\todo{What is IoT}
-\todo{What is top}
+\subsection{Communication}
\section{mTasks}
+\subsection{\gls{DSL}}
+
+\subsection{Shares}
--- /dev/null
+\section{\acrlong{TOP}}
+
+
+\begin{lstlisting}[language=Clean]
+module Life
+
+Start :: *World -> *World
+Start w = w
+\end{lstlisting}
+
+\gls{TOP} is a recent new programming paradigm implemented as
+\gls{iTasks}~\cite{achten_introduction_2015} in
+the pure lazy functional language \gls{Clean}
+
+\todo{Main terms}
+The lazy functional programming language based on graph rewriting
+\gls{Clean}~\cite{brus_cleanlanguage_1987}
+
+\section{\acrlong{DSL}s}
+
+
\usepackage{caption} % Captions
\usepackage{subcaption} % Subcaptions
\usepackage{lipsum} % dummy text
+\usepackage{clean} % dummy text
\urlstyle{same}
\hypersetup{%
\newacronym{SDS}{SDS}{Shared Data Source}
\newacronym{IoT}{IoT}{Internet of Things}
\newacronym{TOP}{TOP}{Task Oriented Programming}
-\newglossaryentry{Clean}{%
- name=Clean,
+\newacronym{DSL}{DSL}{Design Specific Language}
+\newglossaryentry{Clean}{name=Clean,
description={is a pure lazy functional programming language based on graph
- rewriting}
-}
-\newglossaryentry{iTasks}{
- name=iTasks,
- description={is a \acrshort{TOP} implementation written in the \gls{Clean}
- programming language}
-}
-
+ rewriting}}
+\newglossaryentry{iTasks}{name=iTasks,
+ description={is a \acrshort{TOP} implementation written as a \acrshort{DSL}
+ in the \gls{Clean} programming language}}
+\newglossaryentry{mTask}{name=mTask,
+ description={is an abstraction for tasks living on \acrshort{IoT} devices}}
\begin{document}
\frontmatter{}
\printglossaries%
\mainmatter{}
-\chapter{Introduction}
+\chapter{Introduction}\label{chp:introduction}
\input{introduction.tex}
-\chapter{Methods}
+\chapter{Theoretical Framework}\label{chp:theoretical-framework}
+\input{theoretical-framework.tex}
+
+\chapter{Methods}\label{chp:methods}
\input{methods.tex}
-\chapter{Results}
-\chapter{Conclusion \& Discussion}
+\chapter{Results}\label{chp:results}
+\chapter{Conclusion \& Discussion}\label{chp:conclusion}
-\appendix
-\chapter{Communication protocol}
+\appendix\label{chp:appendix}
+\chapter{Communication protocol}\label{app:communication-protocol}
\input{appendix-protocol.tex}
\bibliographystyle{ieeetr}