Skip to content
Snippets Groups Projects
Select Git revision
  • 164a6f303b1071ea3bc2713b47d6096a857f5e27
  • master default protected
  • julia protected
  • 6.x protected
  • python-codegen
  • llvm-15
  • 5.x protected
  • 4.6 protected
  • uop
  • rework_pac
  • aux_vars_fix
  • julia-7.0.0
  • julia-6.4.0
  • julia-6.3.0
  • julia-6.2.0
15 results

DynamicModel.cc

Blame
    • Sébastien Villemot's avatar
      164a6f30
      Fix bug in temporary terms array in the presence of model local variables · 164a6f30
      Sébastien Villemot authored
      In the presence of MLVs, the temporary terms indexing was corrupted. The code
      was using the implicit assumption that the ExprNodeLess ordering was giving the
      same ordering as the temporary terms indexes ordering. But MLVs can be higher
      in ExprNodeLess ordering than some other temporary terms, while they have the
      lowest temporary terms index, hence the bug.
      
      Fix this by no longer relying on the ExprNodeLess ordering, and rather use a
      full map<ExprNode *, int> for ModelTree::temporary_terms_idxs. By the way,
      simplify the code by removing a few useless data structures (e.g.
      ModelTree::temporary_terms_idxs_*).
      164a6f30
      History
      Fix bug in temporary terms array in the presence of model local variables
      Sébastien Villemot authored
      In the presence of MLVs, the temporary terms indexing was corrupted. The code
      was using the implicit assumption that the ExprNodeLess ordering was giving the
      same ordering as the temporary terms indexes ordering. But MLVs can be higher
      in ExprNodeLess ordering than some other temporary terms, while they have the
      lowest temporary terms index, hence the bug.
      
      Fix this by no longer relying on the ExprNodeLess ordering, and rather use a
      full map<ExprNode *, int> for ModelTree::temporary_terms_idxs. By the way,
      simplify the code by removing a few useless data structures (e.g.
      ModelTree::temporary_terms_idxs_*).
    DynamicModel.cc 297.21 KiB