X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=results.mtask.tex;h=8b0fb20ea551cc3b22c00efbe87392d13c2674cf;hb=7ca87066ed1f3a962d993a9ac32ab761cfdc05a9;hp=aaa2515b6c8c1af92b47aceec4d320b07dda4dd9;hpb=a3a00cd9df798eda92291a2f3f6c922bdfdfdac2;p=msc-thesis1617.git diff --git a/results.mtask.tex b/results.mtask.tex index aaa2515..8b0fb20 100644 --- a/results.mtask.tex +++ b/results.mtask.tex @@ -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}