Closed IBaydenI closed 4 years ago
Hello @IBaydenI,
Yes, the VariabilityModel requires a DIMACS file, which contains the translation of all constraints into CNF in order to provide logical tests. However, MetricHaven doesn’t need this file. Please create a small text/ASCII file with two lines, add the following content to be consistent with the API of KernelHaven (the second line is an empty line), and pass this to the VariabilityModel:
p cnf 0 0
Best regards, Sascha
The solution used elsewhere is to set an empty temporary file, see for example https://github.com/KernelHaven/KernelHaven/blob/master/src/net/ssehub/kernel_haven/variability_model/EmptyVariabilityModelExtractor.java#L44-L46
It is best not to set an "empty" DIMACS file, as this would imply that the extractor has the ability to create DIMACS constraints. A completely empty file simply causes any SAT solvers to fail, which is the desired behavior. (A DIMACS file with no variables would not cause errors for the SAT solvers.)
Implemented solution proposed by @adam-sse in 9fc90e610d11afa5afc99ad57e4905e59cbe8ea3
See c431be9478c889dd1342704309fa89952fb261c8 Line 57 and 92.
VariabilityModel result
needs a Hashmap that contains the variability variables. That Map requires two parameters:Since we don't have a constraint Model, how is this supposed to be handled?