extern "C" CVC_Type CVC_TypeFunc(CVC_VC vc, CVC_Type ret, CVC_Type *args, int num_args) { GetVC; try { std::vector<CVC3::Type> cvc_args; for (int i = 0; i < num_args; i++) cvc_args.push_back(FromType(args[i])); return ToType(cvc->funType(cvc_args, FromType(ret))); } catch (CVC3::Exception ex) { ExceptionFail(ex); } }
extern "C" CVC_Exp CVC_ExpVar(CVC_VC vc, const char *name, CVC_Type type) { GetVC; try { return ToExp(cvc->varExpr(name, FromType(type))); } catch (CVC3::Exception ex) { ExceptionFail(ex); } }
extern "C" CVC_Op CVC_NewOp(CVC_VC vc, const char *name, CVC_Type type) { GetVC; try { CVC3::Op op = cvc->createOp(name, FromType(type)); return (CVC_Op)(ToExp(cvc->getEM()->newLeafExpr(op))); } catch (CVC3::Exception ex) { ExceptionFail(ex); } }
bool tbl::TableManipulator:: SetFieldValue(const std::string& fieldname, const void* val) { // find the field with matching fieldname const char* fieldname_str(fieldname.c_str()); for (unsigned i = 0; i < _tInfo->_numFields; ++i) { if (!utl::CaseCompare(_tInfo->_fields[i]._name,fieldname_str)) { return FromType(i, val); } } return false; }