Comparator automata in quantitative verification (Logical Methods in Computer Science, 2022)