\gls{TOP} is a novel programming paradigm implemented as
\gls{iTasks}~\cite{achten_introduction_2015} in the pure lazy functional
language \gls{Clean}~\cite{brus_cleanlanguage_1987}. \gls{iTasks} is an
\gls{EDSL} to model workflow tasks in the broadest sense. A \gls{Task} is just
a function that --- given some state --- returns the observable \CI{TaskValue}.
The \CI{TaskValue} of a \CI{Task} can have different states. Not all state
transitions are possible as shown in Figure~\ref{fig:taskvalue}. Once a value
is stable it can never become unstable again. Stability is often reached by
pressing a confirmation button. \glspl{Task} yielding a constant value are
immediately stable.

A simple \gls{iTasks} example illustrating the route to stability of a
\gls{Task} in which the user has to enter a full name is shown in
Listing~\ref{lst:taskex}. The code is accompanied by screenshots showing the
user interface in Figure~\ref{fig:taskex1},~\ref{fig:taskex2}
and~\ref{fig:taskex3}. The \CI{TaskValue} of the \gls{Task} is in the first
image in the \CI{NoValue} state, the second image does not have all the fields
filled in and therefore the \CI{TaskValue} remains \CI{NoValue}. In the third
image all fields are entered and the \CI{TaskValue} transitions to the
\CI{Unstable} state. When the user presses \emph{Continue} the value becomes
\CI{Stable} and cannot be changed any further.

\begin{figure}[H]
	\centering
	\includegraphics[width=.5\linewidth]{fig-taskvalue}
	\caption{The states of a \CI{TaskValue}}\label{fig:taskvalue}
\end{figure}

\begin{lstlisting}[label={lst:taskex},%
	caption={An example \gls{Task} for entering a name}]
:: Name = { firstname :: String
          , lastname  :: String
          }

derive class iTask Name

enterInformation :: String [EnterOption m] -> (Task m) | iTask m

enterName :: Task Name
enterName = enterInformation "Enter your name" []
\end{lstlisting}

\begin{figure}[H]
	\centering
	\begin{subfigure}{.25\textwidth}
		\centering
		\includegraphics[width=.9\linewidth]{taskex1}
		\caption{Initial interface}\label{fig:taskex1}
	\end{subfigure}
	\begin{subfigure}{.25\textwidth}
		\centering
		\includegraphics[width=.9\linewidth]{taskex2}
		\caption{Incomplete entrance}\label{fig:taskex2}
	\end{subfigure}
	\begin{subfigure}{.25\textwidth}
		\centering
		\includegraphics[width=.9\linewidth]{taskex3}
		\caption{Complete entry}\label{fig:taskex3}
	\end{subfigure}
	\caption{Example of a generated user interface}
\end{figure}

For a type to be suitable, it must have instances for a collection of generic
functions that is captured in the class \CI{iTask}. Basic types have
specialization instances for these functions and show an interface accordingly.
Derived interfaces can be modified with decoration operators or specializations
can be created.

