From 583c8373d7eac8349d86754bb1e9fbe1fc7cc898 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Thu, 7 Mar 2019 12:23:19 +0100 Subject: [PATCH] pac: add residual to additive part --- src/ExprNode.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ExprNode.cc b/src/ExprNode.cc index 963b18e6..4f10ecb8 100644 --- a/src/ExprNode.cc +++ b/src/ExprNode.cc @@ -5634,6 +5634,9 @@ BinaryOpNode::getPacAREC(int lhs_symb_id, int lhs_orig_symb_id, for (const auto & it : terms) { auto bopn = dynamic_cast(it.first); + auto pen = dynamic_cast(it.first); + if (pen) + continue; if (bopn != nullptr) { auto vn1 = dynamic_cast(bopn->arg1); @@ -5681,6 +5684,12 @@ BinaryOpNode::getPacAREC(int lhs_symb_id, int lhs_orig_symb_id, } } } + else + { + auto m = it.first->matchVariableTimesConstantTimesParam(); + get<3>(m) *= it.second; + additive_vars_params_and_constants.push_back(m); + } } }