Intelligent Testing with Interpretable and High-Capacity Agents by Embedding Logical Structure in Neural Architectures