Menu

#146 ExternalLibraryManager::hasBounds is broken

3.1.4
closed
None
2018-11-13
2018-11-13
No

The current implementation of ExternalLibraryManager::hasBounds is as follows:

    bool ExternalLibraryManager::hasBounds(const std::string& l,
                                           const std::string& f,
                                           const std::string& h,
                                           const std::string& n) {
      const auto vn = decomposeVariableName(n);
      const auto n1 = f + "_" + h + "_" + vn + "_LowerBound";
      const auto n2 = f + "_" + h + "_" + vn + "_UpperBound";
      const auto n3 = f + "_" + n + "_LowerBound";
      const auto n4 = f + "_" + n + "_UpperBound";
      return ((this->contains(l, n1)) || (this->contains(l, n2)) || (this->contains(l, n3)) ||
              (this->contains(l, n4)));
    }  // end of ExternalLibraryManager::hasBounds

The definition of n3 and n4 is wrong and the implementation shall be:

    bool ExternalLibraryManager::hasBounds(const std::string& l,
                                           const std::string& f,
                                           const std::string& h,
                                           const std::string& n) {
      const auto vn = decomposeVariableName(n);
      const auto n1 = f + "_" + h + "_" + vn + "_LowerBound";
      const auto n2 = f + "_" + h + "_" + vn + "_UpperBound";
      const auto n3 = f + "_" + vn + "_LowerBound";
      const auto n4 = f + "_" + vn + "_UpperBound";
      return ((this->contains(l, n1)) || (this->contains(l, n2)) || (this->contains(l, n3)) ||
              (this->contains(l, n4)));
    }  // end of ExternalLibraryManager::hasBounds

Discussion

  • Helfer Thomas

    Helfer Thomas - 2018-11-13
    • status: open --> closed
     
  • Helfer Thomas

    Helfer Thomas - 2018-11-13

    Fixed in:

    • revision 2192 in rliv-3.1
    • revision 2193 in rliv-3.2
    • revision 2194 in trunk
     

Log in to post a comment.

MongoDB Logo MongoDB