How To Install frama-c-base on Ubuntu 18.04

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

Introduction

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

What is frama-c-base

frama-c-base 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 library of Frama-c which is useful to build plugins for Frama-c and the command-line tools.

There are three methods to install frama-c-base 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-base 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-base using apt-get by running the following command:

sudo apt-get -y install frama-c-base

Install frama-c-base Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install frama-c-base

Install frama-c-base 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-base using aptitude by running the following command:

sudo aptitude -y install frama-c-base

How To Uninstall frama-c-base on Ubuntu 18.04

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

sudo apt-get remove frama-c-base

Uninstall frama-c-base And Its Dependencies

To uninstall frama-c-base 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-base

Remove frama-c-base Configurations and Data

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

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

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

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

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

References

Summary

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