Clafer

Clafer is a lightweight structural modeling language.

This is the old project website. More more up-to-date information, visit the new official website: clafer.org:

Team Members

News

Tools

Publications

2017
2016
2014
Bąk, K., Z. Diskin, M. Antkiewicz, K. Czarnecki, and A. Wąsowski, "Clafer: Unifying Class and Feature Modeling", Software and Systems Modeling, 2014. [pdf]
2013
Antkiewicz, M., K. Bąk, D. Zayan, K. Czarnecki, A. Wąsowski, and Z. Diskin, "Example-Driven Modeling Using Clafer", First International Workshop on Model-driven Engineering By Example, 2013. [ppsx][pdf]
Bąk, K., D. Zayan, K. Czarnecki, M. Antkiewicz, Z. Diskin, A. Wąsowski, and D. Rayside, "Example-Driven Modeling. Model = Abstractions + Examples", New Ideas and Emerging Results (NIER) track of the 35th International Conference on Software Engineering (ICSE 2013), San Francisco, CA, USA, 2013. [pdf]
Bąk, K., Z. Diskin, M. Antkiewicz, K. Czarnecki, and A. Wąsowski, "Partial Instances via Subclassing", 6th International Conference on Software Language Engineering, Indianapolis, USA, 2013. [pdf][pdf]
Murashkin, A., Web-based GUI for Pareto front visualization and analysis, , no. GSDLAB-TR 2013-02-04, Waterloo, University of Waterloo, 2013.
2012
Liang, J., "Solving Clafer Models with Choco", Generative Software Development Laboratory, no. GSDLab-TR 2012-12-30: University of Waterloo, 12/2012. [pdf]
Olaechea, R., S. Stewart, K. Czarnecki, and D. Rayside, "Modeling and Multi-Objective Optimization of Quality Attributes in Variability-Rich Software", International Workshop on Non- functional System Properties in Domain Specific Modeling Languages (NFPinDSML’12), Innsbruck, Austria, 10/2012. [pdf][pptx]
Liang, J., "Correcting Clafer Models with Automated Analysis", Generative Software Development Laboratory, Waterloo, University of Waterloo, 04/2012. [pdf]
Bąk, K., D. Zayan, K. Czarnecki, M. Antkiewicz, Z. Diskin, A. Wąsowski, and D. Rayside, Example-Driven Modeling poster, , Toronto, CASCON, 2012. [pdf]
2010
Bąk, K., K. Czarnecki, and A. Wąsowski, "Feature and Meta-Models in Clafer: Mixed, Specialized, and Coupled", 3rd International Conference on Software Language Engineering, Eindhoven, The Netherlands, 10/2010. [pdf][pdf]
Bąk, K., K. Czarnecki, and A. Wąsowski, "Feature and Class Models in Clafer: Mixed, Specialized, and Coupled", David R. Cheriton School of Computer Science, Waterloo, University of Waterloo, 06/2010.

Clafer Documentation

Complete documentation will be developed incrementally. For now, you can look at the following documents:

Clafer Model Repository

Important information: Models on this page do not work with the current Clafer Tools because of the changes to Clafer syntax:

These models should be regenerated after the translators to Clafer are fixed to support the current syntax. We invite contributors to help update the tooling.

The current version of the Linux kernel model in Clafer can be found on Kacper's Thesis Page


Please consult Clafer documentation if you want to learn more about the language.

eCos eCos is a configurable real-time operating system. The zip file provides 116 Clafer models intended for various architectures.
Linux Kernel v2.6.32 The archive contains Boolean feature model of the Linux Kernel v2.6.32 for the i386 architecture

See the Feature Models in the Wild project for more information on these models.

Clafer Tools - Binary Distributions

Binaries for the Clafer compiler (clafer), Alloy-based instance generator (ClaferIG), and Choco-based instance generator and multi-objective optimizer (chocosolver). The web tools (IDE, wiki, configurator, MOO visualizer) need to be installed from sources. Additionally, Clafer, ClaferIG, and ClaferWiki can now be installed directly from Hackage using Cabal or Stack. See the respective READMEs for instructions.

For best experience on desktop, we recommend using Sublime Text 3 and installing the ClaferToolsST.

Clafer Tools 0.4.5

This release includes the compiler and ClaferIG 0.4.5, and chocosolver 0.4.4.
See the release announcement.

Clafer Tools 0.4.4

This release includes the compiler, ClaferIG, and chocosolver. See the release announcement.

Clafer Tools 0.4.3

This release includes the compiler, ClaferIG, and chocosolver. See the release announcement.

Clafer Tools 0.4.2.1

This release includes the compiler, ClaferIG, and chocosolver. ClaferChocoIG is merged into chocosolver and discontinued. See the release announcement.

Clafer Tools 0.4.1

This release includes the compiler and ClaferIG. ClaferChocoIG is the same as in 0.4.0. See the release announcement.

Clafer Tools 0.4.0

This major release includes the compiler, ClaferIG, and ClaferChocoIG. See the release announcement.

Clafer Tools 0.3.10

(updated on May 13)

This release includes the compiler, ClaferIG, and ClaferChocoIG. See the release announcement. The binaries include a HotFix release 0.3.10.1 of the Choco-based backend.

Clafer Tools 0.3.9

(updated on Mar 30)

This release includes the compiler, ClaferIG, and ClaferChocoIG. See the release announcement.

Clafer Tools 0.3.8

This release includes the compiler, ClaferIG, and ClaferChocoIG.
We will no longer provide the portable build since Clafer Tools is now an official Sublime Text package.
We also provide a VIM integration.
See the
release announcement.

Clafer Tools 0.3.6.1

We are moving to a staged release model. First, Haskell-based tools, including the compiler, IG, and the wiki, followed by backends Choco3-based and Z3-based, finally followed by the web tools. The 0.3.6.1 release includes the compiler, all backends, and the wiki.

Important Notice: The zip file includes a distribution of Z3 SMT solver. In order to use it for commercial applications, a separate license must by purchased. It is; however, free for research and academic purposes. See Z3 license.

Clafer Tools 0.3.5.1

Additionally, we created w wiki page Guidelines for feature modeling using Clafer.

Clafer Tools 0.3.4

Installation and Running - see the included README files. If the READMEs don't help or you need a build for Mac or 32 bit linux, email Michał Antkiewicz.

Clafer Tools 0.3.3

Clafer Tools 0.3.2


Older binaries are available from ClaferIG Downloads Page.

Concept Modeling with OWL and Clafer

A presentation introducing Clafer, comparing concept modeling in OWL and Clafer, and presenting the details of a translation of the tutorial Pizza example from OWL to Clafer is available for viewing here.

To view, hoover mouse over the lower-right corner of the presentation More and select Fullscreen. Use right arrow to advance, left arrow to go back. Click on an element to zoom in. Click on empty space to zoom out. Use mouse wheel to zoom in and out. Use drag & drop to pan.

The translation of the Pizza example into Clafer is attached below (pizza.cfr). The translation is almost complete: it is missing IceCream and other inconsistent parts, and a few minor details.

The file pizza-only-Veneziana.als is a translation of the Clafer model to alloy which can be run using Alloy 4 analyzer (it gives semantics to the Clafer model in terms of alloy). The translation omits all unused abstract pizza types except for Veneziana which is instantiated.

To analyze and instantiate the model, open the file in Alloy 4 analyzer, press the buttons execute and, after analysis is completed, show. This will visualize an instance of the model found by Alloy that conforms to all constraints. The Alloy model represents a lower bound of the space of instances, that is, Alloy may create more instances than necessary to satisfy the constraints.

Instead of the standard graph visualization, the instance can also be viewed as a tree by clicking on the button Tree in the instance viewer. Subsequent instances can be generated by pressing Next.

AttachmentSize
pizza-only-Veneziana.als21.68 KB
pizza.cfr7.95 KB

Concrete-to-abstract modeling with Clafer example (draft v.3)

The purpose of the attached document is to demonstrate how a complex family of concepts can be modeled using Clafer. The document presents an exact record of the actual analysis performed by the author and shows a typical evolution of the concept definitions when using the “concrete-to-abstract” modeling approach.

Basic knowledge of Clafer is assumed. Refer to Concept Modeling Using Clafer - Tutorial for a thorough introduction.

AttachmentSize
2011.08.24 Scotiabank mortgages in Clafer v.3.pdf973.56 KB

PhD Thesis Supporting Material

Clafer Evaluation

We have evaluated Clafer on hundreds realistic examples of feature models, meta-models, feature-based templates, and domain models. For each model, we performed instance finding analysis, since many other analyses can be reduced to this problem. For slices of meta-models and feature-based templates element liveness was verified, because it is another example of a non-trivial analysis. We consider our results promising, since we obtained acceptable timings (within seconds) without fully exploiting the potential of Alloy.

The attached archive contains Clafer (*.cfr files) and corresponding Alloy (*.als files) models.

AttachmentSize
models.zip1.42 MB

SLE 2010 Supporting Material

Clafer Evaluation

We have evaluated Clafer on over 60 realistic examples of feature models, meta-models, and feature-based templates. For each model, we performed instance finding analysis, since many other analyses can be reduced to this problem. For slices of meta-models and feature-based templates element liveness was verified, because it is another example of a non-trivial analysis. We consider our results promising, since we obtained acceptable timings (within seconds) without fully exploiting the potential of Alloy.

The attached files contain Clafer (*.cfr files) and corresponding Alloy (*.als files) models.

Language documentation is available here.

AttachmentSize
fm-splot.tar.gz304.26 KB
meta-models.tar.gz15.73 KB
fbmts.tar.gz17.63 KB

The Telematics Example

This page contains the telematics example introduced in our technical report Feature and Class Models in Clafer: Mixed, Specialized, and Coupled.

The example is also available on the Clafer Model Wiki.

AttachmentSize
telematics.tar.gz151.05 KB