{'fraction_non_alphanumeric': 0.01827875095201828, 'fraction_numerical': 0.0, 'mean_word_length': 5.7384615384615385, '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}}
A tool to check operational properties of Prolog programs with application to program construction and program optimization – Tool demonstration

We present a tool, based on abstract interpretation, that checks the correctness of an annotated Prolog program with respect to formal specifications of its procedures. Specifications describe operational properties such as mode, type, sharing, linearity, and size of input/output terms, occur-check freeness, conditions for sure success and failure, number of solutions to a call, including determinacy analysis, and induction parameters for proving termination. Program annotations also include polymorphic type declarations and norm declarations for terms. Programs can be structured as separate modules, which are checked separately, using the specifications of external procedures only. The tool either proves the correctness of a procedure with respect to a specification or reports precise information about the failure of a proof attempt. Correct specifications can then be used to optimize the program by safe automatic introduction of cuts and other related source to source transformations. Finally, the tool can be used to support a programming methodology where the declarative and operational aspects of logic program construction are clearly separated.