lunduniversity.lu.se

Computer Science

Faculty of Engineering, LTH

Denna sida på svenska This page in English

Compiler projects fall 2019

EDAN70: Project in Computer Science

Breaking Student Parsers with Generated Test Cases
Filip Johansson
Abstract:
In this paper we try to increase the coverage of a handwritten test suite used to test student parser grammars. To do this we construct a tool, called NeoTestGen, that generates test cases for parsers based on an input grammar. This is done by extending the parser generator NeoBeaver. NeoTestGen can generate both positive and negative test cases, that is test cases that the parsers should pass or fail respectively. The resulting tool can quickly generate a large test suite with large coverage; however, there some tests in the handwritten suite that could not be generated. Furthermore, no tests in the generated suite were found to increase the coverage of the handwritten one.
(paper) (code)

SimpliC in the browser
Wilmer Nilsson and Andreas Trattner
Abstract:
More and more software has been making its way into the browser. Usually this involves rewriting the software in web specific languages, or creating complex APIs with which the front-end can communicate with a high-performance back-end. Now, however, with the help of WebAssembly, a general-purpose virtual instruction set created in the likeness of low-level assembly languages, it is possible to weave performant code into JavaScript, a typical front-end language, which is run through the V8 engine, potentially increasing performance.
At the moment, WebAssembly is able to be generated from C, C++, Rust, Go and all LLVM compatible languages. In this paper, the potential advantages and disadvantages to this approach of web programming will be discussed. The creation of a WebAssembly-compiler will also be explored, using a simpli ed C-like source language.
With our compiler ready we then perform several benchmarks, comparing the speed of emcc (C to WebAssembly) compiled WebAssembly code to, amongst others, our own compiler’s and Javascript’s. As expected our compiler was the slowest contester, finishing just after Javascript. The emcc-generated WebAssembly code however, is faster than Javascript albeit slower than languages such as Rust and Java, when run natively. With JIT-compilation turned off in Javascript even our compiler produces code that is magnitudes faster – a fact that could be used to emphasise the need of JIT-functionality in WebAssembly.
(paper) (code)

An MPS implementation for SimpliC
Raphael Castanier
Abstract:
The goal of this study was to evaluate JetBrains language editor provided as an Open Source project called MPS (Meta-Programming System). One way to evaluate MPS performances for designing simple language compiler was to implement the SimpliC language in MPS through its projectional editor. We will present in this paper what a projectional editor is and its opportunities for language design. Then we will introduce basic concepts of language design in MPS through our SimpliC implementation, and discuss the lessons we learned from this. We also discuss an evaluation of this process and present related academic work.
(paper) (code)

DeepCode phase 1: Compilers approach
Miquel Puig i Mena
Abstract:
Yet being immersed in the globalisation era, we can still perceive isolation and rivalry between software developing teams that share ambitions. Nonetheless, DeepCode proposes a cooperation between parties in order to achieve greater results. DeepCode is a tool that, by processing a data-set formed by source codes performing a generic task A, learns how to implement task A and outperform every individual from studied data-set. Unfortunately, no existing tool is capable of homogenizing a source code data-set in a manner that can be post processed by AI tools. DeepCode phase 1 targets to fill this gap in the field by offering a standardised data structure representing a generic source code. Furthermore, this paper presents a practical application that generates aforementioned representation given a well-formed source code file.
(paper) (code)