Ideas For Making Contributions To Oink

Some of these ideas may sound pretty intimidating, but with explanations may not be as hard as they seem. For example, extending Elsa/Oink to a C++ compiler sounds like a lot of work, but even a naive code-generator of the kind written in an undergraduate compiler class would be quite helpful to us for testing purposes.

For those who just want to get to know the system, we can always use more test writing, test minimization, code auditing, documentation auditing, etc. There is a lot of C++ out there and not all of it goes through Elsa yet; for each file that doesn't, we need someone to figure out what is going on, minimize the input that causes the bug, and file a bug report. In a Zen temple, the head monk is the one who cleans the toilet.

See also the ideas on the Mozilla page for static analyses that Brendan Eich and I thought up to do on Mozilla with Oink.

C++ compiler / Code generator: We already have a C++ front-end; if it had a code-generator, it would be a compiler.

C++ interpreter: It would be fun to have a source-level debugger / C++ interpreter. That is, parse the program and interpret the abstract syntax tree directly.

Better linker imitator: We imitate the linker so that we can do whole-program analysis, but we do not fully implement linker functionality.

Source-to-source transformation: Programmatic AST re-arrangement and pretty-printing for refactoring support or insertion of dynamic analysis.

Note: This has been done by Taras Glek at Mozilla in his project "Pork".

Better serialization: Though the serialization of the AST is automated in Scott Mc Peak's astgen language, the serialization of the type-system has too much hand-written code and can get out of sync with the type-system.

Semantic-aware source browser: A version of LXR that could print out not only the class hierarchy but could also print the results of various analyses on the code.

Semantic grep: A regular-expression-like mini-language for matching on parts of subtrees of the AST and possibly type-system.

More static analyses: The main use of Oink is to allow for helpful static analyses of programs.

More to come...