update pres
[msc-thesis1617.git] / pres.mtask.tex
index 3d602b3..49a275f 100644 (file)
@@ -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}