concepts.pdsketch.crow.regression_utils#

Utility functions for regression search.

Functions

create_find_expression_csp_variable(...)

Create a TensorValue that corresponds to a variable inside a FindExpression.

create_find_expression_variable_placeholder(...)

Create a TensorValue that corresponds to a variable inside a FindExpression.

cvt_single_optimistic_value_or_list(x)

Convert a single optimistic value stored in a TensorValue to an OptimisticValue.

evaluate_bool_scalar_expression(executor, ...)

gen_applicable_regression_rules(executor, ...)

gen_grounded_subgoals_with_placeholders(...)

Generated a set of subgoals with placeholders for CSP variables.

ground_fol_expression(expression, ...)

Ground the given FOL expression with the given variable mapping.

ground_fol_expression_v2(expression, ...)

Ground the given FOL expression with the given variable mapping.

ground_operator_application_expression(...)

Ground the given operator application expression with the given variable mapping.

ground_regression_application_expression(...)

Ground the given regression application expression with the given variable mapping.

has_optimistic_constant_expression(*expressions)

Check if there is a ConstantExpression whose value is an optimistic constant.

has_optimistic_value_or_list(x)

Check if there is any optimistic value in the input TensorValue or a list of TensorValue's.

is_single_optimistic_value_or_list(x)

Check if the input TensorValue is a single optimistic value or a list of TensorValue's that are all single optimistic values.

len_candidate_regression_rules(...)

Compute the number of candidate regression rules.

make_rule_applier(rule, bounded_variables)

Make a rule applier from a regression rule and a set of bounded variables.

map_csp_placeholder_action(action, csp, ...)

Map the CSP variables in the action to the CSP variables in the placeholder CSP.

map_csp_placeholder_goal(subgoal, csp, ...)

Map the CSP variables in the subgoal to the CSP variables in the placeholder CSP.

map_csp_placeholder_regression_rule_applier(...)

Map the CSP variables in the regression rule applier to the CSP variables in the placeholder CSP.

map_csp_variable_mapping(...)

Map the CSP variable mapping to the new variable mapping.

map_csp_variable_state(state, csp, assignments)

Map the CSP variable state to the new variable state.

mark_constraint_group_solver(executor, ...)

Mark the solver for the current state.

surface_fol_downcast(expression_1, expression_2)

Trying to downcast the expression_1 to the same form as expression_2.

Classes

ApplicableRegressionRuleGroup

ApplicableRegressionRuleGroup(chain_index, subgoal_index, regression_rules)

ApplicableRegressionRuleItem

ApplicableRegressionRuleItem(regression_rule, bounded_variables)