CIL — Infrastructure for C Program Analysis and Transformation

CIL is a tool and library that inputs C source code and outputs simplified C that is more amenable to program analysis. It can generate CFGs and can perform several analyses and transformations out of the box. See here for more details; some notables follow:

  • points-to analysis
  • various buffer-overrun protection transformations
  • transform all subprograms to have at most one return statement
  • conversion of switch and continue constructs to simple branches
  • partial evaluation and constant folding
  • conversion of C code to three-address code

Leave a Reply