Skip to content

SoftVarE-Group/uvlgenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UVL Generator

Dependencies

This UVL generator depends on uvl-smt for reasoning and java-fm-metamodel for managing the model objects.

UVL-SMT depends on z3 binaries which need to be correctly linked when running the generator. Check their README for instructions.

Usage

Currently, the generator has two main modes. Generating random models with default bounds or generating models with more specialized properties specified as json file. You can find examples for json files in input_examples. The main method can be found in the Runner.java class. For random models, use the options --boundedRandom --n <numberOfModels>. For using a file, use --file <path/to/file>.

The .json contains various configuration options that enable the user to control structural properties of the generated feature models. The example below generates 10 feature models with 500-600 features and 50--100 constraints. Furthermore, the groups in the tree hierarchy are 10% optional, 20% mandatory and so on. An attribute price is attached to features with a 50% chance and with values between 10 and 1000.

{
  "general" : {
    "numberModels" : 10,
    "seed" : 42,
    "ensureSAT" : true,
    "generatorVersion" : "0.1"
  },
  "tree" : {
    "features" : {
      "number" : [500,600],
      "distribution" : {
        "boolean" : 0.7,
        "integer" : 0.2,
        "real" : 0.1,
        "string" : 0
      },
      "cardinality" : {
        "min" : [1,2],
        "max" : 5,
        "attachProbability" : 0.2
      }
    },
    "maxTreeDepth" : 5,
    "groups" : {
      "distribution": {
        "optional" : 0.1,
        "mandatory" : 0.2,
        "alternative" : 0.5,
        "or" : 0.2,
        "groupCardinality" : 0
      }
    }
  },
  "constraints" : {
    "number" : [50,100],
    "ecr" : 0.8,
    "variablesPerConstraint" : [2,15],
    "distribution" : {
      "boolean" : 0.9,
      "numeric" : 0.07,
      "aggregate" : 0.03,
      "string" : 0
    },
    "equationDistribution" : {
      "equals" : 0,
      "greater" : [0.3,0.7],
      "lesser" : [0.3, 0.7]
    },
    "arithmeticDistribution" : {
      "add" : [0.3,0.7],
      "subtract" : [0.3, 0.7],
      "multiply" : [0.3, 0.7],
      "divide" : 0
    }
  },
  "attributes" : [
    {
      "name" : "Price",
      "value" : [10,1000],
      "attachProbability" : 0.5,
      "useInConstraints" : true
    }
  ]
}

Remarks

We have observed the following effects that might impact the generation of UVL models:

  • Including the division operator substantially increases runtime when generating larger UVL models.
  • Including the numerical equals operator is typically very restrictive and just sets involved features to dead.
  • The average aggregate resolves to very complex constraints for feature models with many attribute incarnations. Hence, using avg() will substantially increase runtimes.
  • Using a high number of variablesPerConstraint results in many unsatisfiable constraints which also substantially increases runtimes. This is further amplified when the number of features smaller and the factor features / constraint size is small.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages