28 #include <boost/algorithm/string.hpp>
29 #include <ext/hash_map>
44 : m_algoResult(
false), m_logicalExpression(alg.algoLogicalExpression()), m_rpnVector(alg.algoRpnVector()) {
52 const std::vector<ConditionEvaluationMap> &conditionResultMaps) {
70 std::stack<bool, std::vector<bool>> resultStack;
81 switch (it->operation) {
83 CItEvalMap itCond = (conditionResultMaps.at(chipNumber)).
find(it->operand);
84 if (itCond != (conditionResultMaps[chipNumber]).end()) {
85 if (
nullptr == itCond->second) {
88 <<
"\nCondition " << (it->operand) <<
" NULL pointer found in condition map" << std::endl;
92 bool condResult = (itCond->second)->condLastResult();
94 resultStack.push(condResult);
107 CombinationsInCond const &combInCondition = (itCond->second)->getCombinationsInCond();
113 <<
"\nCondition " << (it->operand) <<
" not found in condition map" << std::endl;
120 b1 = resultStack.top();
122 resultStack.push(!
b1);
127 b1 = resultStack.top();
129 b2 = resultStack.top();
131 resultStack.push(
b1 ||
b2);
136 b1 = resultStack.top();
138 b2 = resultStack.top();
140 resultStack.push(
b1 &&
b2);
163 myCout <<
" Algorithm result: " <<
m_algoResult << std::endl;
169 myCout <<
" Operand token vector size: " << operandTokenVectorSize;
171 if (operandTokenVectorSize == 0) {
172 myCout <<
" - not properly initialized! " << std::endl;
176 for (
int i = 0;
i < operandTokenVectorSize; ++
i) {