Revision 9e983db875a7f9a13baff48582659063978d5f1a (click the page title to view the current version)

Guidelines for feature modeling using Clafer

Learning the Clafer language

The subset of Clafer most relevant to feature modeling is presented in these two resources:

  • Feature modeling using Clafer tutorial

The tutorial Attributed Feature Models in Clafer explains how to read and encode attributed feature models in Clafer. It also presents Clafer constructions that go beyond feature modeling but which are useful for encoding variability models.

  • Feature modeling with quality and multi-objective optimization using Clafer

An interactive assignment designed to introduce the concepts of variability management, multi-objective optimization, and computational decision-making in product line engineering. The assignment introduces basic feature modeling, modularizing feature models, modeling with quality attributes (e.g., cost, performance), and defining and solving multiple objective problems (e.g., minimize cost while maximizing performance and security). The assignment uses on-line tools: ClaferIDE and Clafer Multi-Objective Optimizer and Visualizer.

Working with Clafer models

Clafer is a textual language and in order to be used effectively, it requires a powerful text editor. Specifically, since a model in Clafer is a tree and the nesting is expressed through indentation, the editor should support

  • block indentation to be able to indent a few lines of clafers for nesting,
  • indentation level visualization to be able to see the nesting depth of clafers, and
  • name completion to be able to easily refer to the names of already defined clafers in other parts of the model.

On desktop

We provide extensions for

Using Clafer Tools from Command Line

Set up

There is no need for installation. Just download the archive from Clafer Tools Binary Distributions and unzip to the hard drive or a USB memory stick. Add the location to PATH.

Invoking the Clafer compiler and the instance generator

The instructions are in the READMEs of the respective tools:

We recommend using the Choco-based instance generator for most purposes since it is faster and it can perform multi-objective optimization.

On-line

ClaferIDE

For editing, compiling, and instantiating full Clafer models, we provide ClaferIDE. The tool provides an editor with syntax highlighting and good indentation support. The tool also integrates the compiler and the Alloy-based and Choco3-based instance generators.

ClaferConfigurator

For exploring multiple valid configurations of a feature model we provide ClaferConfigurator.

ClaferMooVisualizer

For visualizing and exploring optimal configurations of a feature model with quality attributes and optimization objectives we provide ClaferMooVisualizer.