code: public List<Formula> newUpperBound(int rhs) {
      this.result.reset();
      this.computeUBConstraint(this.result, rhs);
      return this.result.result();
    }
docs: Tightens the upper bound of an at-most-k constraint and returns the resulting formula.
  @param rhs the new upperBound
  @return the incremental encoding of the new upper bound