From: Mart Lubbers Date: Tue, 28 Feb 2017 10:37:29 +0000 (+0100) Subject: make more detailed outline and add clean.sty X-Git-Tag: hand-in~150 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=6dca5a0ebb686cc11b0cb90f98c3d8347d0b7eeb;p=msc-thesis1617.git make more detailed outline and add clean.sty --- diff --git a/Makefile b/Makefile index 14b1c0e..32587bc 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ LATEX?=pdflatex BIBTEX?=bibtex BIBTEXFLAGS:= MAKEGLOSSARIES?=makeglossaries -MAKEGLOSSARIESFLAGS?=makeglossaries +MAKEGLOSSARIESFLAGS?= LATEXFLAGS:=-file-line-error -halt-on-error -no-shell-escape .PHONY: all clean @@ -16,12 +16,12 @@ all: $(addsuffix .pdf,$(DOCS)) $(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: diff --git a/clean.sty b/clean.sty new file mode 100644 index 0000000..cc17f09 --- /dev/null +++ b/clean.sty @@ -0,0 +1,70 @@ +\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}}{} diff --git a/introduction.tex b/introduction.tex index cc6b22d..a413b2f 100644 --- a/introduction.tex +++ b/introduction.tex @@ -1,22 +1,29 @@ 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. diff --git a/methods.tex b/methods.tex index e510ecb..9726a2f 100644 --- a/methods.tex +++ b/methods.tex @@ -1,5 +1,9 @@ +\section{Devices} +\subsection{Specification} -\todo{What is IoT} -\todo{What is top} +\subsection{Communication} \section{mTasks} +\subsection{\gls{DSL}} + +\subsection{Shares} diff --git a/theoretical-framework.tex b/theoretical-framework.tex new file mode 100644 index 0000000..4551ed3 --- /dev/null +++ b/theoretical-framework.tex @@ -0,0 +1,21 @@ +\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} + + diff --git a/thesis.pre b/thesis.pre index 80c2932..21bddc2 100644 --- a/thesis.pre +++ b/thesis.pre @@ -11,6 +11,7 @@ \usepackage{caption} % Captions \usepackage{subcaption} % Subcaptions \usepackage{lipsum} % dummy text +\usepackage{clean} % dummy text \urlstyle{same} \hypersetup{% diff --git a/thesis.tex b/thesis.tex index 4158a1b..4390086 100644 --- a/thesis.tex +++ b/thesis.tex @@ -5,17 +5,15 @@ \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{} @@ -45,17 +43,20 @@ \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}