/** * properties/3 * * @param '&corelib' Identifier for core library predicates. * @param PredicateName The name of the predicate in the core library. * @param Attributes A list of attributes that include the category, a helper description, and any additional tags. * * @details This is a fact representing various properties of predicates in the `&corelib` module. Each predicate is associated * with its category, a description (qhelp), and relevant tags to describe its functionality. * * @examples * ?- properties('&corelib', 'length', Attrs). * Attrs = [list_operations, qhelp("Determines the length of a list."), length_determination]. */ % Predicate describing the properties of 'length', which determines the length of a list. properties('&corelib', 'length', [list_operations, qhelp("Determines the length of a list."), length_determination]). % Predicate describing the properties of 'countElement', which counts occurrences of a given element in a list. properties('&corelib', 'countElement', [list_operations, qhelp("Counts occurrences of an element."), element_counting]). % Predicate describing the properties of 'tuple-count', which counts the number of tuples in a given data structure. properties('&corelib', 'tuple-count', [data_structures, qhelp("Counts tuples within a structure."), counting]). /* previously: properties('&corelib', 'TupleConcat', [data_structures, qhelp("Concatenates tuples."), concatenation]). */ /* Skipped Code: 'TupleConcat' might be intentionally skipped as tuple concatenation could be pending further development or is not required in current use cases. */ % Predicate describing the properties of 'unique', which ensures the uniqueness of nondeterministic results. properties('&corelib', 'unique', [nondet_sets, qhelp("Makes nondet results unique."), no_repeats_var]). % Predicate describing the properties of 'subtraction', which lazily subtracts elements from two nondeterministic sets. properties('&corelib', 'subtraction', [nondet_sets, qhelp("It subtracts elements generated by Call2 from those generated by Call1."), lazy_subtraction]). % Predicate describing the properties of 'intersection', which lazily computes the intersection of two nondeterministic sets, preserving duplicates. properties('&corelib', 'intersection', [nondet_sets, qhelp("It gives the intersection duplicates are not removed."), lazy_intersection]). % Predicate describing the properties of 'union', which lazily computes the union of two nondeterministic sets. properties('&corelib', 'union', [nondet_sets, qhelp("It gives the union of 2 lists."), lazy_union]). /* previously: properties('&corelib', 'collapseCardinality', [data_structures, qhelp("Collapses structures with cardinality consideration."), manipulation, cardinality]). */ /* Skipped Code: 'collapseCardinality' may have been deferred for now, as it likely involves complex structure manipulations based on cardinality, which could require additional development or refinement. */ % --- String and Character manipulation predicates --- % Predicate describing the properties of 'stringToChars', which converts a string into a list of characters. properties('&corelib', 'stringToChars', [string_operations, qhelp("Convert a string to a list of chars."), string_to_chars]). % Predicate describing the properties of 'charsToString', which converts a list of characters back into a string. properties('&corelib', 'charsToString', [string_operations, qhelp("Convert a list of chars to a string."), chars_to_string]). % Predicate describing the properties of 'format-args', which formats a string using a given format specifier and arguments. properties('&corelib', 'format-args', [string_operations, qhelp("Generate a formatted string using a format specifier."), format_args]). % Predicate describing the properties of 'flip', which returns a random boolean value. properties('&corelib', 'flip', [random, qhelp("Return a random boolean."), random_boolean]).