-
- Downloads
Fix bug with diff or unary ops that have same static representation
Previously, for testing whether two diff() expressions or two unary ops were the lead/lag of each other, the preprocessor would test whether they have the same static representation. This is ok for simple expressions (e.g. diff(x(-1))), but not for more complex ones (e.g. diff(x-y) and diff(x(-1)-y) should not be given the same auxiliary variable). This commit fixes this by properly constructing the equivalence relationship and choosing a representative within each equivalence class. See the comments above lag_equivalence_table_t in ExprNode.hh for more details. Closes #27
Showing
- src/ComputingTasks.cc 4 additions, 4 deletionssrc/ComputingTasks.cc
- src/ComputingTasks.hh 2 additions, 2 deletionssrc/ComputingTasks.hh
- src/DynamicModel.cc 32 additions, 33 deletionssrc/DynamicModel.cc
- src/DynamicModel.hh 4 additions, 4 deletionssrc/DynamicModel.hh
- src/ExprNode.cc 91 additions, 101 deletionssrc/ExprNode.cc
- src/ExprNode.hh 68 additions, 51 deletionssrc/ExprNode.hh
- src/ModFile.cc 7 additions, 6 deletionssrc/ModFile.cc
Loading
Please register or sign in to comment