.  Home  .  Lehre  .  Studentische Arbeiten  .  Masterarbeiten  .  Ausschreibung

A configurable interpreter for the Clang AST

The LLVM/Clang compiler framework is a popular environment for developing code transformation techniques and tools that improve the correctness and performance of applications. As an intermediate step of the compilation process, the Clang AST contains all the required information needed to produce executable code (via the LLVM intermediate representation in the usual compiler workflow). This thesis is concerned with developing an interpreter approach for executing C applications based directly on the Clang-generated AST, not on the IR. The resulting interpreter is meant to be configurable at runtime such that the execution of the program (via its AST) can be influenced and observed. Among other use cases, the interpreter is meant to be used in a teaching context to automatically evaluate submitted code based on certain criteria.


Desirable features of the developed interpreter are as follows:
  • Ability to allow/disallow execution of programs that use certain language features (e.g., disallow the usage of "for" loops, disallow "goto", ...)
  • Safety: implement the interpreter such that the executed application can do no harm to the system that hosts the interpreter (important for untrusted code execution)
  • Whitelisting of allowed library and system functions, again important for safety
  • Ability to gather detailed and configurable insights into the execution of the target application to answer questions such as "how many times was malloc called and how much memory was allocated in total", or "which files were opened by the application and how many bytes were written to each one"
  • Highly performant code execution is explicitly *not* a goal for the interpreter. The interpreter is meant to be used for small program runs only, and so a significant slowdown compared to native execution is acceptable.


Prof. Dr. D. Kranzlmüller

Dauer der Arbeit:

  • Masterarbeiten: 6 Monate

Anzahl Bearbeiter: 1