Towards interpretable and controllable machine learning models via logic reasoning