pac: add residual to additive part

issue#70
Houtan Bastani 2019-03-07 12:23:19 +01:00
parent 9b1b4113d9
commit 583c8373d7
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 9 additions and 0 deletions

View File

@ -5634,6 +5634,9 @@ BinaryOpNode::getPacAREC(int lhs_symb_id, int lhs_orig_symb_id,
for (const auto & it : terms)
{
auto bopn = dynamic_cast<BinaryOpNode *>(it.first);
auto pen = dynamic_cast<PacExpectationNode *>(it.first);
if (pen)
continue;
if (bopn != nullptr)
{
auto vn1 = dynamic_cast<VariableNode *>(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);
}
}
}