Enable reversing the order of compares
Adding method to canonicalize compare order
refactor canonicalizes ast first