concepts.pdsketch.crow.regression_utils.ground_operator_application_expression#

ground_operator_application_expression(expression, variable_mapping, csp=None, add_csp_variables=True)[source]#

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

Parameters:
  • expression (OperatorApplicationExpression) – the expression to ground.

  • variable_mapping (Dict[Variable, str]) – the variable mapping, which is a mapping from the Variable object to the constant name.

  • csp (ConstraintSatisfactionProblem | None) – the constraint satisfaction problem to add the constraints to.

  • add_csp_variables (bool) – whether to add the unnamed placeholder variables to the constraint satisfaction problem.

Returns:

the grounded expression.

Return type:

OperatorApplier