5

I need to use abstract interpretation to do some analysis using LLVM. Is this possible? or I need to use analysis tools easier. If I could do that by LLVM , which classes would help me to formulate the statements from the original source code to get the relations between the variables (and the possible ranges of values for each variable)

R.Omar
  • 585
  • 1
  • 5
  • 14

3 Answers3

3

You can have a look at KLEE which is a symbolic interpreter for LLVM bitcode: https://github.com/klee

box
  • 2,866
  • 2
  • 22
  • 32
2

If you are using the interval domain for your analysis, you can use the Constant Range class to represent intervals. It will allow you to abstract away arithmetic operations on ranges. With the debug metadata and some additional bookkeeping, you can get the relations between variables. See this answer.

Community
  • 1
  • 1
0

You can have a look at the Pagai static analyzer, that computes invariants on LLVM bitcode using state-of-the-art abstract interpretation techniques and can instrument a .bc file with the obtained invariants, to be used by your tool. http://pagai.forge.imag.fr

Julien H.
  • 147
  • 9