neurolang.probabilistic.cplogic.grounding module

class neurolang.probabilistic.cplogic.grounding.Chase(datalog_program, rules=None)

Bases: ChaseNaive, ChaseNamedRelationalAlgebraMixin, ChaseGeneral

Methods

aggregate_tuple_type_into_row_type

build_chase_solution

build_chase_tree

build_nodes_from_rules

chase_step

check_constraints

compose_all_subtitutions

compose_substitutions_ignoring_conflicts

compose_substitutions_no_conflict

compute_instance_update

compute_new_tuple_and_type

compute_result_set

eliminate_already_computed

evaluate_builtins

evaluate_builtins_predicates

execute_chase

extract_rule_predicates

extract_variable_arguments

get_args_to_project

infer_iterable_subtype

is_containment_of_symbol_in_constant

is_equality_between_constant_and_symbol

obtain_substitutions

rewrite_antecedent_equalities

rewrite_constants_in_consequent

rewrite_rule_consequent_constants_to_equalities

translate_conjunction_to_named_ra

unify_builtin_substitution

unify_builtin_substitution_containment

unify_builtin_substitution_equality

class neurolang.probabilistic.cplogic.grounding.Datalog(symbol_table=None)

Bases: TranslateToLogic, DatalogProgram, ExpressionBasicEvaluator

Attributes:
included_constants
included_functions
patterns

Property holding an iterator of triplets (pattern, guard, action).

Methods

constant_equals

infer_iterable_type(iterable)

Infer the type of iterable elements without modifying the iterable.

match(expression)

Find the action for a given expression by going through the patterns.

pattern_match(pattern, expression)

Return True if pattern matches expression.

type

union_of_cq(expression)

This pattern is here to avoid processing the full program when one rule is rewritten.

add_extensional_predicate_from_tuples

add_included_constants_and_functions_to_symbol_table

build_conjunction

build_disjunction

build_negation

builtins

eval_lambda

evaluate_function

evaluate_function_infer_type

evaluate_projection

extensional_database

fact

intensional_database

new_set

pattern_match_expression

pattern_match_expression_parameters

pattern_match_expression_tuple

pattern_match_tuple

pop_scope

predicate_terms

process_expression

process_iterable_argument

push_scope

statement_intensional

symbol

translate_logic_operator

walk

protected_keywords = {}
type = typing.Any
neurolang.probabilistic.cplogic.grounding.build_extensional_grounding(pred_symb, tuple_set)
neurolang.probabilistic.cplogic.grounding.build_grounding(cpl_program, dl_instance)
neurolang.probabilistic.cplogic.grounding.build_pchoice_grounding(pred_symb, relation)
neurolang.probabilistic.cplogic.grounding.build_pfact_grounding_from_set(pred_symb, relation)
neurolang.probabilistic.cplogic.grounding.build_probabilistic_grounding(pred_symb, relation, grounding_cls)
neurolang.probabilistic.cplogic.grounding.build_rule_grounding(pred_symb, st_item, tuple_set)
neurolang.probabilistic.cplogic.grounding.cplogic_to_datalog(cpl_program)
neurolang.probabilistic.cplogic.grounding.get_grounding_dependencies(grounding)
neurolang.probabilistic.cplogic.grounding.get_grounding_pred_symb(grounded_exp)
neurolang.probabilistic.cplogic.grounding.get_grounding_predicate(grounded_exp)
neurolang.probabilistic.cplogic.grounding.ground_cplogic_program(cpl_program)
neurolang.probabilistic.cplogic.grounding.remove_probability_column(relation)
neurolang.probabilistic.cplogic.grounding.topological_sort_groundings(groundings)
neurolang.probabilistic.cplogic.grounding.topological_sort_groundings_util(pred_symb, dependencies, visited, result)