Skip to content

2. Getting Started

Murad Akhundov edited this page Aug 11, 2019 · 1 revision

Prerequisites

The following instructions were tested on Ubuntu 18.04, but should also work with other distributions.

CIL Modules

Basic Prerequisites

ocaml v4.05 (not higher)
ocamlbuild
ocaml-findlib
opam
gcc-6 (not higher)

Install and compile CIL (warning - does not work with the version available in opam)

git clone https://github.com/cil-project/cil
cd cil
./configure --prefix=`opam config var prefix`
make
make install

CIL Module Tests and Verification tool

Basic Prerequisites

nodejs
npm

Installing on Ubuntu 16.04 or higher:

sudo apt update
sudo apt install nodejs npm

After installing, navigate to the project directory and run

npm install

Compiling and Running

Run the checker, target functions must located be in file.c

Finding Local and non-Local loops:

make countCFGnested
make run-countCFGnested

Extracting MLCs:

make extractMLC
make run-extractMLC

Verification Tool:

make extractMLC
make findFuncs
npm run verify -- --file <filename.c>

Testing

npm test