return output;
}
+Expr vc_bvBoolExtract_Zero(VC vc, Expr ccc, int bit_num) {
+ bmstar b = (bmstar)vc;
+ nodestar a = (nodestar)ccc;
+ b->BVTypeCheck(*a);
+
+ node bit = b->CreateBVConst(32,bit_num);
+ //node o = b->CreateNode(BEEV::BVGETBIT,*a,bit);
+ node zero = b->CreateBVConst(1,0);
+ node oo = b->CreateTerm(BEEV::BVEXTRACT,1,*a,bit,bit);
+ node o = b->CreateNode(BEEV::EQ,oo,zero);
+ b->BVTypeCheck(o);
+ nodestar output = new node(o);
+ //if(cinterface_exprdelete_on) created_exprs.push_back(output);
+ return output;
+}
+
+Expr vc_bvBoolExtract_One(VC vc, Expr ccc, int bit_num) {
+ bmstar b = (bmstar)vc;
+ nodestar a = (nodestar)ccc;
+ b->BVTypeCheck(*a);
+
+ node bit = b->CreateBVConst(32,bit_num);
+ //node o = b->CreateNode(BEEV::BVGETBIT,*a,bit);
+ node one = b->CreateBVConst(1,1);
+ node oo = b->CreateTerm(BEEV::BVEXTRACT,1,*a,bit,bit);
+ node o = b->CreateNode(BEEV::EQ,oo,one);
+ b->BVTypeCheck(o);
+ nodestar output = new node(o);
+ //if(cinterface_exprdelete_on) created_exprs.push_back(output);
+ return output;
+}
+
Expr vc_bvSignExtend(VC vc, Expr ccc, int nbits) {
bmstar b = (bmstar)vc;
nodestar a = (nodestar)ccc;
//accepts a bitvector and position, and returns a boolean
//corresponding to that position. More precisely, it return the
- //equation (x[bit_no:bit_no] = 0)
- //FIXME = 1 ?
- Expr vc_bvBoolExtract(VC vc, Expr x, int bit_no);
+ //equation (x[bit_no:bit_no] == 0)
+ Expr vc_bvBoolExtract(VC vc, Expr x, int bit_no);
+ Expr vc_bvBoolExtract_Zero(VC vc, Expr x, int bit_no);
+
+ //accepts a bitvector and position, and returns a boolean
+ //corresponding to that position. More precisely, it return the
+ //equation (x[bit_no:bit_no] == 1)
+ Expr vc_bvBoolExtract_One(VC vc, Expr x, int bit_no);
Expr vc_bvSignExtend(VC vc, Expr child, int nbits);
/*C pointer support: C interface to support C memory arrays in CVCL */