Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • pac_composite_target_mce
  • ramsey_k_order
  • 4.6
  • occbin
  • uop
  • rework_pac
  • aux_vars_fix
  • created_preprocessor_repo
9 results

ComputingTasks.hh

Forked from Dynare / preprocessor
1106 commits behind the upstream repository.
  • Sébastien Villemot's avatar
    8a83e08e
    Fix bug with diff or unary ops that have same static representation · 8a83e08e
    Sébastien Villemot authored
    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
    8a83e08e
    History
    Fix bug with diff or unary ops that have same static representation
    Sébastien Villemot authored
    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