• Sébastien Villemot's avatar
    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.