CIL: intermediate language and tools for analysis and transformation of C programs. This paper describes the C Intermediate Language: a highlevel representation along with a set of tools that permit easy analysis and source-to-source transformation of C programs. Compared to C, CIL has fewer constructs. It breaks down certain complicated constructs of C into simpler ones, and thus it works at a lower level than abstract-syntax trees. But CIL is also more high-level than typical intermediate languages (e.g., three-address code) designed for compilation. As a result, what we have is a representation that makes it easy to analyze and manipulate C programs, and emit them in a form that resembles the original source. Moreover, it comes with a front-end that translates to CIL not only ANSI C programs but also those using Microsoft C or GNU C extensions. We describe the structure of CIL with a focus on how it disambiguates those features of C that we found to be most confusing for program analysis and transformation. We also describe a whole-program merger based on structural type equality, allowing a complete project to be viewed as a single compilation unit. As a representative application of CIL, we show a transformation aimed at making code immune to stack-smashing attacks. We are currently using CIL as part of a system that analyzes and instruments C programs with run-time checks to ensure type safety. CIL has served us very well in this project, and we believe it can usefully be applied in other situations as well.

References in zbMATH (referenced in 36 articles )

Showing results 1 to 20 of 36.
Sorted by year (citations)

1 2 next

  1. Si, Xujie; Naik, Aaditya; Dai, Hanjun; Naik, Mayur; Song, Le: Code2Inv: a deep learning framework for program verification (2020)
  2. Ouadjaout, Abdelraouf; Miné, Antoine: Quantitative static analysis of communication protocols using abstract Markov chains (2019)
  3. Kojima, Kensuke; Imanishi, Akifumi; Igarashi, Atsushi: Automated verification of functional correctness of race-free GPU programs (2018)
  4. Lauko, Henrich; Ročkai, Petr; Barnat, Jiří: Symbolic computation via program transformation (2018)
  5. Blot, Arthur; Yamamoto, Masaki; Terauchi, Tachio: Compositional synthesis of leakage resilient programs (2017)
  6. Jiang, Jiahong; Chen, Liqian; Wu, Xueguang; Wang, Ji: Block-wise abstract interpretation by combining abstract domains with SMT (2017)
  7. Nguyen, Thanhvu; Weimer, Westley; Kapur, Deepak; Forrest, Stephanie: Connecting program synthesis and reachability: automatic program repair using test-input generation (2017)
  8. Kirchner, Florent; Kosmatov, Nikolai; Prevosto, Virgile; Signoles, Julien; Yakobowski, Boris: Frama-C: a software analysis perspective (2015) ioport
  9. Zakharov, I.; Mandrykin, M.; Mutilin, V.; Novikov, E.; Petrenko, A.; Khoroshilov, A.: Configurable toolset for static verification of operating systems kernel modules (2015) ioport
  10. Groce, Alex; Havelund, Klaus; Holzmann, Gerard; Joshi, Rajeev; Xu, Ru-Gang: Establishing flight software reliability: testing, model checking, constraint-solving, monitoring and learning (2014)
  11. Chaki, Sagar; Gurfinkel, Arie; Kong, Soonho; Strichman, Ofer: Compositional sequentialization of periodic programs (2013)
  12. Hills, Mark; Chen, Feng; Roşu, Grigore: A rewriting logic approach to static checking of units of measurement in C (2012) ioport
  13. Jeannet, Bertrand; Sotin, Pascal: Inferring effective types for static analysis of C programs (2012)
  14. Mandrykin, M. U.; Mutilin, V. S.; Novikov, E. M.; Khoroshilov, A. V.; Shved, P. E.: Using Linux device drivers for static verification tools benchmarking (2012) ioport
  15. Seyster, Justin; Dixit, Ketan; Huang, Xiaowan; Grosu, Radu; Havelund, Klaus; Smolka, Scott A.; Stoller, Scott D.; Zadok, Erez: \textscInterAspect: aspect-oriented instrumentation with GCC (2012)
  16. Shved, P. E.; Mutilin, V. S.; Mandrykin, M. U.: Experience of improving the BLAST static verification tool (2012)
  17. Boldo, Sylvie; Marché, Claude: Formal verification of numerical programs: from C annotated programs to mechanical proofs (2011)
  18. Dos Reis, Gabriel; Stroustrup, Bjarne: A principled, complete, and efficient representation of C++ (2011)
  19. Gay, David; Galenson, Joel; Naik, Mayur; Yelick, Kathy: Yada: straightforward parallel programming (2011) ioport
  20. Kerneis, Gabriel; Chroboczek, Juliusz: Continuation-passing C, compiling threads to events through continuations (2011)

1 2 next