newground.aggregate_strategies.recursive_mode module
Module for the recursive strategies.
- class newground.aggregate_strategies.recursive_mode.RecursiveAggregateRewriting
Bases:
object
Class for the recursive strategies.
- classmethod add_partial_predicate_rules(str_type, str_id, joined_variable_dependencies, first_tuple_predicate_arguments, body_heads_tuple_vars, second_tuple_predicate_arguments, body_heads_tuple_vars_first, new_prg_part)
Add all ‘partial’ predicate rules.
- classmethod added_to_original_body(str_id, str_type, joined_variable_dependencies, remaining_body_part, aggregate_dict)
Handle the rewriting of the original rule.
- classmethod generate_aggregate(aggregate_dict, variable_dependencies, domain, rule_positive_body)
Adds the necessary rules for the recursive aggregate.
- classmethod generate_helper_variables(variable_dependencies, str_type, str_id, skolem_constants, element_dependent_variables)
Generate the helper variables, needed by the other construction methods.
- classmethod generate_ordering_predicate_rules(body_heads, str_id, joined_variable_dependencies, first_tuple_predicate_arguments, body_heads_tuple_vars, second_tuple_predicate_arguments, new_prg_part)
Generate all predicates/rules which are needed for the ordering.
- classmethod generate_tuple_predicate_rules(aggregate_dict, variable_dependencies, domain, rule_positive_body, new_prg_part_set, str_type, str_id)
Generate the tuple predicates and rules.
- classmethod recursive_strategy(aggregate_dict, variables_dependencies_aggregate, domain, rule_positive_body)
Wrapper method for the recursive aggregate generator.