summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-12-12 03:48:54 +0000
committerAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-12-12 03:48:54 +0000
commit07187c09d0fa61c49201bff9660c1c28c3825da4 (patch)
tree8a5c8739f962b65d1768c8f14aa880e8741c901c
parent07005cf0189fb9c828fa8a55fa7a39b036596877 (diff)
downloadesotericFORTRAN-07187c09d0fa61c49201bff9660c1c28c3825da4.tar.gz
esotericFORTRAN-07187c09d0fa61c49201bff9660c1c28c3825da4.zip
Adjusted introduction and written conclusion
-rw-r--r--report/esoteric_project_report.pdfbin299547 -> 300200 bytes
-rw-r--r--report/esoteric_project_report.tex49
2 files changed, 37 insertions, 12 deletions
diff --git a/report/esoteric_project_report.pdf b/report/esoteric_project_report.pdf
index b01ca3c..b9d9acb 100644
--- a/report/esoteric_project_report.pdf
+++ b/report/esoteric_project_report.pdf
Binary files differ
diff --git a/report/esoteric_project_report.tex b/report/esoteric_project_report.tex
index fd144b0..be12b46 100644
--- a/report/esoteric_project_report.tex
+++ b/report/esoteric_project_report.tex
@@ -54,22 +54,47 @@ ABSTRACT INCOMPLETE
\chapter{Introduction}
\label{chap:intro}
-For this project we have decided to create an Esolang interpreter in Java so that we can write code, craft Boolean expressions and calculate Math. We plan to research, design and implement an esoteric language while also understanding fundamental advanced programming concepts.
-
-\section{Functional Requirements}
-After some discussion, we decided that our goals for this project are to create grammar for a language and form a lexical analysis algorithm. After this, we may develop a parser or interpreter so that we can convert our high level code into bytecode which can be read more easily by the JVM.
-
-\section{Non-functional Requirements}
-Our code should be well tested, and be capable of handling edge cases. It should be modular and scalable so that functionality can easily be added without undue difficulty. It would be good if our interpreter could calculate mathematical functions and have good performance with well optimized code.
+\section{Project Statement}
+This report will detail work done on creating a compiler for an esoteric programming language, or Esolang. Both the language and the compiler will be designed and created as part of this project, with the final result being a working compiler for a Turing complete language. The plan for the project is to first research other compiler implementations, and existing esoteric languages to learn the basic structure and fundamentals. We will then take this knowledge and develop the compiler using advanced programming concepts, before running a series of designed experiments to test the compilers capabilities and effectiveness.
\section{Technology}
-We are looking at coding Java in IntelliJ, and potentially using GNU Bison to parse.
+To develop the compiler we plan on using the programming language java for the majority of the implementation. We plan on either compiling directly into java bytecode, or into a secondary language such as C.
\section{MoSCoW Analysis}
-We thought about what our interpreter may or may not have so that we have a clear understanding of our priorities when coding. We decided that our software \emph{must} read and interpret commands immediately from a command line. The language \emph{must} be Turing complete, and be capable of detecting syntax and runtime errors. It \emph{should} be able to read from file and execute a script. It also \emph{should} be able to optimize source code during runtime. The interpreter \emph{could} be able to implement functions and procedures with return values, and be able to handle memory allocation and disposal. Our program \emph{won't have} a graphical or web-based interface, since it would take up too much development time and is not entirely needed for the scope of this project. It also will not implement object-oriented programming features.
+Before implementation we have decided on a series of requirements, split into sections using the MoSCoW analysis method.
+
+Must have:
+\begin{itemize}
+ \item A working compiler without and crashes or unexpected behaviour
+ \item A Turing complete language with features including expressions, conditionals and loops
+ \item Basic error handling and reporting
+ \item Reading and executing single lines of code from command line
+ \item Output to command line
+ \item Basic numerical variable handing
+\end{itemize}
+Should have:
+\begin{itemize}
+ \item Reading and executing from source files
+ \item Additional features including strings and logical expressions
+ \item Improved error handling, providing useful information to the user
+ \item Optimization steps during compilation and before runtime
+\end{itemize}
+Might have:
+\begin{itemize}
+ \item Further features such as functions and recursion
+ \item Array handling
+ \item Further string handling such as indexing
+ \item Memory allocation and disposal
+\end{itemize}
+Won't have:
+\begin{itemize}
+ \item User interface
+ \item Object oriented programming features
+ \item IDE features
+\end{itemize}
\section{Report structure}
-Breifly describe what you will cover in the remainder of the report, chapter by chapter.
+This report will first cover our research into compilers and esoteric languages in Chapter 2. Then, we will describe the overall design and structure of a compiler based on our research in Chapter 3. Chapter 4 will focus on the design of our own esoteric language, including grammar tables. Chapter 5 will describe the implementation and documentation of the compiler, explaining how it was implemented using agile methods. Chapter 6 will show evidence of testing the compiler, with both unit tests and overall test harnesses for each section. Finally, Chapter 7 will be the conclusion, where we will compare the final result to our initial requirements, and give any further work we would do if given time.
\chapter{Research of Similar Systems}
@@ -664,9 +689,9 @@ The testing that occurred after each sprint was done in two main stages. Firstly
\end{table}
\chapter{Discussion, conclusion and future work}
+Overall we are happy with the end product produced during this project. We have created a working, capable compiler able to work with our modified version of Fortran. From our initial MoSCoW analysis in Chapter 1 we have achieved all the "must have" requirements as the language is Turing Complete and can detect a wide variety of both syntax and runtime errors. From the "should have" section, we have functionally to read from files, and has all of the additional features. However, since we decided to compile to C, we excluded optimisation methods as the C compiler would perform these anyway. Again, from the "must have" section we implemented the additional features described, such as functions, but again decided against direct memory allocation as our language is still reasonably simple, so the memory handing from C suffices. Finally, even though we said the end product would not have a GUI, we decided to implement a simple interface to test the compiler and more clearly show the final product.
-Briefly discuss and conclude your achievements and put them in perspective with the MoSCoW analysis you did early on. Be honest by declaring for example `S' categorised objectives which did not make it to the final deliverable rather than reversely modifying your MoSCoW in Chapter \ref{chap:intro}! Also discuss future developments and how you see the deliverable improving if more time could be spent. Note that this section should not be used as a medium to vent frustrations on whatever did not work out (pandemic, group partners, etc.) as there are other means for this (labs, e-mail MO, ...) that should be used well before any such problems become an issue.
-
+Future work would include further expanding the language to include further Fortran features. Most obviously, we would further develop string handling to include string indexing and slicing. We would also implement additional input and output features, including reading from files. Other implemented features would include modules, pointers and including some built-in functions. Finally, we would further improve the error handing, detecting more errors before the code is compiled to C and displaying additional error information.
\bibliographystyle{unsrt}
\bibliography{References}