Git Product home page Git Product logo

hiconfit / hiconfit-core Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 4.91 MB

A set of Maven-based libraries for High-Performance Knowledge Based Configuration Techniques

Home Page: http://hiconfit.manleviet.info

License: MIT License

Java 7.63% ANTLR 0.03% Perl 92.34%
conflict-resolution diagnosis model-based-diagnosis model-based-testing conflict-detection java maven choco-solver feature-model knowledge-base

hiconfit-core's Introduction

hiconfit-core

A set of Maven-based libraries for High-Performance Knowledge Based Configuration Techniques.

Documentation: https://hiconfit.manleviet.info

If our implementations are utilized in your research, kindly cite the corresponding papers listed in the References.

Table of Contents

Key libraries

ca-cdr

ca-cdr is a library of Consistency-based Algorithms for Conflict Detection and Resolution.

Conflict Detection and Resolution (CDR) is a substantial task in Knowledge Base Engineering (KBE). ca-cdr publishes our implementations of CDR consistency-based algorithms, which can be applied throughout all phases of KBE, i.e., design, testing and debugging, and configuration.

List of algorithms:
  1. QuickXPlain [1]
  2. FastDiag [2]
  3. MSS-based FastDiag [15]
  4. FlexDiag [3]
  5. HS-tree [8]
  6. HSDAG [9]
  7. DirectDebug [4, 5, 6, 7]
  8. DirectDiag
  9. WipeOutR_T [12, 13]
  10. WipeOutR_FM [12, 13]
  11. (coming soon) AggregatedTest [14]
  12. (coming soon) LevelWiseParallelHSDAG [10, 11]
  13. (coming soon) FullParallelHSDAG [10, 11]
  14. (coming soon) FastDiagP [15] - Python implementation
  15. (coming soon) KBDiag [the related paper submitted on April 2023]
  16. (coming soon) InformedQX
  17. (coming soon) ParallelWipeOutR_T
  18. (coming soon) ParallelWipeOutR_FM

fma

fma is a library for Feature Model Testing and Debugging.

Two key features:

  1. fma provides a mechanism to automatically generate property-based test cases for feature models. Test cases are generated based on six basic analysis operations, including void feature models, dead features, conditionally dead features, full mandatory features, false optional features, and redundant constraints, which are considered anomalies in feature models.
  2. On the basis of the generated test cases, fma allows checking whether a feature model contains one or more of these six anomalies and executes asynchronous test case validation as well as corresponding diagnosis. It uses three algorithms, namely DirectDebug, WipeOutR_FM, and HSDAG, to determine all explanations for the anomalies in the feature model.

configurator

configurator offers a compact knowledge-based configurator that supports the state-of-the-art Matrix Factorization-based Configuration and Recommendation.

All libraries of hiconfit-core

hiconfit-core is organized in 11 following Maven libraries:

library description
common provides utility functions
csp2choco provides a translator converting CSP constraints into Choco Solver commands
eval provides a performance evaluator, including counters and timers, to measure the performance of algorithms
fm provides the management functionalities for basic feature models
kb provides classes managing CSP (Choco) representations of a knowledge base/feature model
ca-cdr-core provides core classes for representing user requirements and solutions of a configurator as well as for managing test cases and test suites
cdrmodel provides a programmatic approach to manage/prepare the constraints/test cases for consistency-based algorithms
ca-cdr provides implementations of Consistency-based Algorithms for Conflict Detection and Resolution (CA-CDR) and a ChocoConsistencyChecker
heuristics provides an implementation of Matrix Factorization Based Variable and Value Ordering Heuristics for Constraint Solving and a wrapper for Matrix Factorization algorithm on the basis of the Mahout library
configurator provides a compact knowledge-based configurator supporting Matrix Factorization based Configuration and Recommendation
fma provides a mechanism to automatically generate property-based test cases for feature models and allows the automated determination of faulty constraints in the feature model

How to get the libraries

We publish libraries of hiconfit-core in Maven packages hosted by GitHub Packages. You'll find here how to import these Maven libraries into your Java project.

Authenticating to GitHub Packages

In your Maven project, please add the below script in the settings.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <servers>
        <server>
            <id>github-maven-repository</id>
            <username>USERNAME</username>
            <password>TOKEN</password>
        </server>
    </servers>
</settings>

Replacing USERNAME with your GitHub username, and TOKEN with your personal access token (see Creating a personal access token).

Connecting to our repositories

Add also the below script into the pom.xml file:

<profiles>
    <profile>
        <id>github-maven-repository</id>
        <repositories>
            <repository>
                <id>github-maven-repository</id>
                <url>https://maven.pkg.github.com/HiConfiT/*</url>
            </repository>
        </repositories>
    </profile>
</profiles>

Installing the libraries

Add the library dependencies to the dependencies element of your project pom.xml file.

<dependency>
    <groupId>at.tugraz.ist.ase</groupId>
    <artifactId>ARTIFACT_ID</artifactId>
    <version>VERSION</version>
</dependency>

Replacing ARTIFACT_ID and VERSION with the corresponding information from the following table.

ARTIFACT_ID VERSION
common 1.0
csp2choco 1.0
eval 1.0
fm 1.0
kb 1.0
ca-cdr-core 1.0
cdrmodel 1.0
ca-cdr 1.0
heuristics 1.0
configurator 1.0
fma 1.0

References

  1. U. Junker. 2004. QuickXPlain: preferred explanations and relaxations for over-constrained problems. In Proceedings of the 19th national conference on Artificial intelligence (AAAI'04). AAAI Press, 167–172. [ACM]
  2. A. Felfernig, M. Schubert, and C. Zehentner. 2012. An efficient diagnosis algorithm for inconsistent constraint sets. Artif. Intell. Eng. Des. Anal. Manuf. 26, 1 (February 2012), 53–62. [Cambridge Core]
  3. A. Felfernig, R. Walter, J.A. Galindo, et al. 2018. Anytime diagnosis for reconfiguration. J Intell Inf Syst 51, 161–182 (2018). [Springer]
  4. V.M. Le, A. Felfernig, M. Uta, D. Benavides, J. Galindo, and T.N.T. Tran. 2021. DirectDebug: Automated Testing and Debugging of Feature Models, 2021 IEEE/ACM 43rd International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER), 2021, pp. 81-85. [IEEE]
  5. V.M. Le, A. Felfernig, T.N.T. Tran, M. Atas, M. Uta, D. Benavides, J. Galindo. 2021. DirectDebug: A software package for the automated testing and debugging of feature models, Software Impacts, Volume 9, 2021, 100085, ISSN 2665-9638. [Elsevier]
  6. DirectDebug's Original version with an evaluation in GitHub.
  7. An executable evaluation of DirectDebug in CodeOcean.
  8. R. Reiter. 1987. A theory of diagnosis from first principles, Artificial Intelligence, Volume 32, Issue 1, 1987, pp. 57-95, ISSN 0004-3702. [ScienceDirect]
  9. R. Greiner, B. A. Smith, and R. W. Wilkerson. 1989. A correction to the algorithm in reiter’s theory of diagnosis, Artif Intell, vol. 41, no. 1, pp. 79–88. [ScienceDirect]
  10. D. Jannach, T. Schmitz, and K. Shchekotykhin. 2016. Parallel model-based diagnosis on multi-core computers. Journal of Artificial Intelligence Research 55 (2016): 835-887. [JAIR]
  11. D. Jannach, T. Schmitz, and K. Shchekotykhin. 2015. Parallelized Hitting Set Computation for Model-Based Diagnosis. Proceedings of the AAAI Conference on Artificial Intelligence, 29(1). [AAAI]
  12. V.M. Le, A. Felfernig, M. Uta, T.N.T. Tran, and C. Vidal. 2022. WipeOutR: Automated Redundancy Detection for Feature Models, 26th ACM International Systems and Software Product Line Conference (SPLC 2022). [ACM]
  13. An evaluation of WipeOutR algorithms in GitHub.
  14. V.M. Le, A. Felfernig, and T.N.T. Tran. 2022. Test Case Aggregation for Efficient Feature Model Testing, 26th ACM International Systems and Software Product Line Conference (SPLC 2022) - Volume B. [ACM]
  15. V.M. Le, C.V. Silva, A. Felfernig, T.N.T. Tran, J. Galindo, D. Benavides. 2023. FastDiagP: An Algorithm for Parallelized Direct Diagnosis. In 37th AAAI Conference on Artificial Intelligence. AAAI’23, Washington, DC, USA. [arXiv]
  16. An evaluation of FastDiagP algorithm in GitHub.

hiconfit-core's People

Contributors

dependabot[bot] avatar manleviet avatar taburg avatar

Watchers

 avatar  avatar

hiconfit-core's Issues

Clean up code

  • Remove deprecated functions
  • Use annotations from Lombok
  • Clean up the code
  • Add documentation
  • Add logs

Classes:

  • Constraint
  • IOUtils - move getThreadString to ThreadUtils
  • ChocoSolverUtils
  • KB
  • Domain
  • CmdLineOptionsBase
  • Domain
  • Variable
  • IntVariable
  • BoolVariable
  • TestCase

Support arbitrary cross-tree constraints in FeatureIDEParser

@taburg recreate new package at.tugraz.ist.ase.fm.cove-v2 and (maybe) at.tugraz.ist.ase.fm.parser-v2, in which contain a new structure (tree) for feature model.

Maybe take a look at IFeatureModel of FeatureIDE https://github.com/FeatureIDE/FeatureIDE/blob/develop/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/xml/XmlFeatureModelFormat.java
Need to change the core of fm-package to support complex constraints

An example:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<featureModel>
	<properties>
		<graphics key="autolayoutconstraints" value="false"/>
		<graphics key="legendautolayout" value="true"/>
		<graphics key="showshortnames" value="false"/>
		<graphics key="layout" value="horizontal"/>
		<graphics key="showcollapsedconstraints" value="true"/>
		<graphics key="legendhidden" value="false"/>
		<graphics key="layoutalgorithm" value="1"/>
	</properties>
	<struct>
		<and abstract="true" mandatory="true" name="test1">
			<and mandatory="true" name="A">
				<feature mandatory="true" name="AA"/>
				<feature name="AB"/>
				<feature name="AC"/>
				<or mandatory="true" name="AD">
					<feature name="ADA"/>
					<feature name="ADB"/>
				</or>
			</and>
			<and name="B">
				<feature mandatory="true" name="BA"/>
				<feature name="BB"/>
				<feature name="BC"/>
			</and>
			<or name="C">
				<feature name="CA"/>
				<feature name="CB"/>
				<feature name="CC"/>
			</or>
			<alt mandatory="true" name="D">
				<or name="DA">
					<feature name="DAA"/>
					<feature name="DAB"/>
				</or>
				<feature name="DB"/>
			</alt>
		</and>
	</struct>
	<constraints>
		<rule>
			<imp>
				<var>AB</var>
				<not>
					<var>CB</var>
				</not>
			</imp>
		</rule>
		<rule>
			<imp>
				<var>AC</var>
				<not>
					<var>CC</var>
				</not>
			</imp>
		</rule>
		<rule>
			<not>
				<conj>
					<var>ADA</var>
					<var>AB</var>
				</conj>
			</not>
		</rule>
		<rule>
			<disj>
				<var>ADB</var>
				<not>
					<var>BC</var>
				</not>
			</disj>
		</rule>
		<rule>
			<disj>
				<var>BC</var>
				<imp>
					<var>CA</var>
					<var>CB</var>
				</imp>
			</disj>
		</rule>
		<rule>
			<imp>
				<var>DAA</var>
				<not>
					<conj>
						<var>AB</var>
						<var>AC</var>
					</conj>
				</not>
			</imp>
		</rule>
		<rule>
			<imp>
				<var>AB</var>
				<disj>
					<var>AC</var>
					<not>
						<var>DAB</var>
					</not>
				</disj>
			</imp>
		</rule>
		<rule>
			<imp>
				<var>DB</var>
				<not>
					<not>
						<var>AB</var>
					</not>
				</not>
			</imp>
		</rule>
		<rule>
			<imp>
				<var>DB</var>
				<not>
					<not>
						<not>
							<not>
								<var>AC</var>
							</not>
						</not>
					</not>
				</not>
			</imp>
		</rule>
		<rule>
			<imp>
				<var>DAA</var>
				<disj>
					<var>AB</var>
					<not>
						<var>AC</var>
					</not>
				</disj>
			</imp>
		</rule>
	</constraints>
</featureModel>

Feature Model Analysis

Implementation of some automated analysis of feature models.
Ex:

  • Towards Anomaly Explanation in Feature Models

Uses generics for feature model

The FeatureModel class will become FeatureModel<F, R>, where F stands for Feature and R stands for Relationship.

The Feature class maybe become IFeature.

Feature Model Filter app

An app filter out feature models that don't satisfy requirements

// filter out wrong feature models, for example,
// inconsistent
// don't have any constraints
// don't have any mandatory relationships
// don't have any optional relationships
// don't have any alternative relationships
// don't have any or relationships
// the ratio between cross-tree constraints and all constraints is less than 0.1
if (filter
        && (!featureModel.isConsistency()
        || featureModel.getNumOfConstraints() == 0
        || featureModel.getNumOfRelationships(RelationshipType.MANDATORY) == 0
        || featureModel.getNumOfRelationships(RelationshipType.OPTIONAL) == 0
        || featureModel.getNumOfRelationships(RelationshipType.ALTERNATIVE) == 0
        || featureModel.getNumOfRelationships(RelationshipType.OR) == 0
        || ctc < 0.1))
    continue;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.