1 \input{methods.top.tex
}
3 \input{methods.dsl.tex
}
5 \input{methods.arch.tex
}
8 \subsection{\gls{EDSL
}}
9 The
\gls{mTask
}-
\gls{EDSL
} contains several classes that need to be implemented
10 by a type for it to be an
\gls{mTask
}. For numeric and boolean arithmetic the
11 classes
\texttt{arith
} and
\texttt{boolExpr
} are available and listed in a
12 shortened version in Listing~
\ref{lst:arithbool
}. All classes are to be
13 implemented by types of kind
\texttt{*->*->*
} a type
\texttt{v t p
},
14 respectively a view with a type and the role.
16 \texttt{lit
} lifts a constant to the
\gls{mTask
} domain. For a type to be a
17 valid
\gls{mTask
} type it needs to implement the
\texttt{mTaskType
} class. The
18 binary operators work as expected.
20 \begin{lstlisting
}[language=Clean,label=
{lst:arithbool
},
21 caption=
{Basic classes for expressions
}]
22 class mTaskType a | toByteCode, fromByteCode, iTask, TC a
25 lit :: t -> v t Expr | mTaskType t
26 (+.) infixl
6 :: (v t p) (v t q) -> v t Expr | type, +, zero t & isExpr p & isExpr q
28 class boolExpr v where
29 (&.) infixr
3 :: (v Bool p) (v Bool q) -> v Bool Expr | isExpr p & isExpr q
30 Not :: (v Bool p) -> v Bool Expr | isExpr p
32 (==.) infix
4 :: (v a p) (v a q) -> v Bool Expr | ==, toCode a & isExpr p & isExpr q
39 Shares can live on multiple clients at the same time. For every share created
40 for an
\gls{mTask
} a real
\gls{SDS
} is created that mirrors the value on the
41 client. All shares currently in use are stored in a system-wide
\gls{SDS
} in
42 such a way that the actual share can be retrieved at any moment. All shares
43 have a unique numeric identifier and an initial value.
45 \begin{lstlisting
}[language=Clean,label=
{lst:sharespec
}, caption=
{\acrlong{SDS
}}]
46 :: BCValue = E.e: BCValue e & mTaskType e
47 :: MTaskShareType = MTaskWithShare String | MTaskLens String
50 ,withDevice ::
[String
]
52 ,realShare :: MTaskShareType
56 sdsStore :: Shared
[MTaskShare
]
58 \todo{Do something with the sharetype
}
60 \subsection{Communication
}
61 %\todo{Handshake, device specification sending, spec.c}
62 %\todo{mTaskDevice class interface}
65 \subsection{\gls{EDSL
}}
66 \todo{Show the classes
}
69 \todo{Show the types and why
}
71 Shares are used to store the values