Commit 922d0551 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

Revert "fixes to auxiliary variable creation for unary ops in diff operators"

This reverts commit 48031b99.
parent 48031b99
......@@ -5191,7 +5191,7 @@ DynamicModel::substituteAdl()
void
DynamicModel::substituteDiff(StaticModel &static_model, ExprNode::subst_table_t &diff_subst_table)
{
// Find unary ops in diff Nodes
// Find diff Nodes
diff_table_t diff_table;
for (map<int, expr_t>::iterator it = local_variables_table.begin();
it != local_variables_table.end(); it++)
......@@ -5229,7 +5229,7 @@ void
DynamicModel::substituteDiffUnaryOps(StaticModel &static_model)
{
// Find diff Nodes
diff_table_t nodes;
set<UnaryOpNode *> nodes;
for (map<int, expr_t>::iterator it = local_variables_table.begin();
it != local_variables_table.end(); it++)
it->second->findDiffUnaryOpNodes(static_model, nodes);
......@@ -5237,17 +5237,6 @@ DynamicModel::substituteDiffUnaryOps(StaticModel &static_model)
for (int i = 0; i < (int) equations.size(); i++)
equations[i]->findDiffUnaryOpNodes(static_model, nodes);
if (nodes.empty())
return;
// Find matching unary ops that may be outside of diffs (i.e., those with different lags)
for (map<int, expr_t>::iterator it = local_variables_table.begin();
it != local_variables_table.end(); it++)
it->second->findUnaryOpNodesForAuxVarCreation(static_model, nodes);
for (int i = 0; i < (int) equations.size(); i++)
equations[i]->findUnaryOpNodesForAuxVarCreation(static_model, nodes);
// Substitute in model local variables
ExprNode::subst_table_t subst_table;
vector<BinaryOpNode *> neweqs;
......
......@@ -539,12 +539,7 @@ NumConstNode::findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table)
}
void
NumConstNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
{
}
void
NumConstNode::findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
NumConstNode::findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const
{
}
......@@ -555,7 +550,7 @@ NumConstNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff_table
}
expr_t
NumConstNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
NumConstNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
{
return const_cast<NumConstNode *>(this);
}
......@@ -1430,12 +1425,7 @@ VariableNode::findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table)
}
void
VariableNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
{
}
void
VariableNode::findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
VariableNode::findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const
{
}
......@@ -1447,7 +1437,7 @@ VariableNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff_table
}
expr_t
VariableNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
VariableNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
{
return const_cast<VariableNode *>(this);
}
......@@ -3046,7 +3036,7 @@ UnaryOpNode::isDiffPresent() const
}
void
UnaryOpNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
UnaryOpNode::findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const
{
if (op_code != oDiff)
{
......@@ -3065,6 +3055,9 @@ UnaryOpNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary
exit(EXIT_FAILURE);
}
if (unary_op_nodes_in_diff.find(sarg) != unary_op_nodes_in_diff.end())
return;
if (sarg->get_op_code() == oDiff)
{
arg->findDiffUnaryOpNodes(static_datatree, unary_op_nodes_in_diff);
......@@ -3078,39 +3071,7 @@ UnaryOpNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary
exit(EXIT_FAILURE);
}
int arg_max_lag = -arg->maxLag();
diff_table_t::iterator it = unary_op_nodes_in_diff.find(sarg);
if (it != unary_op_nodes_in_diff.end())
{
for (map<int, expr_t>::const_iterator it1 = it->second.begin();
it1 != it->second.end(); it1++)
if (arg == it1->second)
return;
it->second[arg_max_lag] = dynamic_cast<UnaryOpNode *>(arg);
}
else
unary_op_nodes_in_diff[sarg][arg_max_lag] = dynamic_cast<UnaryOpNode *>(arg);
}
void
UnaryOpNode::findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
{
UnaryOpNode *sthis = dynamic_cast<UnaryOpNode *>(this->toStatic(static_datatree));
diff_table_t::iterator it = unary_op_nodes_in_diff.find(sthis);
if (it == unary_op_nodes_in_diff.end())
{
arg->findUnaryOpNodesForAuxVarCreation(static_datatree, unary_op_nodes_in_diff);
return;
}
else
{
int this_max_lag = -this->maxLag();
for (map<int, expr_t>::const_iterator it1 = it->second.begin();
it1 != it->second.end(); it1++)
if (this == it1->second)
return;
it->second[this_max_lag] = const_cast<UnaryOpNode *>(this);
}
unary_op_nodes_in_diff.insert(sarg);
}
bool
......@@ -3328,42 +3289,40 @@ UnaryOpNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff_table,
}
expr_t
UnaryOpNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
UnaryOpNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
{
UnaryOpNode *sthis = dynamic_cast<UnaryOpNode *>(this->toStatic(static_datatree));
diff_table_t::iterator it = nodes.find(sthis);
if (it == nodes.end())
UnaryOpNode *sarg, *argtouse;
if (op_code == oDiff)
{
sarg = dynamic_cast<UnaryOpNode *>(arg->toStatic(static_datatree));
argtouse = dynamic_cast<UnaryOpNode *>(arg);
}
else
{
sarg = dynamic_cast<UnaryOpNode *>(this->toStatic(static_datatree));
argtouse = const_cast<UnaryOpNode *>(this);
}
if (sarg == NULL || nodes.find(sarg) == nodes.end())
{
expr_t argsubst = arg->substituteDiffUnaryOpNodes(static_datatree, nodes, subst_table, neweqs);
return buildSimilarUnaryOpNode(argsubst, datatree);
}
subst_table_t::const_iterator sit = subst_table.find(this);
subst_table_t::const_iterator sit = subst_table.find(argtouse);
if (sit != subst_table.end())
return const_cast<VariableNode *>(sit->second);
VariableNode *aux_var = NULL;
for (map<int, expr_t>::reverse_iterator rit = it->second.rbegin();
rit != it->second.rend(); rit++)
{
if (rit == it->second.rbegin())
{
VariableNode *vn = dynamic_cast<VariableNode *>(const_cast<UnaryOpNode *>(this)->get_arg());
int symb_id = datatree.symbol_table.addUnaryOpInsideDiffAuxiliaryVar(this->idx, const_cast<UnaryOpNode *>(this),
vn->get_symb_id(), vn->get_lag());
aux_var = datatree.AddVariable(symb_id, 0);
neweqs.push_back(dynamic_cast<BinaryOpNode *>(datatree.AddEqual(aux_var, const_cast<UnaryOpNode *>(this))));
subst_table[rit->second] = dynamic_cast<VariableNode *>(aux_var);
}
else
{
VariableNode *vn = dynamic_cast<VariableNode *>(dynamic_cast<UnaryOpNode *>(rit->second)->get_arg());
subst_table[rit->second] = dynamic_cast<VariableNode *>(aux_var->decreaseLeadsLags(-vn->get_lag()));
}
}
sit = subst_table.find(this);
return const_cast<VariableNode *>(sit->second);
VariableNode *vn = dynamic_cast<VariableNode *>(dynamic_cast<UnaryOpNode *>(argtouse)->get_arg());
int lag = vn->get_lag();
int symb_id = datatree.symbol_table.addUnaryOpInsideDiffAuxiliaryVar(argtouse->idx, argtouse,
vn->get_symb_id(), lag);
VariableNode *aux_var = datatree.AddVariable(symb_id, 0);
neweqs.push_back(dynamic_cast<BinaryOpNode *>(datatree.AddEqual(aux_var, argtouse)));
subst_table[argtouse] = dynamic_cast<VariableNode *>(aux_var);
if (op_code == oDiff)
return buildSimilarUnaryOpNode(aux_var, datatree);
return const_cast<VariableNode *>(aux_var);
}
expr_t
......@@ -5035,19 +4994,12 @@ BinaryOpNode::substituteAdl() const
}
void
BinaryOpNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
BinaryOpNode::findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const
{
arg1->findDiffUnaryOpNodes(static_datatree, unary_op_nodes_in_diff);
arg2->findDiffUnaryOpNodes(static_datatree, unary_op_nodes_in_diff);
}
void
BinaryOpNode::findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
{
arg1->findUnaryOpNodesForAuxVarCreation(static_datatree, unary_op_nodes_in_diff);
arg2->findUnaryOpNodesForAuxVarCreation(static_datatree, unary_op_nodes_in_diff);
}
void
BinaryOpNode::findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const
{
......@@ -5065,7 +5017,7 @@ BinaryOpNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff_table
}
expr_t
BinaryOpNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
BinaryOpNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
{
expr_t arg1subst = arg1->substituteDiffUnaryOpNodes(static_datatree, nodes, subst_table, neweqs);
expr_t arg2subst = arg2->substituteDiffUnaryOpNodes(static_datatree, nodes, subst_table, neweqs);
......@@ -5958,21 +5910,13 @@ TrinaryOpNode::findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table
}
void
TrinaryOpNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
TrinaryOpNode::findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const
{
arg1->findDiffUnaryOpNodes(static_datatree, unary_op_nodes_in_diff);
arg2->findDiffUnaryOpNodes(static_datatree, unary_op_nodes_in_diff);
arg3->findDiffUnaryOpNodes(static_datatree, unary_op_nodes_in_diff);
}
void
TrinaryOpNode::findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
{
arg1->findUnaryOpNodesForAuxVarCreation(static_datatree, unary_op_nodes_in_diff);
arg2->findUnaryOpNodesForAuxVarCreation(static_datatree, unary_op_nodes_in_diff);
arg3->findUnaryOpNodesForAuxVarCreation(static_datatree, unary_op_nodes_in_diff);
}
expr_t
TrinaryOpNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table,
vector<BinaryOpNode *> &neweqs) const
......@@ -5984,7 +5928,7 @@ TrinaryOpNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff_tabl
}
expr_t
TrinaryOpNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
TrinaryOpNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
{
expr_t arg1subst = arg1->substituteDiffUnaryOpNodes(static_datatree, nodes, subst_table, neweqs);
expr_t arg2subst = arg2->substituteDiffUnaryOpNodes(static_datatree, nodes, subst_table, neweqs);
......@@ -6406,19 +6350,12 @@ AbstractExternalFunctionNode::findDiffNodes(DataTree &static_datatree, diff_tabl
}
void
AbstractExternalFunctionNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
AbstractExternalFunctionNode::findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const
{
for (vector<expr_t>::const_iterator it = arguments.begin(); it != arguments.end(); it++)
(*it)->findDiffUnaryOpNodes(static_datatree, unary_op_nodes_in_diff);
}
void
AbstractExternalFunctionNode::findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
{
for (vector<expr_t>::const_iterator it = arguments.begin(); it != arguments.end(); it++)
(*it)->findUnaryOpNodesForAuxVarCreation(static_datatree, unary_op_nodes_in_diff);
}
expr_t
AbstractExternalFunctionNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table,
vector<BinaryOpNode *> &neweqs) const
......@@ -6430,7 +6367,7 @@ AbstractExternalFunctionNode::substituteDiff(DataTree &static_datatree, diff_tab
}
expr_t
AbstractExternalFunctionNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
AbstractExternalFunctionNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
{
vector<expr_t> arguments_subst;
for (vector<expr_t>::const_iterator it = arguments.begin(); it != arguments.end(); it++)
......@@ -7992,12 +7929,7 @@ VarExpectationNode::findDiffNodes(DataTree &static_datatree, diff_table_t &diff_
}
void
VarExpectationNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
{
}
void
VarExpectationNode::findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
VarExpectationNode::findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const
{
}
......@@ -8009,7 +7941,7 @@ VarExpectationNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff
}
expr_t
VarExpectationNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
VarExpectationNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
{
return const_cast<VarExpectationNode *>(this);
}
......@@ -8442,12 +8374,7 @@ PacExpectationNode::findDiffNodes(DataTree &static_datatree, diff_table_t &diff_
}
void
PacExpectationNode::findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
{
}
void
PacExpectationNode::findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const
PacExpectationNode::findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const
{
}
......@@ -8459,7 +8386,7 @@ PacExpectationNode::substituteDiff(DataTree &static_datatree, diff_table_t &diff
}
expr_t
PacExpectationNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
PacExpectationNode::substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
{
return const_cast<PacExpectationNode *>(this);
}
......
......@@ -492,10 +492,9 @@ class ExprNode
//! Substitute diff operator
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const = 0;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const = 0;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const = 0;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const = 0;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const = 0;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const = 0;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const = 0;
//! Substitute pac_expectation operator
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table) = 0;
......@@ -587,10 +586,9 @@ public:
virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const;
virtual expr_t substituteAdl() const;
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table);
virtual expr_t decreaseLeadsLagsPredeterminedVariables() const;
virtual expr_t differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
......@@ -678,10 +676,9 @@ public:
virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const;
virtual expr_t substituteAdl() const;
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table);
virtual expr_t decreaseLeadsLagsPredeterminedVariables() const;
virtual expr_t differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
......@@ -792,11 +789,10 @@ public:
virtual expr_t substituteAdl() const;
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const;
bool createAuxVarForUnaryOpNodeInDiffOp() const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const;
void getDiffArgUnaryOperatorIfAny(string &op_handle) const;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table);
virtual expr_t decreaseLeadsLagsPredeterminedVariables() const;
virtual expr_t differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
......@@ -923,10 +919,9 @@ public:
virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const;
virtual expr_t substituteAdl() const;
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table);
virtual expr_t decreaseLeadsLagsPredeterminedVariables() const;
virtual expr_t differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
......@@ -1029,10 +1024,9 @@ public:
virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const;
virtual expr_t substituteAdl() const;
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table);
virtual expr_t decreaseLeadsLagsPredeterminedVariables() const;
virtual expr_t differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
......@@ -1135,10 +1129,9 @@ public:
virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const;
virtual expr_t substituteAdl() const;
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table);
virtual expr_t buildSimilarExternalFunctionNode(vector<expr_t> &alt_args, DataTree &alt_datatree) const = 0;
virtual expr_t decreaseLeadsLagsPredeterminedVariables() const;
......@@ -1331,10 +1324,9 @@ public:
virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const;
virtual expr_t substituteAdl() const;
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table);
virtual pair<int, expr_t> normalizeEquation(int symb_id_endo, vector<pair<int, pair<expr_t, expr_t> > > &List_of_Op_RHS) const;
virtual void compile(ostream &CompileCode, unsigned int &instruction_number,
......@@ -1417,10 +1409,9 @@ public:
virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const;
virtual expr_t substituteAdl() const;
virtual void findDiffNodes(DataTree &static_datatree, diff_table_t &diff_table) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findUnaryOpNodesForAuxVarCreation(DataTree &static_datatree, diff_table_t &unary_op_nodes_in_diff) const;
virtual void findDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &unary_op_nodes_in_diff) const;
virtual expr_t substituteDiff(DataTree &static_datatree, diff_table_t &diff_table, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, diff_table_t &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substituteDiffUnaryOpNodes(DataTree &static_datatree, set<UnaryOpNode *> &nodes, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const;
virtual expr_t substitutePacExpectation(map<const PacExpectationNode *, const BinaryOpNode *> &subst_table);
virtual pair<int, expr_t> normalizeEquation(int symb_id_endo, vector<pair<int, pair<expr_t, expr_t> > > &List_of_Op_RHS) const;
virtual void compile(ostream &CompileCode, unsigned int &instruction_number,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment