bvsolver, arrayTransformer,
tosat, Ctr_Example);
+ // This expects the simplifying node factory to be used to create all the nodes.
+ // i.e. for sbvdiv to be transformed away. The c-interface uses the hashing node
+ // factory. I tried to enable the simplfyingnode factory. But some c-api-tests
+ // failed with assertion errors.
+ bm->UserFlags.set("bitblast-simplification","0");
+
BEEV::GlobalSTP = stp;
decls = new BEEV::ASTVec();
//created_exprs.clear();
g++ $(CXXFLAGS) push-pop-1.c -o a7.out $(LIBS)
./a7.out
8:
- g++ $(CXXFLAGS) sbvmod.c -o a8.out $(LIBS)
+ g++ $(CXXFLAGS) sbvdiv.c -o a8.out $(LIBS)
./a8.out
9:
g++ $(CXXFLAGS) simplify.c -o a9.out $(LIBS)
--- /dev/null
+#include "c_interface.h"
+#include <stdio.h>
+#include <iostream>
+
+int main() {
+ VC vc = vc_createValidityChecker();
+ vc_setFlags(vc, 'p');
+
+ Type int_type = vc_bv32Type(vc);
+ Expr zero = vc_bv32ConstExprFromInt(vc, 0);
+ Expr int_max = vc_bvConstExprFromInt(vc, 32, 0x7fffffff);
+ Expr a = vc_varExpr(vc, "a", int_type);
+ Expr b = vc_varExpr(vc, "b", int_type);
+ vc_assertFormula(vc, vc_sbvGtExpr(vc, b, zero));
+ vc_assertFormula(vc, vc_sbvLeExpr(vc, a, vc_sbvDivExpr(vc, 32,int_max, b)));
+ std::cout << vc_query(vc, vc_falseExpr(vc)) << std::endl;
+}
+
+