Knowledge Compilation and Weighted Model Counting for Inference in Probabilistic Logic Programs