[cfe-dev] Generic abstract interpretation

Jordan Rose jordan_rose at apple.com
Wed Jul 9 08:59:17 PDT 2014


I'm not quite sure what you mean here. If what you're asking is whether the static analyzer is a generic virtual machine, then no—it operates on Clang CFGs and ASTs, meaning it's "limited" to C, C++, and Objective-C. (And in theory OpenCL and CUDA.) The downside of this is that it can't handle arbitrary LLVM IR, from other languages or even from C-family language constructs that are hard to model. The upside is that it has a much stronger understanding of the intent of the user's code, and can do a better job presenting issues it finds.

The general design of the analyzer (graph traversal exploring a state space, informed by callbacks) could apply to any language, but the current implementation is not immediately reusable.

Jordan


On Jul 8, 2014, at 16:00 , Jiří Zárevúcky <zarevucky.jiri at gmail.com> wrote:

> 
> Hi, I am new here and I am wondering... does the frontend or the static analyzer have any support for generic abstract interpretation?
> 
> I would imagine most of the static analysis done in the frontend is abstract interpretation in some form, but I am utterly lost in the code so I have no clue how much of it may be generic and how much is just hardcoded special cases.
> 
> 
> -- Jiří Zárevúcky





More information about the cfe-dev mailing list