add connection diagrams and add todo combinators
[msc-thesis1617.git] / results.mtask.tex
index aaa2515..8b0fb20 100644 (file)
@@ -1,16 +1,50 @@
-\section{mTask}
-\subsection{Semantics}
-\todo{Uitleggen wat het systeem precies doet}
+Some functionality of the original \gls{mTask}-\gls{EDSL} will not be used in
+this extension \gls{EDSL}. Conversely, some functionality needed was not
+available in the existing \gls{EDSL}. Due to the nature of class based shallow
+embedding this obstacle is very easy to solve. A type housing the \gls{EDSL}
+does not have to implement all the available classes. Moreover, classes can be
+added at will without interfering with the existing views.
+
+\section{Bytecode compilation view}
+The \glspl{mTask} are sent to the device in bytecode and are saved in the
+memory of the device. To compile the \gls{EDSL} code to bytecode a \gls{RWST}
+is used. The \gls{RWST} is a state transformer stacked on a \emph{Reader} monad
+and a \emph{Writer} monad. In this case the transformer part is not used.
+However, this can be done to add for example better runtime error handling.
+
+\begin{lstlisting}[language=Clean]
+:: ByteCode a p = BC (RWS () [BC] BCState ())
+:: BCValue = E.e: BCValue e & mTaskType, TC e
+:: BCShare = {
+               sdsi :: Int,
+               sdsval :: BCValue
+       }
+:: BCState = {
+               freshl :: [Int],
+               freshs :: [Int],
+               sdss :: [BCShare]
+       }
+
+class toByteCode a :: a -> String
+class fromByteCode a :: String -> a
+class mTaskType a | toByteCode, fromByteCode, iTask, TC a
 
-\subsection{Extension on the \gls{mTask}-\gls{EDSL}}
-\todo{Aanpassingen aan de mTask DSL}
+instance toByteCode Int, ... , UserLED, BCValue
+instance fromByteCode Int, ... , UserLED, BCValue
 
-\section{iTasks}
-\subsection{Shares}
-\todo{Semantiek van shares, hoe ze in iTasks zijn, hoe typering}
+instance arith ByteCode
+...
+instance serial ByteCode
+\end{lstlisting}
 
-\subsection{Lifting}
-\todo{Lift mTask taken naar echte taken, hoe werkt dat?}
+\section{Bytecode compilation view for \gls{mTask}}
+Compilation to bytecode
+
+\subsection{Backend}
+\todo{Aanpassingen
+aan de mTask DSL}
+
+\section{Semantics}
+
+\todo{Uitleggen wat het systeem precies doet}
 
-\section{Demo}
-\todo{Wat voorbeeld code}