[ANN] ccons : an interactive console for C based on clang and LLVM

Hello All,

This semester, as part of a personal Computer Science project course in my undergraduate studies, I decided to see if I could make an interactive console for the C programming language (like “irb” for Ruby) based on clang and LLVM. This would answer the questions: a) is such a thing possible and b) are the clang and LLVM libraries well suited for this.

The answer to a) is yes, it is possible. I was able to use the libraries and create something that works pretty well (excluding some obscure things which are not yet supported).

The answer to b), from my experiences, is that more work is needed on the clang and LLVM APIs to expose more functionality for diverse clients, such as this project. I will not go into details here, but will probably follow-up on this another time.

The resulting project is Open Source (MIT Licensed) and is available on Google Code:

http://code.google.com/p/ccons

You can check out the code and refer to the README.txt on how to build and run the code. It currently supports Mac OS X and Linux.

To see some of the features that ccons supports, you can take a look at my presentation about it:

http://fizzysoft.net/personal/ccons.pdf

Cheers,

-Alexei Svitkine

Hello All,

This semester, as part of a personal Computer Science project course in my undergraduate studies, I decided to see if I could make an interactive console for the C programming language (like “irb” for Ruby) based on clang and LLVM. This would answer the questions: a) is such a thing possible and b) are the clang and LLVM libraries well suited for this.

This is really cool Alexei! We don’t have a great place yet to slot this into the clang web page, but could you please write a blurb for:
http://llvm.org/ProjectsWithLLVM/

? If so, I’ll be happy to add it and link it up, thanks! If you end up writing a paper or thesis about this, I’d also love to add it to llvm.org/pubs.

-Chris

Chris Lattner wrote:

Hello All,

This semester, as part of a personal Computer Science project course in my undergraduate studies, I decided to see if I could make an interactive console for the C programming language (like "irb" for Ruby) based on clang and LLVM. This would answer the questions: a) is such a thing possible and b) are the clang and LLVM libraries well suited for this.

This is really cool Alexei! We don't have a great place yet to slot this into the clang web page, but could you please write a blurb for:
http://llvm.org/ProjectsWithLLVM/

? If so, I'll be happy to add it and link it up, thanks! If you end up writing a paper or thesis about this, I'd also love to add it to llvm.org/pubs.

-Chris

Can this be folded into the clang repository (so that the clang/LLVM API supports it now and in the future) ?
It would be a great example of the diversity of things that you can accomplish with the clang/llvm libraries.

-Argiris