Open qmo1222 opened 3 years ago
Thanks a lot for greatly simplifying the buggy test case. I will take a look.
Disabling the technique pure literal assertion (by specifying ssat -r
) seems to fix this bug, without the patch suggested by @qmo1222.
I don't completely understand the patch: why shouldn't we add unit clauses into the solver?
Edit: Using the assumptions 1 0
or 1 0
and 3 0
give wrong answers again. It is caused by a wrong multiplier, as described in #12
@qmo1222 : Could you please confirm that the bug has been fixed? The solver should be able to obtain the correct answer without disabling the pure-literal assertion. Please read the above commit message for more details.
The bug is fixed for this small case. The big case change its result from 0 to some probability value, but the answer is still incorrect. I'm trying to find another small case to generate the condition.
Bug Observation
Correct answer for the following test case.
But if I add a unit clause.
The answer will be 0 (wrong answer).
However, the following test case will be correct.
Code Modification
I try to fix it by remove line 166 in src/ssat/core/SsatSolver.cc. And add else condition to line 168~172 as
This modification makes the above instance correct. But the solver cannot solve sand-castle benchmarks.