Wasp-Showcase: Software Configuration Management

WASP (IST project IST-FET-2001-37004)
Official Project-Website

The Smodels System

The Smodels system is an implementation of Answer-Set Programming implementation for cardinality and weight constraint logic programs.

Problem Description

Modern software products are large and may consist of thousands of components where each component provides some specific functionality. In the configuration management problem we are given a description of the components, a set of user requirements and we have to find a valid configuration of components that satisfies the requirements.

The difficulties arise from the fact that the components interoperate in various ways: a component may need the functionality provided by other components, a functionality may be provided by several different components, some components may conflict with each other so it is not possible have both of them in the same product, and so on.

Usage of Answer-Set Programming

The ASP systems are used to create the valid configurations. The ASP program is divided into three parts:

  1. a configuration model that is a set of non-ground rules that defines how the relationships between components work;

  2. a component description that is a set of ground facts that defines what components are available and what relationships they have with other components.

  3. a user requirements description that is a set of ground facts that tells what properties the user wants the product to have.

The configuration model is created only once, when the product is first designed. The component description is updated whenever a new component or a new version of an existing component is added to the system. These two are stored in the configurator tool.

The third part, user requirements description, is generated separately whenever we want to use the configurator.

Additionally, we can use ASP for debugging purposes. In this approach we have also a diagnostic model that explains why it is not possible to satisfy a given set of user requirements.

Benefits of Answer-Set Programming

Using Answer Set Programming allows us to have a concise declarative representation for the configuration model. The main concepts of configuration management have an intuitive translation into ASP rules and we can separate the rules that define the configuration model from the rules that define the components so we can make modular configurators.

The actual configuration model is quite small in most cases so they are easy to understand and maintain once one has became acquainted with the ASP paradigm. For example, the configuration model for the iPKG system has only 30 non-ground rules.

Example Scenarios

In Debian GNU/Linux System the components are different versions of software packages. The basic relationships between the packages are:

Below we have a simple example that illustrates the simple relations between packages:

We have two different software packages (mail_reader_1 and mail_reader_2) that both provide an email reader. Both of them require that mail_transport_agent is installed and in this example we assert that it is not possible to have both of them installed at one time. Additionally, there is an extension package that provides new functionality for mail_reader_1 and does not work without it.

The simplified Debian configuration problem can be solved with the following three ASP and one Perl programs:

Next we go through several possible ways to compute the configurations.

Another example case is the iPKG system is an offshoot of the Debian package management system that is aimed for hand-held devices. The following ASP programs define the configuration model for a snapshot of the package list:

Further Information

ASP based configuration management has been discussed in following papers: