Text this: Elimination of redundant messages with a two-pass static analysis algorithm