concepts.dm.crow.executors.crow_executor.CrowExecutionDefaultVisitor#
- class CrowExecutionDefaultVisitor[source]#
Bases:
ExpressionVisitor
The underlying default implementation for
CrowExecutor
. This function does not handle CSPs (a.k.a. optimistic execution).Methods
forward_args
(*args[, force_tuple, ...])forward_external_function
(function_name, ...)visit
(expr)The main entry point of the visitor.
visit_assign_expression
(expr)visit_bool_expression
(expr[, argument_values])visit_null_expression
(expr)visit_predicate_equal_expression
(expr[, ...])visit_quantification_expression
(expr[, value])Attributes
- __init__(executor)[source]#
Initialize a PDExpressionExecutionDefaultVisitor.
- Parameters:
executor (CrowExecutor) – the executor that uses this visitor.
- __new__(**kwargs)#
- forward_args(*args, force_tuple=False, expand_list_arguments=False)[source]#
- Parameters:
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …] | Tuple[TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …], …]
- forward_external_function(function_name, argument_values, return_type, auto_broadcast=True, expression=None)[source]#
- Parameters:
function_name (str)
argument_values (Sequence[TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, ...]])
return_type (TensorValueTypeBase | PyObjValueType)
auto_broadcast (bool)
expression (Expression | None)
- Return type:
- visit(expr)#
The main entry point of the visitor. It will call the corresponding method for the given expression type.
- Parameters:
expr (Expression) – the expression to visit.
- Returns:
the result of the visit.
- Return type:
- visit_assign_expression(expr)[source]#
- Parameters:
expr (AssignExpression)
- visit_bool_expression(expr, argument_values=None)[source]#
- Parameters:
expr (BoolExpression)
argument_values (Tuple[TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, ...], ...] | None)
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]
- visit_condition_expression(expr)[source]#
- Parameters:
expr (ConditionExpression)
- Return type:
- visit_conditional_assign_expression(expr)[source]#
- Parameters:
expr (ConditionalAssignExpression)
- visit_conditional_select_expression(expr)[source]#
- Parameters:
expr (ConditionalSelectExpression)
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]
- visit_constant_expression(expr)[source]#
- Parameters:
expr (ConstantExpression)
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]
- visit_deictic_assign_expression(expr)[source]#
- Parameters:
expr (DeicticAssignExpression)
- visit_deictic_select_expression(expr)[source]#
- Parameters:
expr (DeicticSelectExpression)
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]
- visit_find_all_expression(expr)[source]#
- Parameters:
expr (FindAllExpression)
- Return type:
- visit_find_one_expression(expr)[source]#
- Parameters:
expr (FindOneExpression)
- Return type:
- visit_function_application_expression(expr, argument_values=None)[source]#
- Parameters:
argument_values (Tuple[TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, ...], ...] | None)
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]
- visit_generalized_quantification_expression(expr)#
- Parameters:
- Return type:
- visit_list_creation_expression(expr)[source]#
- Parameters:
expr (ListCreationExpression)
- Return type:
- visit_list_expansion_expression(expr)[source]#
- Parameters:
expr (ListExpansionExpression)
- Return type:
- visit_null_expression(expr)[source]#
- Parameters:
expr (NullExpression)
- Return type:
- visit_object_compare_expression(expr)[source]#
- Parameters:
expr (ObjectCompareExpression)
- Return type:
- visit_object_constant_expression(expr)[source]#
- Parameters:
expr (ObjectConstantExpression)
- Return type:
- visit_predicate_equal_expression(expr, feature=None, value=None)[source]#
- Parameters:
expr (PredicateEqualExpression)
feature (TensorValue | None)
value (TensorValue | None)
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]
- visit_quantification_expression(expr, value=None)[source]#
- Parameters:
expr (QuantificationExpression)
value (TensorValue | None)
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]
- visit_value_compare_expression(expr)[source]#
- Parameters:
expr (ValueCompareExpression)
- Return type:
- visit_variable_expression(expr)[source]#
- Parameters:
expr (VariableExpression)
- Return type:
TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]
- CONDITIONAL_ASSIGN_QUANTIZE = False#
- property csp: ConstraintSatisfactionProblem#