From: Mart Lubbers Date: Fri, 7 Jul 2017 18:07:04 +0000 (+0200) Subject: update presentation more X-Git-Tag: final~24 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=4c97f24a6f054499dd539ac97429ebc0133a51fe;p=msc-thesis1617.git update presentation more --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c0fb0a0 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +all: + ./build diff --git a/build b/build index 685e33f..de903fe 100755 --- a/build +++ b/build @@ -15,6 +15,16 @@ deps(){ while read l; do deps "$l"; done } +graphicdeps(){ + grep -Pzo '\\includegraphics[%\t\n ]*(\[.*\])?[%\t\n ]*\{.*?\}' $1 |\ + tr '\0' '\n' | grep -Po '(?<=\{).*?(?=\})' |\ + while read l; do echo "$2/$l"; done +} + +graphicspath(){ + : +} + recompile(){ for dep in $(deps "$1"); do if [ "$dep" -nt "$2" ]; then diff --git a/pres.conclusion.tex b/pres.conclusion.tex index 31a14f5..bf626bc 100644 --- a/pres.conclusion.tex +++ b/pres.conclusion.tex @@ -24,3 +24,13 @@ \item Interrupts \end{itemize} \end{frame} + +\subsection{Demo} +\begin{frame} + \frametitle{And ofcourse\ldots\pause{} a demo} + \pause{} + \begin{figure} + \centering + \includegraphics[width=.6\linewidth]{demo} + \end{figure} +\end{frame} diff --git a/pres.intro.tex b/pres.intro.tex index a87e514..c4f90bf 100644 --- a/pres.intro.tex +++ b/pres.intro.tex @@ -15,10 +15,9 @@ \item Monitoring (Temperature, Electricity, Humidity, Heartbeat) \item Acting (Servo's, Motors) \item Tracking (GPS, WiFi tracking) - \item Relaying (SMS, Whatsapp) + \item Communication (SMS, Whatsapp) \pause{} - \item Combinations: e.g. Thermostat - \item Smart clothing, smart watches + \item Combinations: e.g. Thermostat, Smart Clothing, Smart Watches \end{itemize} \end{block} \end{frame} @@ -34,11 +33,8 @@ \pause{} \item Heaps of communication methods: LoRa (Sigfox, KPN, TTN), BTLE, WiFi, ZigBee\ldots \pause{} - \item But\ldots - \pause{} \item Separated logic \item Integration problems - \item Reprogramming, write cycles \end{itemize} \end{frame} @@ -46,7 +42,7 @@ \frametitle{And there is TOP/iTasks} \begin{block}{iTasks} \begin{itemize}[<+->] - \item Basic blocks + \item Tasks are basic blocks \item Generated web interface \item Type driven \item EDSL @@ -89,11 +85,8 @@ \item iTasks server \item IoT device client \item EDSL to make IoT tasks - \item Interpreted on the client - \item No reprogramming + \item Internalship \end{itemize} - \pause{} - Internalship \end{frame} \begin{frame} @@ -103,6 +96,8 @@ \item Write client software \item Write server software \item Connect them up + \item But first some theory + \item Reprogramming, write cycles \end{itemize} \end{frame} @@ -203,6 +198,7 @@ enterName = enterInformation "Enter your name" [] \begin{itemize}[<+->] \item Read function \item Write function + \item Both have access to the world \end{itemize} \end{block} @@ -221,65 +217,7 @@ wait :: String (r -> Bool) (ReadWriteShared r w) -> Task r \end{lstlisting} \end{frame} -\begin{frame}[fragile] - \frametitle{SDS (2)} - \framesubtitle{Parametric Lenses} - \begin{block}{What is the \CI{p} for in \CI{RWShared p r w}} - \pause{} - \begin{itemize} - \item Parameter fixed when writing - \item Used for notifications - \end{itemize} - \end{block} - - \begin{lstlisting} -sdsFocus :: p1 (RWShared p1 r w) -> RWShared p2 r w | iTask p - -:: SDSNotifyPred p :== p -> Bool -:: SDSLensRead p r rs = SDSRead (p -> rs -> MaybeError TaskException r) - | SDSReadConst (p -> r) -:: SDSLensWrite p w rs ws = SDSWrite (p -> rs -> w -> MaybeError TaskException (Maybe ws)) - | SDSWriteConst (p -> w -> MaybeError TaskException (Maybe ws)) -:: SDSLensNotify p w rs = SDSNotify (p -> rs -> w -> SDSNotifyPred p) - | SDSNotifyConst (p -> w -> SDSNotifyPred p) - -sdsLens :: String (p -> ps) (SDSLensRead p r rs) (SDSLensWrite p w rs ws) - (SDSLensNotify p w rs) (RWShared ps rs ws) -> RWShared p r w | iTask ps - \end{lstlisting} -\end{frame} - \begin{frame} - \frametitle{Why add IoT devices to iTasks} - \begin{block}{Why?} - \begin{itemize} - \item Execute Tasks - \item Monitoring - \item Hardware - \end{itemize} - \end{block} - - \pause{} - - \begin{block}{Current possibilities} - \begin{itemize} - \item Implement a device as an SDS - \pause{} - \item Tailor made SDS for every task - \item Difficult to get logic in - \pause{} - \item Arjan's Distributed iTasks - \pause{} - \item Requires fast hardware - \pause{} - \end{itemize} - \end{block} -\end{frame} - -\begin{frame} - \frametitle{Solution} - \pause{} - \begin{block}{EDSL to the rescue} - \pause{} - After the break. - \end{block} + \frametitle{But not all Tasks or SDSs are suitable for microcontrollers\ldots} + \pause\centering\Large EDSLs to the rescue \end{frame} diff --git a/pres.mtask.tex b/pres.mtask.tex index ef80aaf..ec40ae4 100644 --- a/pres.mtask.tex +++ b/pres.mtask.tex @@ -10,6 +10,8 @@ \item Language in a language \item Use the properties of the host \item E.g., Ivory, \ldots\pause{} and iTasks + \pause{} + \item Different embedding techniques \end{itemize} \end{frame} @@ -137,6 +139,7 @@ instance intArith PrettyPrinter where \pause{} \begin{block}{What is mTask} \begin{itemize} + \item Created by Pieter Koopman and Rinus Plasmeijer \item EDSL \item Arduino C++ generation, iTasks simulation \end{itemize} @@ -154,17 +157,17 @@ instance intArith PrettyPrinter where \begin{frame}[fragile] \frametitle{Expressions} \begin{block}{mTask} - \begin{itemize} - \item Two phantom types - \item Hierarchy + \begin{itemize}[<+->] + \item Of the form \CI{v t p} + \item \CI{p} is hierarchical \end{itemize} \end{block} \pause{} \begin{lstlisting} class arith v where lit :: t -> v t Expr - (+.) infixl 6 :: (v t p) (v t q) -> v t Expr | +, zero t & isExpr p & isExpr q - (-.) infixl 6 :: (v t p) (v t q) -> v t Expr | -, zero t & ... + (+.) infixl 6 :: (v t p) (v t q) -> v t Expr | +, zero t & isExpr p & isExpr q + (-.) infixl 6 :: (v t p) (v t q) -> v t Expr | -, zero t & ... ... class boolExpr v where Not :: (v Bool p) -> v Bool Expr | ... @@ -177,18 +180,10 @@ class boolExpr v where \begin{frame}[fragile] \frametitle{Control flow} \begin{lstlisting} -class If v q r ~s where - If :: (v Bool p) (v t q) (v t r) -> v t s | ... - class IF v where IF :: (v Bool p) (v t q) (v s r) -> v () Stmt | ... (?) infix 1 :: (v Bool p) (v t q) -> v () Stmt | ... -instance If Code Stmt Stmt Stmt -instance If Code e Stmt Stmt -instance If Code Stmt e Stmt -instance If Code x y Expr - class seq v where (:.) infixr 0 :: (v t p) (v u q) -> v u Stmt | ... \end{lstlisting} @@ -232,8 +227,8 @@ class assign v where \begin{lstlisting} blink = task \blink=(\x. IF (x ==. lit True) - (ledOn led) - (ledOff led) :. + (ledOn LED1) + (ledOff LED2) :. blink (lit 1000) (Not x)) In {main=blink (lit 1000) True} diff --git a/pres.system.tex b/pres.system.tex index 4c8b2fb..b4a1504 100644 --- a/pres.system.tex +++ b/pres.system.tex @@ -1,25 +1,26 @@ \subsection{Overview} +\begin{frame} + \frametitle{Current state of mTask} + \begin{itemize} + \item It all seems perfect + \item \ldots\pause{} but\ldots + \pause{} + \item No interaction + \item Compilation requires reprogramming + \item Entire system is created and fixed + \end{itemize} +\end{frame} + \begin{frame} \frametitle{Solution} - \begin{block}{Downsides of the current mTask view} - \begin{itemize} - \item It all seems perfect - \item \ldots\pause{} but\ldots - \pause{} - \item No interaction - \item Compilation requires reprogramming - \end{itemize} - \end{block} - \pause{} - \begin{block}{Solution} - \begin{itemize}[<+->] - \item New bytecode backend for mTask - \item Interpreter on client - \item Server in iTasks with integration - \item No taskserver generation, onetime programming - \item Explicit SDS publishing - \end{itemize} - \end{block} + \begin{itemize}[<+->] + \item New bytecode backend for mTask + \item Interpreter on client + \item Server in iTasks with integration + \item No taskserver generation, onetime programming + \item Dynamic task sending + \item Explicit SDS publishing + \end{itemize} \end{frame} \subsection{Extending mTask} @@ -82,27 +83,26 @@ BCIfStmt (BC b) (BC t) (BC e) = BC ( \end{lstlisting} \end{frame} -\begin{frame}[fragile] - \frametitle{Functionality} - \begin{block}{SDS scope and naming} - \begin{itemize} - \item SDS is lost - \item State per device - \item Tasks are sent and gone - \item Save bandwidth - \end{itemize} - \pause{} - \begin{lstlisting} -class namedsds v where - namedsds :: ((v t Upd) -> In (Named t String) (Main (v c s))) - -> (Main (v c s)) | ... -:: Named a b = Named infix 1 a b - -instance sdspub ByteCode where - pub (BC x) = BC (censor (\[BCSdsFetch s]->[BCSdsPublish s]) x) - \end{lstlisting} - \end{block} -\end{frame} +%\begin{frame}[fragile] +% \frametitle{Functionality} +% \begin{block}{SDS scope and naming} +% \begin{itemize} +% \item SDS is lost +% \item State per device +% \item Tasks are sent and gone +% \end{itemize} +% \pause{} +% \begin{lstlisting} +%class namedsds v where +% namedsds :: ((v t Upd) -> In (Named t String) (Main (v c s))) +% -> (Main (v c s)) | ... +%:: Named a b = Named infix 1 a b +% +%instance sdspub ByteCode where +% pub (BC x) = BC (censor (\[BCSdsFetch s]->[BCSdsPublish s]) x) +% \end{lstlisting} +% \end{block} +%\end{frame} \begin{frame}[fragile] \frametitle{Assignment} @@ -118,11 +118,15 @@ instance sds ByteCode where instance assign ByteCode where (=.) (BC v) (BC e) = BC (e >>| censor makeStore v) +instance sdspub ByteCode where + pub (BC x) = BC (censor (\[BCSdsFetch s]->[BCSdsPublish s]) x) + makeStore [BCSdsFetch i] = [BCSdsStore i] makeStore [BCDigitalRead i] = [BCDigitalWrite i] makeStore [...] = [...] \end{lstlisting} \end{frame} + \begin{frame}[fragile] \frametitle{Task scheduling} \begin{block}{Old} @@ -171,4 +175,31 @@ class retrn v where \end{frame} \subsection{Server} +\begin{frame}[fragile] + \frametitle{SDS (2)} + \framesubtitle{Parametric Lenses} + \begin{block}{What is the \CI{p} for in \CI{RWShared p r w}} + \pause{} + \begin{itemize} + \item Parameter fixed when writing + \item Used for notifications + \item On write the SDS returns \CI{p -> Bool} + \end{itemize} + \end{block} +% +% \begin{lstlisting} +%sdsFocus :: p1 (RWShared p1 r w) -> RWShared p2 r w | iTask p +% +%:: SDSNotifyPred p :== p -> Bool +%:: SDSLensRead p r rs = SDSRead (p -> rs -> MaybeError TaskException r) +% | SDSReadConst (p -> r) +%:: SDSLensWrite p w rs ws = SDSWrite (p -> rs -> w -> MaybeError TaskException (Maybe ws)) +% | SDSWriteConst (p -> w -> MaybeError TaskException (Maybe ws)) +%:: SDSLensNotify p w rs = SDSNotify (p -> rs -> w -> SDSNotifyPred p) +% | SDSNotifyConst (p -> w -> SDSNotifyPred p) +% +%sdsLens :: String (p -> ps) (SDSLensRead p r rs) (SDSLensWrite p w rs ws) +% (SDSLensNotify p w rs) (RWShared ps rs ws) -> RWShared p r w | iTask ps +% \end{lstlisting} +\end{frame} \subsection{Examples} diff --git a/presentation.pre b/presentation.pre index 654b89b..4c9df64 100644 --- a/presentation.pre +++ b/presentation.pre @@ -1,4 +1,4 @@ -\documentclass{beamer} +\documentclass[handout]{beamer} \usepackage{listings} % Source code \usepackage{subcaption} % Subcaptions diff --git a/presentation.tex b/presentation.tex index fe6b5b8..044b4dc 100644 --- a/presentation.tex +++ b/presentation.tex @@ -11,23 +11,13 @@ \section{Introduction} \input{pres.intro} -%\section{EDSLs \& mTask} -%\input{pres.mtask} -% -%\section{System Overview} -%\input{pres.system} +\section{EDSLs \& mTask} +\input{pres.mtask} + +\section{System Overview} +\input{pres.system} \section{Conclusion} \input{pres.conclusion} -\section{Demo} -\begin{frame} - \frametitle{And ofcourse\ldots\pause{} a demo} - \pause{} - \begin{figure} - \centering - \includegraphics[width=.6\linewidth]{demo} - \end{figure} -\end{frame} - \end{document}