Actuall add the future work chapter (with content now).
[matthijs/projects/internship.git] / Report / Main / Future.tex
1 \chapter{Future work}
2 This chapter will describe outstanding tasks and issues.
3
4 \section{Verifiers}
5 Currently, when faulty MontiumC is written, this will be detected very late in
6 the process (usually only when the backend finds something it doesn't like).
7 This means that it is quite hard to determine what is wrong in the input
8 exactly, since the backend has only limited information about where code comes
9 from.
10
11 To greatly improve this situation, verifiers should be added to the frontend.
12 These verifiers should verify the input and output code against
13 the specifications. Apart from improving user feedback, this will also greatly
14 help to fine tune the specifications and find bugs in the frontend.
15
16 \section{Debug info preservation}
17 Currently, transformation passes are mostly ignorant about debugging info, they
18 treat it as ordinary code. Since debugging info is added to LLVM code by means
19 of special function calls and transformations by default assume that an unknow
20 function can do anything, this means that adding debug information can prevent
21 transformations from happening. Making transformations aware of debugging info
22 will allow them to perform transformations as normal, by updating or removing
23 debugging info.
24
25 These changes are generic for LLVM and not needed specifically for the Montium.
26 Currently, most MontiumC code seems to still work even when some transformations
27 are left out, but especially with the new hardware, some missed out
28 optimizations might still be useful.
29
30 \section{LLVM based backend}
31 Currently, the frontend is using the LLVM framework, while the backend is
32 completely separate. While this gives maximum flexibility to the backend, it
33 might be useful to create a Montium backend within the LLVM framework. This
34 backend would benefit from being able to use existing LLVM code and passes,
35 utility code, etc. Also, this would enable the compiler to become a single
36 binary executable, instead of having a seperate executable and a Java program.
37
38 However, the main risk here is when the LLVM framework turns out to be not fully
39 suitable for the Montium backend. When nothing can be reused, the amount of code
40 needed is not any less, and if the framework poses limitations, might even be
41 more. The new hardware design might be a lot more suitable for reusing code than
42 the old Montium, though. Also, the added work of migrating to a new framework
43 and new language is also a extra cost.
44
45 Currently, doing this might or might not be a good idea. What is required first,
46 is doing a more in-depth investigation of the LLVM backend framework (which is,
47 unfortunately, the most under-documented part of LLVM) and perhaps a mockup
48 implementation.