本文整理汇总了C++中Enode::getSort方法的典型用法代码示例。如果您正苦于以下问题:C++ Enode::getSort方法的具体用法?C++ Enode::getSort怎么用?C++ Enode::getSort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Enode
的用法示例。
在下文中一共展示了Enode::getSort方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dreal_mk_forall
dreal_expr dreal_mk_forall(dreal_context c, dreal_expr * varlist, unsigned n, dreal_expr body) {
assert(c);
OpenSMTContext * c_ = static_cast<OpenSMTContext *>(c);
OpenSMTContext & context = *c_;
vector<pair<string, Snode *>> sorted_var_list;
for (unsigned i = 0; i <n; ++i) {
dreal_expr var = varlist[i];
Enode * e = static_cast<Enode*>(var);
Snode * sort = e->getSort();
string name = e->getCar()->getNameFull();
sorted_var_list.push_back(make_pair(name, sort));
}
Enode * e_body = static_cast<Enode*>(body);
Enode * res = context.mkForall(sorted_var_list, e_body);
return static_cast<void *>(res);
}
示例2: opensmt_mk_forall
opensmt_expr opensmt_mk_forall( opensmt_context c, opensmt_expr * varlist, unsigned n, opensmt_expr body ) {
assert( c );
OpenSMTContext * c_ = static_cast< OpenSMTContext * >( c );
OpenSMTContext & context = *c_;
vector<pair<string, Snode *>*>* sorted_var_list = new vector<pair<string, Snode *>*>();
for (unsigned i = 0; i < n; ++i) {
opensmt_expr var = varlist[i];
Enode * e = static_cast<Enode*>(var);
Snode * sort = e->getSort();
string name = e->getCar()->getName();
sorted_var_list->push_back(new pair<string, Snode *>(name, sort));
}
Enode * e_body = static_cast<Enode*>(body);
Enode * res = context.mkForall(sorted_var_list, e_body);
delete sorted_var_list;
return static_cast< void * >( res );
}