more upydates
[phd-thesis.git] / top / top.tex
index 2ca397e..bdc8100 100644 (file)
@@ -3,9 +3,7 @@
 \input{subfilepreamble}
 
 \begin{document}
-\ifSubfilesClassLoaded{
-       \pagenumbering{arabic}
-}{}
+\input{subfileprefix}
 
 \chapter{Edge device programming}%
 \label{chp:top4iot}
@@ -16,7 +14,7 @@
                \item extends this idea with multithreading, demonstrating the difficulty programming multi-tasking applications;
                \item describes a comparative variant in \gls{MTASK} and shows that upgrading to a multi-tasking variant is straightforward
                \item demonstrates that the complexity of running multiple tasks;
-               \item and concludes with a short history of \gls{MTASK}'s development.
+               \item and concludes with the history of \gls{MTASK}'s development.
        \end{itemize}
 \end{chapterabstract}
 
@@ -37,6 +35,7 @@ The programs are usually cyclic executives instead of tasks running in an operat
                Storage & \qty{1}{\tebi\byte} & \qty{32}{\kibi\byte} & \qtyrange{0.5}{4}{\mebi\byte}\\
                \gls{RAM} & \qtyrange{4}{16}{\gibi\byte} & \qty{2}{\kibi\byte} & \qty{160}{\kibi\byte}\\
                Power & \qtyrange{50}{100}{\watt} & \qtyrange{0.13}{250}{\milli\watt} & \qtyrange{0.1}{350}{\milli\watt}\\
+               Price & \euro{1500} & \euro{3} & \euro{4}\\
                \bottomrule
        \end{tabular}
        \caption{Hardware characteristics of typical microcontrollers and laptops.}%
@@ -222,7 +221,16 @@ Currently, power efficiency behaviour of traditional versus \gls{TOP} \gls{IOT}
 \chapter{The \texorpdfstring{\gls{MTASK}}{mTask} \texorpdfstring{\glsxtrshort{DSL}}{DSL}}%
 \label{chp:mtask_dsl}
 \begin{chapterabstract}
-This chapter serves as a complete guide to the \gls{MTASK} language, from an \gls{MTASK} programmer's perspective.
+This chapter introduces the \gls{MTASK} language more technically by:
+       \begin{itemize}
+               \item introducing the setup of the \gls{EDSL};
+               \item and showing the language interface and examples for:
+                       \begin{itemize}
+                               \item data types
+                               \item expression
+                               \item task and their combinators.
+                       \end{itemize}
+       \end{itemize}
 \end{chapterabstract}
 
 The \gls{MTASK} system is a complete \gls{TOP} programming environment for programming microcontrollers.
@@ -252,7 +260,7 @@ The \gls{MTASK} language is an enriched simply-typed $\lambda$-calculus with sup
 \section{Types}
 To leverage the type checker of the host language, types in the \gls{MTASK} language are expressed as types in the host language, to make the language type safe.
 However, not all types in the host language are suitable for microcontrollers that may only have \qty{2}{\kibi\byte} of \gls{RAM} so class constraints are therefore added to the \gls{DSL} functions.
-The most used class constraint is the \cleaninline{type} class collection containing functions for serialization, printing, \gls{ITASK} constraints \etc.
+The most used class constraint is the \cleaninline{type} class collection containing functions for serialization, printing, \gls{ITASK} constraints, \etc.
 Many of these functions can be derived using generic programming.
 An even stronger restriction on types is defined for types that have a stack representation.
 This \cleaninline{basicType} class has instances for many \gls{CLEAN} basic types such as \cleaninline{Int}, \cleaninline{Real} and \cleaninline{Bool}.
@@ -711,9 +719,13 @@ task = declarePin D3 PMInput \d3->
 \chapter{Integration with \texorpdfstring{\gls{ITASK}}{iTask}}%
 \label{chp:integration_with_itask}
 \begin{chapterabstract}
-       This chapter shows the integration with \gls{ITASK}.
-       It gives an intuition for the architecture of the \gls{IOT} systems.
-       The interface for connecting devices, lifting \gls{MTASK} tasks to \gls{ITASK} tasks and lifting \gls{ITASK} \glspl{SDS} to \gls{MTASK} \glspl{SDS} is shown.
+       This chapter shows the integration of \gls{MTASK} with \gls{ITASK} by showing:
+       \begin{itemize}
+               \item an architectural overview of \gls{MTASK};
+               \item on the interface for connecting devices;
+               \item the interface for lifting \gls{MTASK} tasks to \gls{ITASK} tasks;
+               \item and interface for lifting \gls{ITASK} \glspl{SDS} to \gls{MTASK} \glspl{SDS}.
+       \end{itemize}
 \end{chapterabstract}
 
 The \gls{MTASK} language is a multi-view \gls{DSL}, i.e.\ there are multiple interpretations possible for a single \gls{MTASK} term.
@@ -749,7 +761,7 @@ This task sets up the communication, exchanges specifications, handles errors an
 :: MTDevice //abstract
 :: Channels :== ([MTMessageFro], [MTMessageTo], Bool)
 
-class channelSync a :: a (sds () Channels Channels) -> Task () | RWShared sds
+class channelSync a :: a (Shared sds Channels) -> Task () | RWShared sds
 
 withDevice :: (a (MTDevice -> Task b) -> Task b) | iTask b & channelSync, iTask a
 \end{lstClean}
@@ -763,7 +775,7 @@ liftmTask :: (Main (BCInterpret (TaskValue u))) MTDevice -> Task u | iTask u
 \section{Lifting \texorpdfstring{\glsxtrlongpl{SDS}}{shared data sources}}\label{sec:liftsds}
 \begin{lstClean}[label={lst:mtask_itasksds},caption={Lifted \gls{ITASK} \glspl{SDS} in \gls{MTASK}.}]
 class liftsds v where
-       liftsds :: ((v (Sds t))->In (Shared sds t) (Main (MTask v u)))
+       liftsds :: ((v (Sds t)) -> In (Shared sds t) (Main (MTask v u)))
                -> Main (MTask v u) | RWShared sds
 \end{lstClean}
 
@@ -778,22 +790,7 @@ IFL19 paper, bytecode instructieset~\cref{chp:bytecode_instruction_set}
 \section{Integration with \texorpdfstring{\gls{ITASK}}{iTask}}
 IFL18 paper stukken
 
-\chapter{Green computing with \texorpdfstring{\gls{MTASK}}{mTask}}%
-\label{chp:green_computing_mtask}
-\begin{chapterabstract}
-       This chapter demonstrate the energy saving features of \gls{MTASK}.
-       First it gives an overview of general green computing measures for edge devices.
-       Then \gls{MTASK}'s task scheduling is explained and it is shown how to customise it so suit the applications and energy needs.
-       Finally it shows how to use interrupts in \gls{MTASK} to reduce the need for polling.
-\end{chapterabstract}
-
-\section{Green \texorpdfstring{\glsxtrshort{IOT}}{IoT} computing}
-
-\section{Task scheduling}
-\subsection{Language}
-\subsection{Device}
-
-\section{Interrupts}
+\subfile{green}
 
 \input{subfilepostamble}
 \end{document}