-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconclusion.tex
49 lines (32 loc) · 6.66 KB
/
conclusion.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
\chapter{Conclusion and Future Work} \label{cap:conclusao}
\begin{displayquote}
\begin{center}
\textit{``Even without a form, we will never stop walking.''}
\end{center}
\end{displayquote}
\begin{flushright}
\textit{-- TITE KUBO}
\end{flushright}
% \section{Conclusion}
This work presents Bleach, a programming language whose major purpose is serve as an educational tool in undergraduate Compilers courses present in Computer Engineering and Computer Science programs. The language intends to lower the gap between theoretical concepts and practical implementation, by offering the students an engaging and interesting mechanism to apply what the core concepts related to compilers (lexical analysis, syntax analysis, static analysis, interpretation and runtime).
The implementation of the Bleach programming language consisted of building a lexer component, a parser component, a semantic resolver and, finally, the interpreter component itself, which can also be referred to as the language runtime. The development of the mentioned components enables the students to have a better grasp of the internals of programming language implementations. Last but not least, by implementing Bleach using a tree-walk interpreter approach, essential, but complex topics about compiler are simplified and the other ones that are even more difficult are delegated to advanced courses about programming languages, type systems and optimizing compilers.
When it comes down to design challenges, the hardest part when designing Bleach was finding the optimal balance between complexity and simplicity. The major aim was to create a programming language that was interesting for the students and robust enough to cover key compiler phases, while still being approachable for students with limited experience in programming language design and implementation.
Lastly, it is expected that Bleach's establishment into Compilers courses provides students a complete, intuitive, interesting, and hands-on approach to understand the most relevant concepts related to programming language design and implementation. By allowing students to experiment with Bleach, it is anticipated that they can solidify their knowledge in this area. As for the teaching staff, Bleach offers an incremental, modular and robust approach for programming assignments or whole projects that directly reinforce the taught theoretical material.
\section{Future Work}
This section is dedicated to present directions for future development and research that build upon the work presented in this thesis.
First of all, it is important to recognize that, even though Bleach attempts to solve the problem it was designed to, it must not be considered, by any means, a silver bullet. Instead, unfortunately, Bleach has some limitations that could be object of improvement and research in order to extend it and make it even more robust, so it can better solve the problem it was proposed to.
With this in mind, the aspects below are limitations that could be worked on as a means to deliver a more fruitful and pleasant experience to both professors and students:
\begin{itemize}
\item \textbf{Allowance of constants through the use of the \texttt{const} keyword}: JavaScript, a famous dynamically-typed programming language allows the user to define constants in their programs so that they don't support assignments after the declaration of this constant. Adding such feature might be an interesting idea in order to make students think more about the concept of environments/scopes and resolving.
\item \textbf{Extension of Bleach so it can support indexing on values of type \texttt{list} and \texttt{str}:} Unfortunately, the implementation of this feature could not be properly achieved given the deadline to deliver this thesis. On the other hand, a workaround was the usage of the built-in methods for both of these types: \texttt{setAt} (which works as an assignment to a certain index of a \texttt{list} or \texttt{str} value) and \texttt{getAt} (which works as a way to retrieve the element stored at a certain index of a \texttt{list} or \texttt{str} value). Although, the behavior is exactly the same, it is important to recognize the syntax may not have the best taste when compared to an indexing option. This might be a good gap in Bleach's implementation that can taught the students more about concepts of parsing, resolving, runtime execution and runtime errors.
\item \textbf{Addition of a \texttt{for ... in ...} structure, similar to Python:} The addition of such loop structure in Bleach can be fruitful, since it can used to teach students about syntactic sugar in the programming languages they are already familiar with, as well as about the desugaring process, common in several languages.
\item \textbf{Enhancement of the Resolver component of the Bleach Interpreter:} Despite the fact that the Resolver component is already able to detect certain static errors, it could be augmented in order to detect new kinds of static errors, such as:
\begin{itemize}
\item Detection of unused variables.
\item Detection of function overloading or re-declaration.
\item Detection of unreachable code.
\end{itemize}
\item \textbf{Increasement of the quantity of test cases present in Bleach's Test Suite:} At the moment this thesis was delivered, Bleach's Test Suite was composed of 44 test cases that covered every single type of AST node, as well as some native function from Bleach's standard library. However, there is still more room to cover. For example, all of these mentioned tests deal with cases where the Bleach programs are correct and produce an output that is compared to expected ones. It is desirable to implement a battery of test cases that deal with incorrect Bleach programs and check whether the errors being thrown by the interpreter are indeed the expected ones.
\item \textbf{Improvement of Bleach's REPL in order to make it more user-friendly:} In order to provide a better user experience when it comes to Bleach's REPL, it would be a great idea to allow line breaks when declaring functions, classes, anonymous functions, if statements and loops, so the readability of the written code could be improved.
\item \textbf{Survey about Bleach with the target audience:} Since Bleach is a tool created to help the teaching and learning process in an undergraduate Compilers course, it seems reasonable to get feedback from those involved in this scenario. With this in mind, an opinion pool could be created as a means to get input from professors, instructors and teaching assistants regarding the viability, upsides and drawbacks from using Bleach as a teaching tool in introductory Compiler courses.
\end{itemize}