The PITA System: Tabling and Answer Subsumption for Reasoning under Uncertainty