Here are some reports, slides and other stuff I produced during my studies.

Master thesis: Upcompiling Legacy Code to Java

I wrote my master thesis at the Secure Systems and Software Laboratory of the University of California, Irvine (UCI). The abstract:

This thesis investigates the process of "upcompilation", the transformation of a binary program back into source code. Unlike a decompiler, the resulting code is in a language with higher abstraction than the original source code was originally written in. Thus, it supports the migration of legacy applications with missing source code to a virtual machine. The result of the thesis is a deeper understanding of the problems occurring in upcompilers.

To identify the problems, we wrote an upcompiler which transforms simple x86 binary programs to Java source code. We recover local variables, function arguments and return values from registers and memory. The expression reduction phase reduces the amount of variables. We detect calls to library functions and translate memory allocation and basic input/output operations to Java constructs. The structuring phase transforms the control flow graph to an abstract syntax tree. We type the variables to integers and pointers to integer. In order to optimize the produced code for readability, we developed a data flow aware coalescing algorithm.

The discovered obstacles include type recovery, structuring, handling of obfuscated code, pointer representation in Java, and optimization for readability, to only name a few. For most of them we refer to related literature.

We show that upcompilation is possible and where the problems are. More investigation and implementation effort is needed to tackle specific problems and to make upcompilation applicable for real world programs.

The upcompiler is written in Java. It can handle some programs which are written in C and compiled with Clang. The license of the upcompiler is GPL3, the one of the thesis CC-BY-SA.

CERN openlab: perf file format

During the summer break 2011 I was an CERN openlab Student Programme attendee. My task was to understand and document the perf file format. The abstract of the report:

Performance measurement of software under Linux is done with the perf system. Perf consists of kernel code and an userspace tool. The tool records the data to an file which can be analyzed later. Understanding this data format is necessary for individual software performance analysis.

This report provides information about the data structures used to read the data file. An application was written to demonstrate how the data file can be read. For a given data file, the application shows the frequency with which source code functions are used.

Semesterarbeit: Ein Programmiermodell für State Machines

Im Frühjahr 2011 konnte ich eine Erweiterung für meine Programmiersprache Rizzly als Semesterarbeit implementieren. Das Abstract dazu lautet:

Bei der Implementation vieler eingebetteter Systeme kommen Finite State Machines (FSM) zum Einsatz. Typischerweise werden diese in gängigen Programmiersprachen in fehleranfälliger oder umständlicher Weise implementiert. Um die Implementation auf Sprachebene besser und übersichtlicher unterstützen zu können, wird in dieser Semesterarbeit ein Programmiermodell entwickelt, welches speziell auf die Implementation von FSMs zugeschnitten ist. Als Grundlage für eine Implementierung dieses Modells wird die Programmiersprache Rizzly verwendet, welche eigens für eingebettete Systeme entworfen wurde. Die Realisierbarkeit wird gezeigt indem der bestehende Rizzly-zu-C Compiler um diese Funktionalität erweitert wird. Beispiele sollen schlussendlich die Anwendung demonstrieren.

Process Swapping in UNIX V6 - Lions' commentary chapter 14 in detail

I attended the seminar Lions' Commentary on UNIX 6th Edition in spring 2010. Besides the following slides about swapping, I recommend a visit of the original commentary. You will not only find the book to download, but also the TeX sources which are still compilable. Great if you don't like the original book format (as I did).

Bachelor thesis: A Robot Learning to Walk

The goal of this work was to develop a dynamic quadruped robot based on a minimalistic controller that exhibits a rich behavioral diversity including multiple gaits. The different patterns of locomotion are the basis for adaptation and research into embodied cognition.

A simulated model of the robot was used to facilitate optimization of the body and controller parameters. Using an evolutionary algorithm, suitable parameter values for the three gaits "walk", "trot" and "bound" were found.

Since a different body evolved for each gait, we tried to find a compromise morphology equally suitable for all gaits. In the process, we reached the limits of the existing framework for the optimization of robots. Thus, a new program called Vidyaa for the optimization of parameter values was developed. Due to its ability to nest optimization tasks, Vidyaa allows a new approach to these kinds of problems.

It is expected that the insights gained can be transferred to a real version of the robot.