X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=pres.mtask.tex;h=49a275feaced27d518ea03ba31b2754e030a1450;hb=2498dced580be1e7af31a662dadee26c4fd159ed;hp=3d602b30795d0d0f921ad2fffba2dd033a810e8a;hpb=0ea729c9667ddd36e834d1056750c467c88df79c;p=msc-thesis1617.git diff --git a/pres.mtask.tex b/pres.mtask.tex index 3d602b3..49a275f 100644 --- a/pres.mtask.tex +++ b/pres.mtask.tex @@ -140,7 +140,7 @@ instance intArith PrettyPrinter where \begin{block}{What is mTask} \begin{itemize} \item Created by Pieter Koopman and Rinus Plasmeijer - \item EDSL + \item EDSL for imperative programs \item Arduino C++ generation, iTasks simulation \end{itemize} \end{block} @@ -157,10 +157,7 @@ instance intArith PrettyPrinter where \begin{frame}[fragile] \frametitle{Expressions} \begin{block}{mTask} - \begin{itemize}[<+->] - \item Of the form \CI{v t p} - \item \CI{p} is hierarchical - \end{itemize} + Of the form \CI{v t p} \end{block} \pause{} \begin{lstlisting}[language=Clean] @@ -226,24 +223,16 @@ class assign v where \frametitle{Examples} \begin{lstlisting}[language=Clean] blink = task \blink=(\x. - IF (x ==. lit True) + IF x) (ledOn LED1) (ledOff LED2) :. blink (lit 1000) (Not x)) In {main=blink (lit 1000) True} thermostat :: Main (View () Stmt) -thermostat = {main = IF (analogRead A0 >. lit 50) - ( digitalWrite D0 (lit True) ) - ( digitalWrite D0 (lit False) ) - } +thermostat = {main = digitalWrite (dIO D0) (analogRead A0 >. lit 50) thermostat2 :: Main (View () Stmt) -thermostat2 = let a0 = aIO A0 - d0 = dIO D0 - in {main = IF (a0 >. lit 50) - (d0 =. lit True) - (d0 =. lit False) - } +thermostat = {main = (dIO D0) =. (analogRead A0 >. lit 50) \end{lstlisting} \end{frame}