A-normal-form conversion