Menu

Tree [98bc1f] master cil-1.7.3 /
 History

HTTPS access


File Date Author Commit
 bin 2013-06-17 Gabriel Kerneis Gabriel Kerneis [0320df] More reliable FORCE_PERL_PREFIX
 doc 2013-07-24 Gabriel Kerneis Gabriel Kerneis [98bc1f] Release 1.7.3
 lib 2013-07-24 Gabriel Kerneis Gabriel Kerneis [98bc1f] Release 1.7.3
 m4 2013-06-12 Gabriel Kerneis Gabriel Kerneis [5f164d] Use ocaml-autoconf macros
 ocamlutil 2013-06-15 Gabriel Kerneis Gabriel Kerneis [be6751] Use ocamlbuild for compilation
 src 2013-06-27 Gabriel Kerneis Gabriel Kerneis [431363] Fix build and installation of CIL library (#158)
 test 2013-06-19 Gabriel Kerneis Gabriel Kerneis [2d9676] Support empty arrays in checks
 .gitattributes 2011-11-04 Gabriel Kerneis Gabriel Kerneis [9e2b7a] Merge branch 'release-1.4' into develop
 .gitignore 2013-06-16 Gabriel Kerneis Gabriel Kerneis [5e508e] Fix incorrect paths
 CHANGES 2013-07-24 Gabriel Kerneis Gabriel Kerneis [98bc1f] Release 1.7.3
 LICENSE 2013-06-18 Gabriel Kerneis Gabriel Kerneis [c3c207] Minor copyright update
 META 2013-06-27 Gabriel Kerneis Gabriel Kerneis [431363] Fix build and installation of CIL library (#158)
 Makefile.in 2013-07-24 Gabriel Kerneis Gabriel Kerneis [98bc1f] Release 1.7.3
 README.md 2013-07-24 Gabriel Kerneis Gabriel Kerneis [98bc1f] Release 1.7.3
 _tags 2013-06-17 Gabriel Kerneis Gabriel Kerneis [3252de] Make ocamlbuild happy
 aclocal.m4 2013-06-12 Gabriel Kerneis Gabriel Kerneis [5f164d] Use ocaml-autoconf macros
 config.guess 2013-06-10 Gabriel Kerneis Gabriel Kerneis [19e579] Update config.sub, config.guess and configure.in
 config.h.in 2013-06-12 Gabriel Kerneis Gabriel Kerneis [9ab739] Better automatic remaking
 config.mk.in 2013-06-16 Gabriel Kerneis Gabriel Kerneis [2cb7e5] Reintroduce bin/ directory and continue cleanup
 config.sub 2013-06-10 Gabriel Kerneis Gabriel Kerneis [19e579] Update config.sub, config.guess and configure.in
 configure 2013-07-24 Gabriel Kerneis Gabriel Kerneis [98bc1f] Release 1.7.3
 configure.ac 2013-07-24 Gabriel Kerneis Gabriel Kerneis [98bc1f] Release 1.7.3
 install-sh 2013-06-13 Gabriel Kerneis Gabriel Kerneis [7047eb] Update install-sh
 myocamlbuild.ml 2013-06-16 Gabriel Kerneis Gabriel Kerneis [03f48d] Use ocamlbuild for documentation
 stamp-h.in 2013-06-12 Gabriel Kerneis Gabriel Kerneis [9ab739] Better automatic remaking

Read Me

C Intermediate Language (CIL)

CIL is a front-end for the C programming language that facilitates
program analysis and transformation. CIL will parse and typecheck a
program, and compile it into a simplified subset of C.

CIL supports ANSI C as well as most of the extensions of the GNU C and
Microsoft C compilers. A Perl script acts as a drop in replacement for
either gcc or Microsoft's cl, and allows merging of the source files in
your project. Other features include support for control-flow and
points-to analyses.

Quick start

Install the latest release of CIL with opam:

opam install cil

Read the excellent CIL tutorial by Zachary Anderson, and
check out the accompanying project template.

Installation

To build and install CIL, you need the OCaml compiler, perl, and
ocamlfind. (Of course, you also need some C compiler,
preferably gcc.)

Run the following commands to build and install CIL:

./configure
make
make test       # regression test suite, optionnal
make install    # as root or using sudo

If you want to install to some other directory, you can tweak the prefix
during the configure step. For instance, to install in your local opam
directory:

FORCE_PERL_PREFIX=1 ./configure --prefix=`opam config var prefix`

Usage

You can use cilly (installed in /usr/local/bin by default) as a drop-in
replacement for gcc to compile and link your programs.

You can also use CIL as a library to write your own programs. For
instance in the OCaml toplevel using findlib:

$ ocaml
        Objective Caml version 4.00.1

# #use "topfind";;
[...]
# #require "cil";;
[...]
# Cil.cilVersion;;           
- : string = "1.7.3"

More documentation

The documentation is located in the doc/html/cil directory. The API
documentation (generated by ocamldoc) is in the api subdirectory.

To (re)build the doc, you need Hevea and run:

make doc

You can also browse the documentation online.

Ressources

CIL is maintained by Gabriel Kerneis gabriel@kerneis.info