Sun 25 Oct 2015 09:15 - 10:00 at Reflections - First Session Chair(s): Loek Cleophas

In this talk I will give an overview of our work on parsing and analyzing unpreprocessed C code. In addition, I will show how the same technology can be applied in completely different contexts, such as HTML while it is still embedded in PHP code.

Typically any parsing or analysis of C code happens either after running the C preprocessor (resolving macros, includes, and ifdefs) or using unsound heuristics-based parsers. The C preprocessor, based on token rewriting before parsing, is a major hurdle in developing many forms of tool support for C code. Even though developers are aware of the potential problems, real-world C code contains lots of difficult to parse preprocessor directives.

In the TypeChef project, we have developed variability-aware parsers (based on parser combinators) that can soundly parse C code in all configurations, including all branches of ifdef directions, without resorting to a brute-force strategy. I will show how this lead to the ability to build a type system that can check all compile-time configurations of the Linux kernel, a refactoring engine that can soundly rewrite C code, and even developer support for PHP code.

Sun 25 Oct

ParsingAtSLE2015
08:30 - 10:00: Parsing@SLE - First Session at Reflections
Chair(s): Loek Cleophas
ParsingAtSLE201509:00 - 09:15
Day opening
Loek Cleophas, Ali AfroozehCentrum Wiskunde & Informatica
ParsingAtSLE201509:15 - 10:00
Talk
Christian KästnerCarnegie Mellon University