neurolang.datalog.translate_to_named_ra module

class neurolang.datalog.translate_to_named_ra.TranslateToNamedRA(*args, **kwargs)

Bases: ExpressionBasicEvaluator

Partial implementation of algorithm 5.4.8 from [1].

[1]

S. Abiteboul, R. Hull, V. Vianu, Foundations of databases (Addison Wesley, 1995), Addison-Wesley.

Attributes:
patterns

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

Methods

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

classify_formulas_obtain_named_function_applications

classify_formulas_obtain_names

eval_lambda

evaluate_function

evaluate_function_infer_type

evaluate_projection

generate_ra_expression

is_col_to_const_equality

obtain_negative_columns

pattern_match_expression

pattern_match_expression_parameters

pattern_match_expression_tuple

pattern_match_tuple

process_destroy_formulas

process_equality_formula

process_equality_formulas

process_equality_formulas_as_extended_projections

process_equality_formulas_constant

process_expression

process_extended_projection_formulas

process_iterable_argument

process_negative_formulas

process_positive_formulas

process_selection_formulas

translate_builtin_fa

translate_builtin_fa_constants

translate_conjunction

translate_disjunction

translate_eq

translate_eq_c_c

translate_eq_c_fa

translate_eq_c_s

translate_eq_fa_s

translate_eq_s_c

translate_existential_predicate

translate_fa

translate_negation

walk

classify_formulas_obtain_named_function_applications(formula, classified_formulas)
classify_formulas_obtain_names(expression)
generate_ra_expression(functor, selections, selection_columns, projections, named_args)
static is_col_to_const_equality(formula)
static obtain_negative_columns(neg_formula)
static process_destroy_formulas(classified_formulas, output)
static process_equality_formula(formula, named_columns, output)
static process_equality_formulas(classified_formulas, output)
static process_equality_formulas_as_extended_projections(classified_formulas, output)
static process_equality_formulas_constant(output, left, right, named_columns)
static process_extended_projection_formulas(classified_formulas, output)
static process_negative_formulas(classified_formulas, output)
static process_positive_formulas(classified_formulas)
static process_selection_formulas(classified_formulas, output)
translate_builtin_fa(expression)
translate_builtin_fa_constants(expression)
translate_conjunction(expression)
translate_disjunction(expression)
translate_eq(expression)
translate_eq_c_c(expression)
translate_eq_c_fa(expression)
translate_eq_c_s(expression)
translate_eq_fa_s(expression)
translate_eq_s_c(expression)
translate_existential_predicate(expression)
translate_fa(expression)
translate_negation(expression)
type = typing.Any