Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions META.goblint-cil.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# DUNE_GEN

package "default-features" (
requires="goblint-cil.simplemem goblint-cil.canonicalize goblint-cil.dataslicing goblint-cil.liveness goblint-cil.heapify goblint-cil.oneret goblint-cil.logcalls goblint-cil.pta goblint-cil.partial goblint-cil.sfi goblint-cil.simplify goblint-cil.callgraph goblint-cil.logwrites goblint-cil.epicenter goblint-cil.syntacticsearch"
requires="goblint-cil.dataslicing goblint-cil.liveness goblint-cil.pta goblint-cil.makecfg goblint-cil.syntacticsearch"
version = "1.7.8"
)

package "all-features" (
requires="goblint-cil.simplemem goblint-cil.canonicalize goblint-cil.dataslicing goblint-cil.liveness goblint-cil.llvm goblint-cil.heapify goblint-cil.oneret goblint-cil.logcalls goblint-cil.pta goblint-cil.inliner goblint-cil.partial goblint-cil.blockinggraph goblint-cil.sfi goblint-cil.simplify goblint-cil.cqualann goblint-cil.callgraph goblint-cil.zrapp goblint-cil.logwrites goblint-cil.epicenter goblint-cil.ccl goblint-cil.syntacticsearch"
requires="goblint-cil.dataslicing goblint-cil.liveness goblint-cil.pta goblint-cil.makecfg goblint-cil.zrapp goblint-cil.syntacticsearch"
version = "1.7.8"
)
102 changes: 58 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,56 @@ 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.
`goblint-cil` is a fork of CIL that supports C99 as well as most of the
extensions of the GNU C. It makes many changes to the original CIL in an effort
to modernize it and keep up with the latest versions of the C language. Here is
an incomplete list of some of the ways `goblint-cil` improves upon CIL:
- Proper support for C99, ([#9][i9]) and VLAs in particular ([#5][i5], [#7][pr7])
- It uses [Zarith][zarith] instead of the deprecated [Num][num]
- Support for more recent OCaml versions (≥ 4.06)
- Large integer constants that do not fit in an OCaml `int` are represented as a
`string` instead of getting truncated
- Syntactic search extension ([#21][pr21])
- Some warnings were made optional
- Unmaintained extensions ([#30][pr30]) were removed
- Many bug fixes

[zarith]: https://github.com/ocaml/Zarith
[num]: https://github.com/ocaml/num
[i5]: https://github.com/goblint/cil/issues/5
[pr7]: https://github.com/goblint/cil/pull/7
[i9]: https://github.com/goblint/cil/issues/9
[pr21]: https://github.com/goblint/cil/pull/21
[pr30]: https://github.com/goblint/cil/pull/30

Quickstart
----------

Quick start (Attention, this installs the upstream CIL, not the version in this repository)
-----------
Install the latest release of `goblint-cil` with [opam][]:

Install the latest release of CIL with [opam][]:
opam install goblint-cil

opam install cil
Read the excellent [CIL tutorial][tuto] by Zachary Anderson, much of which
still applies to `goblint-cil`.

Read the excellent [CIL tutorial][tuto] by Zachary Anderson, and
check out the accompanying [project template][template].
**ATTENTION:** Don't install the `cil` package. This is the unmaintained
original version of CIL.

[tuto]: https://web.eecs.umich.edu/~weimerw/2011-6610/reading/ciltut.pdf
[template]: https://github.com/zanderso/cil-template

Installation (for the version in this repository)
-----------
Installation from Source
------------------------

Prerequisites:
- opam
- Some C compiler (preferably `gcc`)
- Perl

First create a local opam switch and install all dependencies:

opam switch create .

You also need perl and some C compiler, preferably gcc.

Run the following commands to build and install CIL:
Then, run the following commands to build and install `goblint-cil`:

./configure
make
Expand All @@ -46,24 +67,26 @@ directory:

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

[opam]: http://opam.ocamlpro.com/
[opam]: https://opam.ocaml.org/

Dune-Build
----------
Alternatively, you can use dune to build CIL.
Run the following commands to build and test CIL:
Build with Dune
---------------
Alternatively, you can use [dune] to build `goblint-cil`. Run the following
commands to build and test `goblint-cil`:

dune build
dune runtest # runs the regression test suite

[dune]: https://github.com/ocaml/dune

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 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][]:
You can also use `goblint-cil` as a library to write your own programs. For
instance in the OCaml toplevel using [Findlib][findlib]:

$ ocaml
Objective Caml version 4.00.1
Expand All @@ -75,26 +98,17 @@ instance in the OCaml toplevel using [findlib][]:
# Cil.cilVersion;;
- : string = "1.7.3"

[findlib]: http://projects.camlcity.org/projects/findlib.html

More documentation
------------------
TODO
----

The documentation is located in the doc/html/cil directory. The API
documentation (generated by ocamldoc) is in the api subdirectory.
- C11 support ([#13][i13])

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

make doc

You can also [browse the documentation online][doc].

[hevea]: http://hevea.inria.fr/ "Hevea - LaTex to HTML translator"
[doc]: http://cil-project.github.io/cil/doc/html/cil/ "Cil online doc"

Ressources
----------
[i13]: https://github.com/goblint/cil/issues/13

* [Mailing list](https://lists.sourceforge.net/lists/listinfo/cil-users)
* [Bug tracker](http://sourceforge.net/p/cil/bugs/)
License
-------
`goblint-cil` is licensed under the BSD license. See [LICENSE][license].

CIL is maintained by Gabriel Kerneis <gabriel@kerneis.info>
[license]: https://github.com/goblint/cil/blob/develop/LICENSE
File renamed without changes.
1 change: 0 additions & 1 deletion src/ext/blockinggraph/META

This file was deleted.

Loading