Detecting and breaking symmetries on specifications