<div class="gmail_quote">On Tue, Jun 12, 2012 at 3:23 AM, Alexandros Tzannes <span dir="ltr"><<a href="mailto:atzannes@illinois.edu" target="_blank">atzannes@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
I am interested in using Clang to write a checker that reads in custom annotations (we are considering using attributes rather than pragmas) to guarantee the absence of some types of bugs. The next step after this is done would be to try and infer as many of the annotations as possible, but this will require whole program analysis. I know that clang works per translation unit (TU), so I was wondering if there is some advice on how to go about it. Perhaps serialize the AST of different TUs, merge them and analyze the whole program offline (after compilation) to prove the desired safety guarantees. It may actually be possible to perform inference per TU, as long as any cyclic call-graph dependencies are within a single TU.<br>
<br>
Any feedback/brainstorming will be greatly appreciated!<br></blockquote><div><br></div><div>We do (very simple) full program (well, full code base) analysis by outputting locally determinable aspects about entities in the code and then reduce that information in a subsequent pass. Getting the full AST for multiple TUs in C++ seems to be pretty much impossible in general, and even if it works, it doesn't sound like it would scale well.</div>
<div><br></div><div>Cheers,</div><div>/Manuel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers!<br>
Alex<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br>