A front-end for the C programming language that simplifies code for analysis and transformation.
CIL (C Intermediate Language) is a front-end tool for the C programming language that parses, type-checks, and compiles C programs into a simplified subset of C. It facilitates program analysis and transformation by providing a cleaner, more uniform representation of C code, making it easier to build tools that reason about or modify C programs.
Developers and researchers building static analysis, verification, or transformation tools for C codebases, especially those dealing with complex or compiler-specific C extensions.
Developers choose CIL over raw C parsing because it simplifies C's complexity into a manageable intermediate form, supports ANSI C along with GNU and Microsoft compiler extensions, and offers seamless integration as a drop-in compiler replacement or OCaml library for custom tooling.
C Intermediate Language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports ANSI C along with most extensions from GNU C and Microsoft C compilers, making it versatile for parsing diverse, real-world codebases.
Includes a Perl script that acts as a replacement for gcc or cl, allowing seamless use in existing build processes without modification, as highlighted in the README.
Can merge multiple source files into a single file, facilitating whole-program analysis which is essential for comprehensive static analysis tools.
Provides built-in support for control-flow and points-to analyses, reducing the initial effort needed to implement complex program analyses.
Available as an OCaml library, enabling developers to build specialized analysis or transformation tools leveraging CIL's infrastructure, as shown in the usage examples.
Requires OCaml compiler, Perl, and ocamlfind to build and install, adding complexity and setup time compared to standard C toolchains.
Primarily designed as an OCaml library, so developers need OCaml knowledge to build custom tools, limiting accessibility for those in other language ecosystems.
Documentation is built with Hevea and relies on external tutorials; the README points to a mailing list and bug tracker, indicating potential gaps in up-to-date resources.
As a specialized academic tool, it may have slower updates and fewer community contributions compared to mainstream alternatives like Clang, based on the mailing list reliance.