Closed zenna closed 9 years ago
I'm checking this one now. At least, A SMT2 file with double (check-sat)
does not reproduce this problem.
It's related to the termination condition of our fixed-point computation. In theory, we should only stop when new_box == old_box
holds by the definition of a fixed point. In practice, we use a heuristics in a terminating condition, to accelerate the fixed point computation and to overcome unstable numerical errors. The current heuristics is to stop a fixed-point computation when all dimensions are less than 1% reduced.
What happens in this example is the first check ends up with a box B_n
as a result of fixed-point computation. It stops there because the difference between B_n-1
and B_n
is small enough (all dimensions are reduced less than 1%
). However, next time we compute B_n+1
, the contractors prune out B_n
to an empty box (B_n+1
= empty).
We can avoid this by changing the threshold. When I changed the line 229 of nra_solver.cpp file to have a smaller threshold (i.e. 0.01 ==> 0.00001), it goes away. However, this slows down the performance in general.
I think we should have two knobs to control fixed-point computation. For incomplete-checks, it's safe to use a bigger threshold so that we can have a good balance between pruning and branching. However, for complete-checks (esp, the final check for SAT), we should use a small enough threshold to guarantee that a solution is indeed a fixed-point.
I'll implement them and let you know what I did and how it changes the performance.
@zenna, please try the new version that I just released.
@soonhokong This seems to fix the problem. Thanks.
However, next time we compute B_n+1, the contractors prune out B_n to an empty box (B_n+1 = empty).
Why?
Do you mean when I call check the second time, the contraction starts with the box B_n (that was contracted before). Then, if this box is less than the precision, it's deemed to be empty, causing UNSAT?
Do you mean when I call check the second time, the contraction starts with the box B_n (that was contracted before).
Yes.
Then, if this box is less than the precision, it's deemed to be empty, causing UNSAT?
Not always. I meant that it is possible to happen.
@soonhokong Calling opensmt_check switches between true and false without any constraints being added.