How To Install frama-c on Ubuntu 18.04

In this tutorial we learn how to install frama-c on Ubuntu 18.04. frama-c is Platform dedicated to the analysis of source code written in C

Introduction

In this tutorial we learn how to install frama-c on Ubuntu 18.04.

What is frama-c

frama-c is:

Frama-C gathers several analysis techniques in a single collaborative framework, based on analyzers (called “plug-ins”) that can build upon the results computed by other analyzers in the framework.

Thanks to this approach, Frama-C provides sophisticated tools, including:

  • an analyzer based on abstract interpretation (Value plug-in);
  • a program proof framework based on weakest precondition calculus (WP plug-in);
  • a program slicer (Slicing plug-in);
  • a tool for verification of temporal (LTL) properties (Aoraï plug-in);
  • several tools for code base exploration and dependency analysis (plug-ins From, Impact, Metrics, Occurrence, Scope, etc.). . These plug-ins communicate between each other via the Frama-C API and via ACSL (ANSI/ISO C Specification Language) properties.

This package provides the graphical user interface of Frama-c and depends on frama-c-base.

There are three methods to install frama-c on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install frama-c Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install frama-c using apt-get by running the following command:

sudo apt-get -y install frama-c

Install frama-c Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install frama-c using apt by running the following command:

sudo apt -y install frama-c

Install frama-c Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install frama-c using aptitude by running the following command:

sudo aptitude -y install frama-c

How To Uninstall frama-c on Ubuntu 18.04

To uninstall only the frama-c package we can use the following command:

sudo apt-get remove frama-c

Uninstall frama-c And Its Dependencies

To uninstall frama-c and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove frama-c

Remove frama-c Configurations and Data

To remove frama-c configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge frama-c

Remove frama-c configuration, data, and all of its dependencies

We can use the following command to remove frama-c configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge frama-c

References

Summary

In this tutorial we learn how to install frama-c package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.