-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching for BDDs Enabled Although Documented as Erroneous #45
Comments
Sorry, this has been too long. I vaguely remember that there were some issues, but I suspect that it has been fixed and the comment is outdated. I think this was a weird nondeterministic problem but unloading clauses from the solver in early attempts to use it. |
Ok, thank you very much for the fast reply! I will leave this set to Interestingly, the TypeChef/FeatureExprLib/src/main/scala/de/fosd/typechef/featureexpr/sat/SatSolver.scala Lines 18 to 23 in fb4d7ad
So maybe this should be activated then, too. |
So this is way too long ago to trust anything that I say (and I don't even remember how much of it I wrote myself), but: The implementation of how constraints are removed differ slightly: TypeChef/FeatureExprLib/src/main/scala/de/fosd/typechef/featureexpr/bdd/SatBDDSolver.scala Lines 221 to 230 in fb4d7ad
vs TypeChef/FeatureExprLib/src/main/scala/de/fosd/typechef/featureexpr/sat/SatSolver.scala Lines 203 to 204 in fb4d7ad
which may very well be responsible for this differences. It could be that one is fixed for an issue in the other. The key idea of caching is to add all clauses from the feature model only once and then add and remove the clauses from the individual expressions on every satisfiability check. At some point there were issues that removing clauses didn't work as intended. I don't remember whether and how it got fixed, but I assume it works as in the repo. It may work with caching in the Sat implementation or not or only after adding and removing clauses the same way. Sorry to not be of more help and good luck! |
Interesting and sounds reasonable. This is already a big help, thank you! We will leave things as is then for now. |
Hi @ckaestne and TypeChef devs,
on the master branch, in the SATBDDSolver the
CACHING
is activated although there is a comment indicating that this may yield incorrect results:TypeChef/FeatureExprLib/src/main/scala/de/fosd/typechef/featureexpr/bdd/SatBDDSolver.scala
Lines 78 to 83 in fb4d7ad
So I wonder if caching shouldn't be deactivated here as stated by the comment?
Could I obtain wrong results when running TypeChef and having
CACHING
set totrue
here?Thanks for any help!
The text was updated successfully, but these errors were encountered: