void TritonToZ3Ast::operator()(triton::ast::ZxNode& e) { Z3Result ext = this->eval(*e.getChilds()[0]); Z3Result value = this->eval(*e.getChilds()[1]); triton::uint32 extv = static_cast<triton::uint32>(ext.getUintValue()); z3::expr newexpr = to_expr(this->result.getContext(), Z3_mk_zero_ext(this->result.getContext(), extv, value.getExpr())); this->result.setExpr(newexpr); }
void TritonToZ3Ast::operator()(triton::ast::ExtractNode& e) { Z3Result high = this->eval(*e.getChilds()[0]); Z3Result low = this->eval(*e.getChilds()[1]); Z3Result value = this->eval(*e.getChilds()[2]); triton::uint32 hv = static_cast<triton::uint32>(high.getUintValue()); triton::uint32 lv = static_cast<triton::uint32>(low.getUintValue()); z3::expr newexpr = to_expr(this->result.getContext(), Z3_mk_extract(this->result.getContext(), hv, lv, value.getExpr())); this->result.setExpr(newexpr); }