package goblint-cil

Build not yet checked
  1. Overview
  2. Docs
A front-end for the C programming language that facilitates program analysis and transformation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

goblint-cil-2.2.1.tbz
sha256=c1fab5c20eed73b2f020c058b5ae882fc31465d133b5a06dc63b8114d8a4f991
sha512=7e9435b677a06207bf2393b9b76bcca258d7809f9f27b5f70a5756a26858e6bd114d0d25aface8725b29e099f9ef05c15fcd2a266e1cb1bd2f2a470572c781f5

Description

This is a fork of the 'cil' package used for 'goblint'. Major changes include:

  • Support for C99 and C11.
  • Compatibility with modern OCaml versions.
  • Use Zarith instead of Num and use that for integer constants.
  • Improved locations with columns and spans.
  • Removal of unmaintained extensions and MSVC support.
  • Use dune instead of make and ocamlbuild.
  • Many bug fixes.

Added to opam-repository:

README

C Intermediate Language (CIL)

tests workflow status docs workflow status GitHub release status opam package status

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.

goblint-cil is a fork of CIL that supports C99, C11 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:

  • Support for C99 and C11.
  • Compatibility with modern OCaml versions.
  • Use Zarith instead of Num and use that for integer constants.
  • Improved locations with columns and spans.
  • Removal of unmaintained extensions and MSVC support.
  • Use dune instead of make and ocamlbuild.
  • Many bug fixes.

Quickstart

Install the latest release of goblint-cil with opam:

opam install goblint-cil

Read the excellent CIL tutorial by Zachary Anderson, much of which still applies to goblint-cil. The repository referenced in that document has now moved here.

ATTENTION: Don't install the cil package. This is the unmaintained original version of CIL.

Installation from Source

Prerequisites:

  • opam
  • GCC
  • Perl

First create a local opam switch and install all dependencies:

opam switch create .

Then, 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

To run a single test go to the build directory (e.g. _build/default/test) and run e.g.:

dune exec -- make test/array1

You can also install goblint-cil into the opam switch:

    dune build @install
dune install

Usage

You can use cilly (installed in the opam switch) as a drop-in replacement for gcc to compile and link your programs.

You can also use goblint-cil as a library to write your own programs. For instance in the OCaml toplevel using Findlib:

    $ ocaml
OCaml version 4.14.0

# #use "topfind";;
[...]
# #require "goblint-cil";;
[...]
# GoblintCil.cilVersion;;
- : string = "2.2.1"

License

goblint-cil is licensed under the BSD license. See LICENSE.

Dev Dependencies (3)

  1. odoc with-doc
  2. hevea with-doc
  3. ocamlfind with-test

Optional Dependencies

None

Used by (3)

  1. goblint >= "2.9.0"
  2. imguiml
  3. lintcstubs

Conflicts (1)

  1. cil

Build status

Results of building goblint-cil with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
2.1.1 n/a good good good good
2.0.6 good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure