Releases: manleviet/ChocoKB
KBStatistics v1.1
A Knowledge Base Statistics Tool
Features
The tool prints out statistics of given knowledge bases, which are as the following:
- General statistics
- The knowledge base name
- The knowledge base source
- Number of variables
- Number of constraints
- Number of Choco variables
- Number of Choco constraints
- The consistency of the knowledge base
- Statistics for feature model
- The CTC ratio
- The number of features
- The number of relationships
- The number of cross-tree constraints
- The number of MANDATORY relationships
- The number of OPTIONAL relationships
- The number of ALTERNATIVE relationships
- The number of OR relationships
- The number of REQUIRES constraints
- The number of EXCLUDES constraints
Supports the following knowledge bases
- Feature Models from SPLOT, FeatureIDE, Glencoe, and other tools. You can find some feature model examples in here.
- PC and Renault from https://www.itu.dk/research/cla/externals/clib/
Dependencies
Usage
Requirements: OpenJDK 17.0.2
Syntax:
java -jar kbstatistics.jar [-h] [-kb <PC>|<Renault>] [-fm <feature_model_name>] [-fm-dir <path_to_folder>] [-out <path_to_file>]
If the parameter -out isn't specified, the statistics results will be saved in the file naming statistics.txt.
Examples:
- Print out the help
java -jar kbstatistics.jar -h - Saving the statistics of the PC knowledge base on the default file (
statistics.txt)
java -jar kbstatistics.jar -kb PC - Saving the statistics of the PC knowledge base on
pc_results.txt
java -jar kbstatistics.jar -kb PC -out ./pc_results.txt - Saving the statistics of the PC and Renault knowledge bases on the default file (
statistics.txt)
java -jar kbstatistics.jar -kb PC Renault - Saving the statistics of the smartwatch feature model on the default file (
statistics.txt)
java -jar kbstatistics.jar -fm smartwatch.sxfm - Saving the statistics of feature models in the folder
fmson the default file (statistics.txt)
java -jar kbstatistics.jar -fm-dir ./fms - Saving the statistics of PC, Renault, and feature models in the folder
fmson the default file (statistics.txt)
java -jar kbstatistics.jar -fm-dir ./fms -kb PC Renault
KBStatistics v1.0
A Knowledge Base Statistics Tool
Features
The tool prints out statistics of given knowledge bases, which are as the following:
- General statistics
- The knowledge base name
- The knowledge base source
- Number of variables
- Number of constraints
- Number of Choco variables
- Number of Choco constraints
- The consistency of the knowledge base
- Statistics for feature model
- The CTC ratio
- The number of features
- The number of relationships
- The number of cross-tree constraints
- The number of MANDATORY relationships
- The number of OPTIONAL relationships
- The number of ALTERNATIVE relationships
- The number of OR relationships
- The number of REQUIRES constraints
- The number of EXCLUDES constraints
Supports the following knowledge bases
- Feature Models from SPLOT, FeatureIDE, Glencoe, and other tools. You can find some feature model examples in here.
- PC and Renault from https://www.itu.dk/research/cla/externals/clib/
Dependencies
Usage
Requirements: OpenJDK 17.0.2
Syntax:
java -jar kbstatistics.jar [-h] [-kb <PC>|<Renault>] [-fm <feature_model_name>] [-fm-dir <path_to_folder>] [-out <path_to_file>]
If the parameter -out isn't specified, the statistics results will be saved in the file naming statistics.txt.
Examples:
- Print out the help
java -jar kbstatistics.jar -h - Saving the statistics of the PC knowledge base on the default file (
statistics.txt)
java -jar kbstatistics.jar -kb PC - Saving the statistics of the PC knowledge base on
pc_results.txt
java -jar kbstatistics.jar -kb PC -out ./pc_results.txt - Saving the statistics of the PC and Renault knowledge bases on the default file (
statistics.txt)
java -jar kbstatistics.jar -kb PC Renault - Saving the statistics of the smartwatch feature model on the default file (
statistics.txt)
java -jar kbstatistics.jar -fm smartwatch.sxfm - Saving the statistics of feature models in the folder
fmson the default file (statistics.txt)
java -jar kbstatistics.jar -fm-dir ./fms - Saving the statistics of PC, Renault, and feature models in the folder
fmson the default file (statistics.txt)
java -jar kbstatistics.jar -fm-dir ./fms -kb PC Renault
fm_gen-v1.0
Synthesized Feature Model Generator
This tool generates synthesized feature models using the Betty framework. For further details on Betty framework, we refer to https://www.isa.us.es/betty/welcome.
Parameters
- The number of constraints (
-c) - The number of generated feature models (
-fm) - The cross tree constraints ratio (
-ctc) - The maximum of generations, used in the evolutionary generator (
-g) - The folder where generated feature models will be saved (
-out)
How it works
The number of features in each generated feature model is specified by the following formula:
numFeatures = numConstraints * 3 / 4;
In case of numFeatures < 10, the tool uses the Random generation. Otherwise, it uses an Evolutionary generator.
Generated feature models are saved using the SPLOT format.
Dependencies
Usage
Requirements: OpenJDK 17.0.2
Syntax:
java -jar fm_gen.jar [-h] -c <#constraints> -fm <#generated_feature_models> [-ctc <ratio_cross_tree_constraints>] [-g <#max_generations>] [-out <path_to_folder>]
If the parameters -out, -ctc and -g aren't specified, the default values are "./", "0.8" and "5" respectively.