bool done = false;
- for (unsigned int j=0; j < temp_result.size()-1; j++)
+ for (unsigned int j=0; j < temp_result.size(); j++)
{
if (j + shift_amount >= temp_result.size())
temp_result[j] = CreateSimpForm(ITE, bbarg2[i],ASTFalse,temp_result[j]);
ASTNode BBFormula = BBForm(q);
CNFMgr* cm = new CNFMgr(this);
ClauseList* cl = cm->convertToCNF(BBFormula);
+ if(stats)
+ cerr << "Number of clauses:" << cl->size() << endl;
+ //PrintClauseList(cout, *cl);
bool sat = toSATandSolve(newS,*cl);
cm->DELETE(cl);
delete cm;
-little.smt
----
-* Ends without achieving a result. Not sure why?
-
-
nextpoweroftwo064.smt
---
-With optimizations disabled it finishes in 7.3 seconds (on my machine). With optimizations enabled. Uses lots of memory when converting to CNF.
+With optimizations disabled it finishes in 7.3 seconds (on my machine). With optimizations enabled it uses up all the available virtual memory (atleast twice more than when optimizations are disabled).
+
--- /dev/null
+(
+benchmark temp20.smt
+:source {Minkeyrink Solver}
+:status unsat
+:difficulty {1}
+:category {crafted}
+:logic QF_BV
+:extrafuns ((sym1 BitVec[1]))
+:extrafuns ((sym2 BitVec[1]))
+:extrafuns ((sym3 BitVec[1]))
+
+
+; Off-by-one in the bvlshr was causing the problem. Fixed in #54
+
+:assumption (= (bvlshr sym1 sym2) sym3)
+:assumption (= (bvlshr sym3 sym2) sym1)
+:assumption (not (= sym2 bv0[1]))
+:assumption (not (= sym1 bv0[1]))
+
+
+)
+
+++ /dev/null
-(
-benchmark temp20.smt
-:source {Minkeyrink Solver}
-:status unsat
-:difficulty {1}
-:category {industrial}
-:logic QF_BV
-:extrafuns ((sym1 BitVec[4]))
-:extrafuns ((sym2 BitVec[1]))
-:extrafuns ((sym3 BitVec[4]))
-
-:assumption (= (bvlshr sym1 (zero_extend[3] sym2)) sym3)
-:assumption (= (bvlshr sym3(zero_extend[3] sym2)) sym1)
-:assumption (not (= sym2 bv0[1]))
-:assumption (not (= sym1 bv0[4]))
-
-)
-