lunduniversity.lu.se

Computer Science

Faculty of Engineering, LTH

Denna sida på svenska This page in English

Compiler projects fall 2021

EDAN70: Project in Computer Science

Evaluation of ARM Assembly Generation for a Graduate Compiler Course Compiler
Per Filip Heden and Fritjof Bengtsson
Abstract:
This paper presents an evaluation of using ARM assembly instead of x86 for code generation in a basic compiler, written in a introductory compiler course at LTH. The new ARM assembly generator specifically targets Raspberry Pi hardware. The evaluation is based on the assembly languages usability for students learning about compilers. First a code generator for ARM was implemented. Then the language was extended with functions for interacting with GPIO hardware. Final conclusions from comparing x86 and ARM programs generated by the compiler was that they were almost identical. However, the Raspberry Pi gives students the opportunity to more directly interact with the hardware which other studies has found to be increasing student engagement and results.
(paper) (code)

Usability of Alternative Semantic Highlighting Features
Charlie Ringström and Jonathan Frisk
Abstract:
Today most programmers use some kind of active programming support when coding, such as auto completion and function references. One of these features is semantic highlighting. For this project, this is implemented with a language server that communicates with the text editor. This paper explores three different ways to semantically highlight the code. The first feature highlights Strings compared with the == operator to indicate that the code might be flawed. The other features highlights both for loop variables with unique colors, and also each bracket pair a unique color. By using the ExtendJ Java compiler, the proposed language server communicates with the text editors using LSP. The for loop variable highlighting and bracket coloring features were evaluated by showing code snippets to 12 test subjects, with or without semantic highlighting, and the time to solve each programming task was measured. For the two tests, the results showed a 5 % and a 13% reduction in time to solve each programming task with the semantic highlighting enabled. However, the standard deviation is too big to draw any conclusions. Additionally, it remains unknown how the results would change in real life usage.
(paper) (code)

A Framework For Efficient Code Fixes Using Reference Attributed Grammars
Charlie Mrad
Abstract:
Code fixes tools are essential for any developer and are often a feature of the more popular IDEs available today. They provide an efficient way for a programmer to learn potentially better ways to write their code and fix the potentially erroneous code automatically. The problem today comes from a lack of efficiency in how quickly the code fixes can be found and generated and how language analysing extensions for IDEs are being developed. This paper proposes a framework that can efficiently find potential errors in Java code using IntraJ and provide quick-fix options. To avoid spending a significant amount of time implementing and maintaining LSP support for the framework Magpie Bridge is used. This combination provides a solid foundation to quickly provide an expandable array of code fixes. The initial evaluation seems to outperform Soot on a similar test case. There is still plenty of room for improvement on the proposed framework, but it appears to hold up reasonably well as a starting point.
(paper) (code)

Extending a ChocoPy compiler to include lists and classes on the heap
Ellen Grane and Samer Alkhodary
Abstract:
ChocoPy is a programming language intended to be used for learning about compilers. An existing ChocoPy compiler was extended to support heap-dynamic lists and classes stored on the heap. This was done in order to examine the suitability of the ChocoPy language to be used for learning about compilers in an advanced course. The speed of the extended compiler was compared to the standard Python interpreter and the results showed the ChocoPy compiler to be much faster. It was concluded that ChocoPy would work well for teaching more about compilers due to its many features, however providing stable bases for the students is probably needed in order to implement them, as underlying bugs can lead to many issues.
(paper) (code)