Merge branch 'master' of git.martlubbers.net:msc-thesis1617
[msc-thesis1617.git] / conclusion.conclusion.tex
1 This thesis introduces a novel system for adding \gls{IoT} functionality to
2 the \gls{TOP} implementation \gls{iTasks}. A new view for the existing
3 \gls{mTask}-\gls{EDSL} has been created which compiles the program
4 into bytecode that can be interpreted by a client. Clients have
5 been written for several microcontrollers and consumer architectures which can
6 be connected through various means of communication such as serial port,
7 wifi and wired network communication. The bytecode on the devices is
8 interpreted using a stack machine and provides the programmer with interfaces
9 to the peripherals. The semantics for \gls{mTask} try to resemble the
10 \gls{iTasks} semantics as close as possible.
11
12 The host language has a proven efficient compiler and code generator. The
13 compilation is linear in the amount of instructions generated and is therefore
14 also scalable. Moreover, compiling \glspl{Task} is fast because it is nothing
15 more than running some functions native to the host language and there is no
16 intermediate \gls{AST}.
17
18 The dynamic nature of the client allows the microcontroller to be programmed
19 once and used many times. The program memory of microcontrollers often
20 guarantees around $10.000$ write or upload cycles and therefore existing
21 techniques such as generating \gls{C} code are not suitable for dynamic
22 \gls{Task} environments. The dynamic nature also allows the programmer to
23 design fail-over mechanisms. When a device is assigned a \gls{Task} but another
24 device suddenly becomes unusable, the \gls{iTasks} system can reassign a new
25 \gls{mTask}-\gls{Task} to another device that is also suitable for running the
26 \gls{Task} without needing to recompile the code. It also showed that adding
27 peripherals is not a time consuming task and does not even requires
28 recompilation of clients not having the peripheral.
29
30 The new functionality extends the reach of \gls{iTasks} by adding \gls{IoT}
31 functionality and allowing devices to run \gls{mTask}-\glspl{Task}. With this
32 extension, a programmer can create an entire \gls{IoT} system from one source
33 that reaches all layers of the \gls{IoT} architecture. However, this does not
34 limit the applications and makes them static. Components can be updated
35 individually without causing integration problems. Devices can be repurposed
36 just by sending new \glspl{Task} to it. Most importantly, it gives an insight
37 in the possibilities of adding \gls{IoT} to \gls{TOP} programs.