A Pseudo-Semantic Loss for Autoregressive Models with Logical Constraints