From: Mart Lubbers Date: Tue, 17 Jan 2023 15:25:26 +0000 (+0100) Subject: . X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=40c364b9de5d27b8afedcfd83d76499acc9e31af;p=phd-thesis.git . --- diff --git a/back/acknowledgements.tex b/back/acknowledgements.tex index 9c0ef68..f065479 100644 --- a/back/acknowledgements.tex +++ b/back/acknowledgements.tex @@ -4,7 +4,7 @@ \begin{document} \input{subfileprefix} -\chapter{Acknowledgements}% +\ifSubfilesClassLoaded{\chapter*{Acknowledgements}}{\chapter{Acknowledgements}}% \label{chp:acknowledgements} %\begin{center} \noindent% diff --git a/back/research_data_management.tex b/back/research_data_management.tex index db1d6d2..c65c422 100644 --- a/back/research_data_management.tex +++ b/back/research_data_management.tex @@ -4,7 +4,7 @@ \begin{document} \input{subfileprefix} -\chapter{Research Data Management}% +\ifSubfilesClassLoaded{\chapter*{Research Data Management}}{\chapter{Research Data Management}}% \label{chp:research_data_management} This thesis research has been carried out under the research data management policy of the Institute for Computing and Information Science of Radboud University, the Netherlands\footnote{\refurl{https://www.ru.nl/icis/research-data-management/}{\formatdate{20}{1}{2020}}}. diff --git a/back/samenvatting.tex b/back/samenvatting.tex index e34b398..edb15e9 100644 --- a/back/samenvatting.tex +++ b/back/samenvatting.tex @@ -4,9 +4,9 @@ \begin{document} \input{subfileprefixsmall} -\chapter{Samenvatting}% -\label{chp:samenvatting} \selectlanguage{dutch} +\ifSubfilesClassLoaded{\chapter*{Samenvatting}}{\chapter{Samenvatting}}% +\label{chp:samenvatting} %\begin{center} \noindent% \todo{lang\-uage de\-pen\-dent ac\-ro\-nyms?} diff --git a/back/summary.tex b/back/summary.tex index 6527955..182ba8a 100644 --- a/back/summary.tex +++ b/back/summary.tex @@ -4,22 +4,24 @@ \begin{document} \input{subfileprefixsmall} -\chapter{Summary}% +\ifSubfilesClassLoaded{\chapter*{Summary}}{\chapter{Summary}}% \label{chp:summary}% \glsresetall% %\begin{center} %\noindent% -The number of computers around us is growing exponentially, thus increasing the complexity of the systems in which they operate as well. +The number of computers around us is growing exponentially, thus increasing the complexity of the systems in which they operate. Many of these computers are \emph{edge devices} operating in \gls{IOT} systems. Within these orchestras of computers, they interact with their environment using sensors and actuators. -Edge devices usually use cheap microcontrollers designed for embedded applications, and therefore have little memory, unhurried processors, no \gls{OS}, and slow communication but are tiny and energy efficient. -Programming \gls{IOT} systems is complex since they are dynamic, interactive, distributed, collaborative, multi-tiered, and multitasking. +Edge devices often use cheap microcontrollers designed for embedded applications. +They, therefore, have little memory, unhurried processors, and slow communication but are tiny and energy efficient. +Programming \gls{IOT} systems is complex due to their dynamic, interactive, distributed, collaborative, multi-tiered, and multitasking nature. This is impeded even more by semantic friction that arises through different hardware and software characteristics between the tiers. -A solution is found in \gls{TOP}, a declarative programming paradigm. +A solution is found in \gls{TOP}. +%A solution is found in the declarative programming paradigm \gls{TOP}.%, a declarative programming paradigm. In \gls{TOP}, the main building blocks are tasks, an abstract representation of work. -During execution, the task's current value, is observable and other tasks can act upon it. -Tasks can be combined and transformed to create compound tasks, allowing the modelling of many collaboration patterns. +During execution, the current value of the task is observable, and other tasks can act upon it. +Collaboration patterns can be modelled by combinding and transforming tasks into compound tasks. From this declarative description of the work, a ready-for-work computer system is generated that guides the user in doing the work. An example of a \gls{TOP} system is \gls{ITASK}, a language for describing interactive web applications. Programming edge devices would benefit from \gls{TOP} as well. @@ -29,14 +31,15 @@ This dissertation shows how to orchestrate complete \gls{IOT} systems using \gls % First, I present advanced \gls{DSL} embedding techniques. Then \gls{MTASK} is shown, a \gls{TOP} \gls{DSL} for \gls{IOT} edge devices, embedded in \gls{ITASK}. -Tasks are constructed and compiled at run time to allow tasks to be tailor-made for the work that needs to be done. +Tasks are constructed and compiled at run time. +This allows tasks to be tailor-made for the work that needs to be done. The compiled task is sent to the device for interpretation. For a device to be used in an \gls{MTASK} system, it needs to be programmed once with a lightweight domain-specific \gls{OS}. -This \gls{OS} executes tasks in an energy efficient way and automates all communication and data sharing. +This \gls{OS} executes tasks in an energy-efficient way and automates all communication and data sharing. All aspects of the \gls{MTASK} system are shown: example applications, language design, implementation details, integration with \gls{ITASK}, and green computing facilities. -When using \gls{MTASK} in conjunction with \gls{ITASK}, entire \gls{IOT} systems are programmed tierlessly from a single source, paradigm, high abstraction level, and type system. -The dissertation concludes with a comparison between tierless programming and traditional tiered programming. -We show that many problems such as semantic friction, maintainability, robustness, and interoperation safety are mitigated when using tierless programming. +When using \gls{MTASK} in conjunction with \gls{ITASK}, entire \gls{IOT} systems are programmed tierlessly from a single source, language, paradigm, high abstraction level, and type system. +The dissertation concludes with a comparison between tierless programming, in particular in \gls{MTASK}, and traditional tiered programming. +It shows that many problems such as semantic friction, maintainability, robustness, and interoperation safety are mitigated when using tierless programming. %This is a summary of 350--400 words. %\end{center} \end{document} diff --git a/glossaries.tex b/glossaries.tex index e3d3562..972d46c 100644 --- a/glossaries.tex +++ b/glossaries.tex @@ -15,10 +15,12 @@ \myacronym{CWTS}{CWTS}{\gls{CLEAN} \gls{WEMOS} temperature sensor} \myacronym{DHT}{DHT}{digital humidity and temperature} \myacronym{DSL}{DSL}{domain-specific language} +\myacronym{DVFS}{DVFS}{dynamic voltage and frequency scaling} \myacronym{ECO2}{eCO\textsubscript{2}}{equivalent carbon dioxide} \myacronym{EDSL}{eDSL}{embedded \glsxtrlong{DSL}} \myacronym[prefixfirst={a\ },prefix={an\ }]{FP}{FP}{functional programming} \myacronym[prefixfirst={a\ },prefix={an\ }]{FRP}{FRP}{functional reactive programming} +\myacronym[prefixfirst={a\ },prefix={an\ }]{FPGA}{FPGA}{field-programmable gate array} \myacronym{GADT}{GADT}{generalised \glsxtrshort{ADT}} \myacronym{GHC}{GHC}{Glasgow \gls{HASKELL} Compiler} \myacronym{GPIO}{GPIO}{general-purpose \glsxtrlong{IO}} diff --git a/other.bib b/other.bib index f0c2325..2b89d03 100644 --- a/other.bib +++ b/other.bib @@ -2038,3 +2038,108 @@ Publisher: Association for Computing Machinery}, pages = {4--18}, file = {Sanchez-Iborra and Skarmeta - 2020 - TinyML-Enabled Frugal Smart Objects Challenges an.pdf:/home/mrl/.local/share/zotero/storage/G5DKVFE4/Sanchez-Iborra and Skarmeta - 2020 - TinyML-Enabled Frugal Smart Objects Challenges an.pdf:application/pdf}, } + +@inproceedings{koopman_dynamic_2021, + address = {Cham}, + title = {Dynamic {Editors} for {Well}-{Typed} {Expressions}}, + isbn = {978-3-030-83978-9}, + abstract = {Interactive systems may require complex inputs. Domain experts prefer guidance in the construction of these inputs. An ideal system prevents errors and is flexible in the construction and changes of its input. The iTask system generates web-editors given any first-order algebraic data types. The generated web-editors are useful but have their limitations. It is not possible to combine type safety with overloaded operators and preventing unbounded or ill-typed identifiers is impossible. Using phantom types, generalized algebraic datatypes or functions solves the language problems, but they cannot be handled by the datatype generic system. Moreover, changing expressions can require re-entering large parts of the input. We present dynamic editors that can solve all those problems. The programmer specifies the elements of such an editor by functions. The system shows the applicable edit elements in a drop-down menu to the user. The dynamic editor is used recursively to create the arguments for the selected function. Dynamic editors are seamlessly integrated with the ordinary web-editors of the iTask system. The obtained editors guide the users to make correct and type-safe inputs. These editors can be very flexible as well without making strange abstract syntax trees.}, + booktitle = {Trends in {Functional} {Programming}}, + publisher = {Springer International Publishing}, + author = {Koopman, Pieter and Michels, Steffen and Plasmeijer, Rinus}, + editor = {Zsók, Viktória and Hughes, John}, + year = {2021}, + pages = {44--66}, + file = {Koopman et al. - 2021 - Dynamic Editors for Well-Typed Expressions.pdf:/home/mrl/.local/share/zotero/storage/H8QJCNRK/Koopman et al. - 2021 - Dynamic Editors for Well-Typed Expressions.pdf:application/pdf}, +} + +@inproceedings{omar_hazelnut_2017, + address = {New York, NY, USA}, + series = {{POPL} '17}, + title = {Hazelnut: {A} {Bidirectionally} {Typed} {Structure} {Editor} {Calculus}}, + isbn = {978-1-4503-4660-3}, + url = {https://doi.org/10.1145/3009837.3009900}, + doi = {10.1145/3009837.3009900}, + abstract = {Structure editors allow programmers to edit the tree structure of a program directly. This can have cognitive benefits, particularly for novice and end-user programmers. It also simplifies matters for tool designers, because they do not need to contend with malformed program text. This paper introduces Hazelnut, a structure editor based on a small bidirectionally typed lambda calculus extended with holes and a cursor. Hazelnut goes one step beyond syntactic well-formedness: its edit actions operate over statically meaningful incomplete terms. Naïvely, this would force the programmer to construct terms in a rigid "outside-in" manner. To avoid this problem, the action semantics automatically places terms assigned a type that is inconsistent with the expected type inside a hole. This meaningfully defers the type consistency check until the term inside the hole is finished. Hazelnut is not intended as an end-user tool itself. Instead, it serves as a foundational account of typed structure editing. To that end, we describe how Hazelnut's rich metatheory, which we have mechanized using the Agda proof assistant, serves as a guide when we extend the calculus to include binary sum types. We also discuss various interpretations of holes, and in so doing reveal connections with gradual typing and contextual modal type theory, the Curry-Howard interpretation of contextual modal logic. Finally, we discuss how Hazelnut's semantics lends itself to implementation as an event-based functional reactive program. Our simple reference implementation is written using js\_of\_ocaml.}, + booktitle = {Proceedings of the 44th {ACM} {SIGPLAN} {Symposium} on {Principles} of {Programming} {Languages}}, + publisher = {Association for Computing Machinery}, + author = {Omar, Cyrus and Voysey, Ian and Hilton, Michael and Aldrich, Jonathan and Hammer, Matthew A.}, + year = {2017}, + note = {event-place: Paris, France}, + keywords = {bidirectional type systems, gradual typing, mechanized metatheory, structure editors}, + pages = {86--99}, + file = {Omar et al. - 2017 - Hazelnut A Bidirectionally Typed Structure Editor.pdf:/home/mrl/.local/share/zotero/storage/4DNRBZ4H/Omar et al. - 2017 - Hazelnut A Bidirectionally Typed Structure Editor.pdf:application/pdf}, +} + +@phdthesis{serrano_type_2018, + type = {{PhD} {Thesis}}, + title = {Type {Error} {Customization} for {Embedded} {Domain}-{Specific} {Languages}}, + school = {Utrecht University}, + author = {Serrano, Alejandro}, + year = {2018}, +} + +@article{hester_batteries_2019, + title = {Batteries {Not} {Included}}, + volume = {26}, + issn = {1528-4972}, + url = {https://doi.org/10.1145/3351474}, + doi = {10.1145/3351474}, + abstract = {Getting things done amid frequent power failures, batteryless intermittent research is rethinking how we build computing systems and paving the way to a sustainable and scalable digital future. The next trillion devices might be a little weird.}, + number = {1}, + journal = {XRDS}, + author = {Hester, Josiah and Sorber, Jacob}, + month = sep, + year = {2019}, + note = {Place: New York, NY, USA +Publisher: Association for Computing Machinery}, + pages = {23--27}, + file = {Hester and Sorber - 2019 - Batteries Not Included.pdf:/home/mrl/.local/share/zotero/storage/LT53WV8K/Hester and Sorber - 2019 - Batteries Not Included.pdf:application/pdf}, +} + + +@inproceedings{koopman_executable_2011, + address = {Berlin, Heidelberg}, + title = {An {Executable} and {Testable} {Semantics} for {iTasks}}, + isbn = {978-3-642-24452-0}, + abstract = {The iTask system is an easy to use combinator library for specifying dynamic data dependent workflows in a very flexible way. The specified workflows are executed as a multi-user web-application. The implementation of the iTask system is fairly complicated. Hence we cannot use it for reasoning about the semantics of workflows in the iTask system. In this paper we define an executable semantics that specifies how workflows react on events generated by the workers executing them. The semantics is used to explain iTask and to reason about iTask. Based on this semantics we define a mathematical notion of equivalence of tasks and show how this equivalence for tasks can be approximated automatically. Advantages of this executable semantics are: it is easy to validate the semantics by interactive simulation; properties of the semantics can be tested by our model-based test system Gþinspace∀þinspacest. Gþinspace∀þinspacest can test a large number of properties within seconds. These tests appeared to be a good indication about the consistency of the specified semantics and equivalence relation for tasks. The automatic testing of properties was very helpful in the development of the semantics. The contribution of this paper is a semantics for iTask as well as the method used to construct this operational semantics.}, + booktitle = {Implementation and {Application} of {Functional} {Languages}}, + publisher = {Springer Berlin Heidelberg}, + author = {Koopman, Pieter and Plasmeijer, Rinus and Achten, Peter}, + editor = {Scholz, Sven-Bodo and Chitil, Olaf}, + year = {2011}, + pages = {212--232}, + file = {Koopman et al. - 2011 - An Executable and Testable Semantics for iTasks.pdf:/home/mrl/.local/share/zotero/storage/6LFA9MNU/Koopman et al. - 2011 - An Executable and Testable Semantics for iTasks.pdf:application/pdf}, +} + +@incollection{management_association_evaluating_2014, + address = {Hershey, PA, USA}, + title = {Evaluating the {Usability} of {Domain}-{Specific} {Languages}}, + isbn = {978-1-4666-4301-7}, + url = {https://services.igi-global.com/resolvedoi/resolve.aspx?doi=10.4018/978-1-4666-4301-7.ch098}, + abstract = {Domain-Specific Languages (DSLs) can be regarded as User Interfaces (UIs) because they bridge the gap between the domain experts and the computation platforms. Usability of DSLs by domain experts is a key factor for their successful adoption. The few reports supporting improvement claims are persuasive, but mostly anecdotal. Systematic literature reviews show that evidences on the effects of the introduction of DSLs are actually very scarce. In particular, the evaluation of usability is often skipped, relaxed, or at least omitted from papers reporting the development of DSLs. The few exceptions mostly take place at the end of the development process, when fixing problems is already too expensive. A systematic approach, based on techniques for the experimental evaluation of UIs, should be used to assess suitability of new DSLs. This chapter presents a general experimental evaluation model, tailored for DSLs’ experimental evaluation, and instantiates it in several DSL’s evaluation examples.}, + booktitle = {Software {Design} and {Development}: {Concepts}, {Methodologies}, {Tools}, and {Applications}}, + publisher = {IGI Global}, + author = {Barišic, Ankica and Amaral, Vasco and Goulão, Miguel and Barroca, Bruno}, + editor = {Management Association, Information Resources}, + year = {2014}, + doi = {10.4018/978-1-4666-4301-7.ch098}, + pages = {2120--2141}, + file = {Barišic et al. - 2014 - Evaluating the Usability of Domain-Specific Langua.pdf:/home/mrl/.local/share/zotero/storage/ARTGSHZK/Barišic et al. - 2014 - Evaluating the Usability of Domain-Specific Langua.pdf:application/pdf}, +} + +@article{van_der_aalst_workflow_2003, + title = {Workflow {Patterns}}, + volume = {14}, + issn = {1573-7578}, + url = {https://doi.org/10.1023/A:1022883727209}, + doi = {10.1023/A:1022883727209}, + abstract = {Differences in features supported by the various contemporary commercial workflow management systems point to different insights of suitability and different levels of expressive power. The challenge, which we undertake in this paper, is to systematically address workflow requirements, from basic to complex. Many of the more complex requirements identified, recur quite frequently in the analysis phases of workflow projects, however their implementation is uncertain in current products. Requirements for workflow languages are indicated through workflow patterns. In this context, patterns address business requirements in an imperative workflow style expression, but are removed from specific workflow languages. The paper describes a number of workflow patterns addressing what we believe identify comprehensive workflow functionality. These patterns provide the basis for an in-depth comparison of a number of commercially availablework flow management systems. As such, this paper can be seen as the academic response to evaluations made by prestigious consulting companies. Typically, these evaluations hardly consider the workflow modeling language and routing capabilities, and focus more on the purely technical and commercial aspects.}, + number = {1}, + journal = {Distributed and Parallel Databases}, + author = {van der Aalst, W.M.P. and ter Hofstede, A.H.M. and Kiepuszewski, B. and Barros, A.P.}, + month = jul, + year = {2003}, + pages = {5--51}, + file = {van der Aalst et al. - 2003 - Workflow Patterns.pdf:/home/mrl/.local/share/zotero/storage/WXP2T4R7/van der Aalst et al. - 2003 - Workflow Patterns.pdf:application/pdf}, +} diff --git a/thesis.tex b/thesis.tex index 0759d45..5cc3f42 100644 --- a/thesis.tex +++ b/thesis.tex @@ -19,7 +19,7 @@ } % Document info -\title{\mytitle{}\texorpdfstring{\\[2ex]}{---}\smaller{}\mysubtitle{}} +\title{\mytitle\texorpdfstring{\\[2ex]}{---}\smaller\mysubtitle} \author{Mart Lubbers} \date{\mydate} diff --git a/top/finale.tex b/top/finale.tex index 3910583..d528b71 100644 --- a/top/finale.tex +++ b/top/finale.tex @@ -2,6 +2,8 @@ \input{subfilepreamble} +\setcounter{chapter}{7} + \begin{document} \input{subfileprefix} \chapter{Finale}% @@ -19,12 +21,21 @@ \section{Finale} The \gls{MTASK} system is a proof-of-concept system, though fully functioning, for integrating \gls{IOT} edge devices in \gls{TOP}. In conjunction with \gls{ITASK}, it is possible to program all layers of the \gls{IOT} from a single declarative specification. +The \gls{ITASK} system is used to program the top layers of an \gls{IOT} system, providing the server and the web \gls{UI}. +Then, \gls{MTASK} can be used to integrate edge devices. +Tasks for edge devices are written in the \gls{MTASK} \gls{DSL} and can be integrated in \gls{ITASK} using only a few functions. +\todo{extend} Deep embedding. -\subsection{Future work} +\section{Future work} +\todo[inline]{De grens tussen future en related work is soms vaag maar ik heb het zo goed als mogelijk proberen te scheiden. Mis ik hier nog iets?} There are many ways of extending the research on the \gls{MTASK} system that also concerns \gls{TOP} for resource constrained devices in general. +Some obvious routes would be to add features, support more platforms, + +\todo{security} +\subsection{Advanced edge devices techniques} Edge devices may produce a lot of data and it is not always effective to send this data to the server for processing. Leaving the produced data and computations on the edge device is called \emph{edge computing} \citep{shi_edge_2016}. The \gls{MTASK} exhibits many properties of edge computing because it is possible to run entire workflows on the device. @@ -32,16 +43,73 @@ However, it would be interesting to see how far this can be extended. The \gls{MTASK} language is a high-level \gls{DSL} so it would be obvious to introduce abstractions for edge computations. For example, add \gls{TOP} support for machine learning on the edge device using TinyML \citep{sanchez-iborra_tinyml-enabled_2020}. -Another recent advance in \gls{IOT} programming is intermittent computing. -Intermittent computing - -Formal semantics - -Automatic peripherals - -Different architectures (FPGA?) - -Mesh communication +Another recent advance in \gls{IOT} programming is battery-less or even battery-free computing. +Instead of equipping the edge device with a battery, a capacitor is used in conjunction with some energy harvesting systems such as a solar panel. +With the use of intermittent computing, resuming the computation after a, possibly unexpected, power loss, operation can still be achieved \citep{hester_batteries_2019}. +After a reset, the program state is resumed from a checkpoint that was stored in some non-volatile memory. +Many intermittent computing solutions rely on annotations from the programmer to divide the program into atomic blocks, sometimes called \emph{tasks} as well. +These blocks are marked as such because in the case of an reset of the system, the work must be done again. +Examples of such blocks are \gls{I2C} transmissions or calculations that rely on recent sensor data. +In \gls{MTASK}, all work expressed by tasks is already split up in atomic pieces of work. +Furthermore, creating checkpoints should be fairly straightforward as \gls{MTASK} tasks do not rely on any global state---all information required to execute a task is stored in the task tree. +It would be interesting to see what \gls{TOP} abstraction could be useful for intermittent computing and what solutions are required to make this work. +An alternative to reducing the energy consumption by going to sleep is stepping down the processor frequency. +So called \gls{DVFS} is a scheduling technique that slows down the processor in order to reach the goals as late as possible, reducing the power consumption. +It would be interesting to investigate the possibilities for \gls{DVFS} in \gls{MTASK}. + +Mesh networks allow for communication not only to-and-fro the device and server but also between devices. +The \gls{ITASK} system already contains primitives for distributed operation. +For example, it is possible to run tasks or share data with \glspl{SDS} on a different machine. +It would be interesting to investigate how this networking technique can be utilised in \gls{MTASK}. + +Finally, \glspl{FPGA} have been becoming cheaper and faster recently, allowing for purely functional code to be translated to \glspl{FPGA} code efficiently \citep{baaij_digital_2015}. +It would be interested to see how and whether (parts of) \gls{TOP} programs or the functionality of the \gls{MTASK} \gls{OS} could be translated to \gls{FPGA} specifications. + +\subsection{Formal semantics} +Semantics allow reasoning about the language and programs in order do (symbolic) simulation, termination checking, task equivalence, or otherwise. +For \gls{ITASK} there have been two attempts to formally specify the language. +First \citet{koopman_executable_2011} defined a semantics used for property based testing based on a minimal version of \gls{ITASK}. +Then \citet{plasmeijer_task-oriented_2012} formalised \gls{ITASK} by providing an executable semantics for the language. +Both semantics are not suitable for formal reasoning due to the complexity. +Later, \citet{steenvoorden_tophat_2019} created \gls{TOPHAT}, a \gls{TOP} language with a complete formal specification with similar features to \gls{MTASK} \citep{steenvoorden_tophat_2019}. +\Citet{antonova_mtask_2022} compared parts of \gls{MTASK} to the semantics of \gls{TOPHAT} semantics and created a preliminary semantics for a subset of \gls{MTASK}. +Future research into extending the formal semantics of \gls{MTASK} is useful to give more guarantees on \gls{MTASK} programs. +Maybe this opens the door to real-time operation as well. + +\subsection{\texorpdfstring{\Gls{TOP}}{Task-oriented programming}} +In order to keep the resource constraints low, the \gls{MTASK} language contains only a minimal set of simple task combinators. +From these simple combinators, complex collaboration patterns can be described. +The \gls{ITASK} language is designed exactly the opposite. +From just a few super combinators, all other combinators are derived. +However, this approach requires a very powerful host language in which task combinators can be defined in terms of the host language. +It would be fruitful to investigate which workflows cannot be specified with the limited set of combinators available in \gls{MTASK}. +Furthermore, it is unclear whether all derived combinators from \gls{ITASK} can be expressed in terms of \gls{MTASK} combinators. +\Citet{van_der_aalst_workflow_2003} defines a benchmark set of workflow patterns. +It would be interesting to see which patterns can be implemented with \gls{MTASK}, and what additional combinators would be needed. +Moreover, editors are a crucial part of \gls{TOP}. +In \gls{MTASK}, sensors can be seen as read-only shared editors that are updated by the system. +It would be interesting to investigate how actual interactive editors would fit in \gls{MTASK}. +For example, many smartwatches contain touch sensitive screens that could be used to interact with the user in this way. + +\Glspl{SDS} in \gls{ITASK} have a rich set of combinators to transform and combine the \glspl{SDS} into new \gls{SDS}. +In \gls{MTASK}, \glspl{SDS} are just typed global variables that may or may not proxy an \gls{ITASK} \gls{SDS}. +It would be interesting to port the \gls{SDS} combinators to \gls{MTASK} as well, allowing them to be transformed and combined also. + +\subsection{Usability} +The promise of \glspl{DSL} has often been that a domain expert could program with little technical knowledge of the host programming language. +Some even propose that a \gls{DSL} is a \gls{UI} for domain experts to computation platforms \citep{management_association_evaluating_2014}. +In practise this is not always the case due to crippling syntax and convoluted error messages. +Recent approaches in interactive editors for programming language source code such as dynamic editors \citep{koopman_dynamic_2021} or typed tree editors such as Hazelnut \citep{omar_hazelnut_2017} could prove useful for supporting the \gls{DSL} programmer in using \gls{MTASK}. +If the editor produces correct \gls{MTASK} code by construction, much of the problems could be avoided. +In the same respect, as \gls{MTASK} is a tagless-final \gls{EDSL} and uses \gls{HOAS}, the error messages are complex and larded with host language features. +Much research has gone into simplifying these error messages by translating them to the \gls{DSL} domain, see for example \citep{serrano_type_2018}. +A future directions could be to apply the \gls{EDSL} error message techniques on \gls{MTASK} as well. + +The serialisation and deserialisation of data types is automated both on the server and the \gls{MTASK} device using generic programming. +Using the structural information of the data type, the code responsible for the functionality is automatically generated. +Peripherals are not yet fully integrated in such a way. +When a peripheral is added, the programmer has to define the correct byte code, implement the instructions in the interpreter, add task tree nodes, and implement them in the rewrite system. +It would be interesting to investigate whether this can be automated or centralised in a way. \section{Related work} The novelties of the \gls{MTASK} system can be compared to existing systems in several categories. @@ -62,7 +130,7 @@ Both client and server are written in JavaScript. However, there is no integration between the client and the server other than that they are programmed from a single source. Mat\`e is an example of an early tierless sensor network framework where devices are provided with a virtual machine using TinyOS for dynamic provisioning \citep{levis_mate_2002}. -\subsubsection{\texorpdfstring{\Glsxtrlongpl{DSL}}{DSLs} for microcontrollers}\label{sec:related_dsl} +\subsection{\texorpdfstring{\Glsxtrlongpl{DSL}}{DSLs} for microcontrollers}\label{sec:related_dsl} Many \glspl{DSL} provide higher-level programming abstractions for microcontrollers, for example providing strong typing or memory safety. For example Copilot \citep{hess_arduino-copilot_2020} and Ivory \citep{elliott_guilt_2015} are imperative \glspl{DSL} embedded in a functional language that compile to \ccpp{}. \todo{uit\-brei\-den?} @@ -119,7 +187,7 @@ The table compares the solutions in the relevant categories with \gls{MTASK}. FlowTask & 2011 & \CIRCLE{} & \CIRCLE{} & \Circle{} & \Circle{} & \Circle{} & \Circle{}\\ Ocram & 2013 & \CIRCLE{} & \CIRCLE{} & \Circle{} & \CIRCLE{} & \Circle{} & \Circle{}\\ C\'eu & 2013 & \CIRCLE{} & \CIRCLE{} & \CIRCLE{} & \CIRCLE{} & \CIRCLE{} & \CIRCLE{}\\ - \Gls{MTASK} & 2022 & \CIRCLE{} & \CIRCLE{} & \CIRCLE{} & \CIRCLE{} & \LEFTcircle{}\tnote{1} & \LEFTcircle{}\tnote{2}\\ + \gls{MTASK} & 2022 & \CIRCLE{} & \CIRCLE{} & \CIRCLE{} & \CIRCLE{} & \LEFTcircle{}\tnote{1} & \LEFTcircle{}\tnote{2}\\ \bottomrule \end{tabular} \begin{tablenotes} @@ -151,7 +219,7 @@ These \gls{IO} functions can then be used as signals and combined as in any \gls Due to the compilation to \gls{C} it is possible to run emfrp programs on tiny computers. However, the tasks are not interpreted and there is no communication with a server. -Other examples are mfrp \citep{sawada_emfrp:_2016}, CFRP \citep{suzuki_cfrp_2017}, XFRP \citep{10.1145/3281366.3281370}, Juniper \citep{helbling_juniper:_2016}, Hailstorm \citep{sarkar_hailstorm_2020}, Haski \citep{valliappan_towards_2020}, arduino-copilot \citep{hess_arduino-copilot_2020}. +Other examples are CFRP \citep{suzuki_cfrp_2017}, XFRP \citep{10.1145/3281366.3281370}, Juniper \citep{helbling_juniper:_2016}, Hailstorm \citep{sarkar_hailstorm_2020}, Haski \citep{valliappan_towards_2020}, arduino-copilot \citep{hess_arduino-copilot_2020}. \subsection{\texorpdfstring{\Glsxtrlong{TOP}}{Task-oriented programming}}\label{sec:related_top} \Gls{TOP} as a paradigm with has been proven to be effective for implementing distributed, multi-user applications in many domains.