コード例 #1
0
ファイル: tritonToZ3Ast.cpp プロジェクト: illera88/Triton
void TritonToZ3Ast::operator()(triton::ast::DistinctNode& e) {
    Z3Result op1      = this->eval(*e.getChilds()[0]);
    Z3Result op2      = this->eval(*e.getChilds()[1]);
    Z3_ast ops[]      = {op1.getExpr(), op2.getExpr()};
    z3::expr newexpr  = to_expr(this->result.getContext(), Z3_mk_distinct(this->result.getContext(), 2, ops));

    this->result.setExpr(newexpr);
}
コード例 #2
0
ファイル: api.cpp プロジェクト: CHolmes3/z3
static void test_mk_distinct() {
  Z3_config cfg = Z3_mk_config();
  Z3_context ctx = Z3_mk_context(cfg);
  Z3_set_error_handler(ctx, my_cb);

  Z3_sort bv8 = Z3_mk_bv_sort(ctx, 8);
  Z3_sort bv32 = Z3_mk_bv_sort(ctx, 32);
  Z3_ast args[] = { Z3_mk_int64(ctx, 0, bv8), Z3_mk_int64(ctx, 0, bv32) };
  Z3_ast d = Z3_mk_distinct(ctx, 2, args);
  SASSERT(cb_called);
  
}