Generating constraints for BooleanOrder