Augmenting Neural Networks with First-order Logic