Knowledge Bases

v1.0

groupID
at.tugraz.ist.ase.hiconfit
artifactID
kb

hiconfit-core allows to represent knowledge bases as Constraint Satisfaction Problems. kb provides classes managing a (Choco) CSP representation of a knowledge base. Besides, it also offers two core classes representing user requirements and solutions of a configurator.

Feature model is a type of knowledge representation. For more details related to what hiconfit-core supports for feature models, we refer to Feature models.

TBD


Table of Contents

  1. What kb provides
  2. How-tos
    1. Encoding your own knowledge base
    2. Creating a FMKB object for a feature model read from a file
    3. Creating and using an object of FMKB, PCKB, RenaultKB, and CameraKB
    4. Implementing a new assignment translator
    5. How to for Utility functions

What kb provides

kb provides the following features:

Negative constraints are used in the algorithms WipeOutR_T, WipeOutR_FM.

How-tos

Encoding your own knowledge base

You can implement your knowledge base by inheriting the KB class.

Examples

PCKB, FMKB

Creating a FMKB object for a feature model read from a file

The following code shows how to create a FMKB object for a feature model which is parsed from a file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
File fileFM = new File("src/test/resources/smartwatch.sxfm");

// create a parser for the given file
@Cleanup("dispose")
FeatureModelParser<Feature, AbstractRelationship<Feature>, CTConstraint>
    parser = FMParserFactory.getInstance().getParser(fileFM.getName());

// parse the feature model file
FeatureModel<Feature, AbstractRelationship<Feature>, CTConstraint>
    fm = parser.parse(fileFM);

// create an FMKB object with the given feature model and requires to generate also the negative constraints
FMKB<Feature, AbstractRelationship<Feature>, CTConstraint>
    kb = new FMKB<>(fm, true);

For more examples related to feature models, we refer to [Feature model].

Creating and using an object of FMKB, PCKB, RenaultKB, and CameraKB

Examples

KBStatistics, ‘FMKBTest’s, ‘PCKBTest’, ‘RenaultKBTest’, and ‘CameraKBTest’

Implementing a new assignment translator

Example

FMAssignmentsTranslator

How to for Utility functions

TBD