{'fraction_non_alphanumeric': 0.016039481801357187, 'fraction_numerical': 0.001850709438618137, 'mean_word_length': 4.91970802919708, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Extended semantics and inference for the Independent Choice Logic

The Independent Choice Logic (ICL), proposed by Poole, is a language for expressing probabilistic information in logic programming that adopts a distribution semantics: an ICL theory defines a distribution over a set of normal logic programs. The probability of a query is then given by the sum of the probabilities of the programs where the query is true. The ICL semantics requires the theory to be acyclic. This is a strong limitation that rules out many interesting programs. In this paper we present an extension of the ICL semantics that allows theories to be modularly acyclic. Inference with ICL can be performed with the Ailog2 system that computes explanations to queries and then makes them mutually incompatible by means of an iterative algorithm. We propose the system PICL (for Probabilistic inference with ICL) that computes the explanations to queries by means of a modification of SLDNF-resolution and then makes the explanations mutually incompatible by means of Binary Decision Diagrams. PICL and Ailog2 are compared on problems that involve computing the probability of a connection between two nodes in biological graphs and in social networks. Moreover, they are also applied to three games of dice. The problems considered are easily expressible in P-log, a probabilistic language based on Answer Set Programming. Therefore, the Plog system was also applied to the programs. PICL was able to handle larger problems than Ailog2 and Plog. Moreover, it was the fastest of the three algorithms except for one case of one of dice games.