[cfe-dev] Module that constructs CFGs from Clang python bindings.

Shramos via cfe-dev cfe-dev at lists.llvm.org
Sat Jul 9 12:20:46 PDT 2016


Hello cfe-dev list,

I am a student with big interest in learning python and Clang Analyzer internals. To start from some point, I decided to build a module that provides an easy way to construct CFGs and interact with them using only Clang Python Bindings AST. I built it for (more or less) full C language and in pure Python (influenced from CFG.cpp (https://github.com/llvm-mirror/clang/blob/master/lib/Analysis/CFG.cpp). To test its usage, I built a dataflow analysis module (that is not published yet) that traverse the CFG , and it seems to work more or less good.


As I said before, I am doing this with the only purpose of learning, so I am aware that my Python code is not of good quality and probably the architecture of the program can be improved a lot. Also, there will be a lot of bugs. If someone have some free time and wants to make a quick look at the project, I will be very grateful to hear any kind of constructive criticism.


Please contact me at the email of this message, or to the email that appears in the github project description.


Here is the github repository:


https://github.com/shramos/pyCFG/


Thank you very much for this fantastic tool, your effort is appreciated.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160709/d3c02be6/attachment.html>


More information about the cfe-dev mailing list