Psyche-C: automatic compilation of partially-available C programs

Psyche-c is a compiler for incomplete C code, designed for various scenarios such as debugging, static analysis, and code completion. By taking an input snippet, Psyche-c generates a header file that, once included into the original program, produces compilable code. The compiler faces challenges during parsing and type inference, dealing with issues like NULL pointers, const/volatile conversions, variadic functions, and void* subtyping. Psyche-c is still in development but can be tried out. The source code is available on GitHub. It does not generate function definitions, only declarations, which may affect linking. A paper describing its internals has been accepted to POPL 2018.

To top