How To Install kimwitu++ on Ubuntu 18.04

In this tutorial we learn how to install kimwitu++ on Ubuntu 18.04. kimwitu++ is A (syntax-)tree-handling tool (term processor)

Introduction

In this tutorial we learn how to install kimwitu++ on Ubuntu 18.04.

What is kimwitu++

kimwitu++ is:

Kimwitu++ is a system that supports the construction of programs that use trees or terms as their main data structure. It allows you to define, store and operate on trees with typed nodes. Each type of node has a specific number of sons, and expects these sons to have specific types. The most popular example of such trees are syntax trees.

The nodes are defined in a Yacc-like fashion. The tree can be unparsed (ie. treewalk) and rewritten (ie. term substitution). Kimwitu++ gives you powerful pattern matching for specifying unparse and rewrite rules.

Kimwitu++ is an extension to C++. It introduces Yacc-like node definitions, the unparse and rewrite rules, and extensions for pattern matching within functions. It will translate its input files into pure C++.

To build the tree you might use a parser generated with Bison, but you are free to use other tools. There also exists Kimwitu (also packaged for Debian) which interfaces with C instead of C++ which can also be used in C++ projects, but Kimwitu++ has some extensions one might consider useful.

There are three methods to install kimwitu++ 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 kimwitu++ Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install kimwitu++

Install kimwitu++ Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install kimwitu++ using apt by running the following command:

sudo apt -y install kimwitu++

Install kimwitu++ 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 kimwitu++ using aptitude by running the following command:

sudo aptitude -y install kimwitu++

How To Uninstall kimwitu++ on Ubuntu 18.04

To uninstall only the kimwitu++ package we can use the following command:

sudo apt-get remove kimwitu++

Uninstall kimwitu++ And Its Dependencies

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

sudo apt-get -y autoremove kimwitu++

Remove kimwitu++ Configurations and Data

To remove kimwitu++ configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge kimwitu++

Remove kimwitu++ configuration, data, and all of its dependencies

We can use the following command to remove kimwitu++ configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge kimwitu++

References

Summary

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