Criteria for exponential dichotomy for triangular systems