{'fraction_non_alphanumeric': 0.01718213058419244, 'fraction_numerical': 0.0, 'mean_word_length': 5.027586206896552, '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}}
AVOIDING INFINITE LOOPS IN RULE-BASED SYSTEMS WITH BACKWARD CHAINING Nikola Bogunovic

A subset of rule-based expert systems may be viewed as a logic program, consisting of a finite set of normalized logic clauses. Query evaluation, or backward chaining strategy of such programs, is a procedure that searches for a path from a given node to some arbitrary node in the corresponding graph. Hence, there may be some paths that are infinite in length. The paper compares two methods that avoid infinite loops in logic programs. Based on the notion of tabling in deterministic languages, the paper examines a similar method in a nondeterministic computational environment of logic programming. The tabling algorithm is then compared to the Magic transformation method, based on source program transformation. Two methods are analysed with respect to time and space complexity.