concepts.pdsketch.executor.PDSketchExecutionCSPVisitor#

class PDSketchExecutionCSPVisitor[source]#

Bases: PDSketchExecutionDefaultVisitor

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_conditional_assign_expression(expr)

visit_conditional_select_expression(expr)

visit_constant_expression(expr)

visit_deictic_assign_expression(expr)

visit_deictic_select_expression(expr)

visit_function_application_expression(expr)

visit_generalized_quantification_expression(expr)

visit_list_creation_expression(expr)

visit_list_expansion_expression(expr)

visit_list_function_application_expression(expr)

visit_object_constant_expression(expr)

visit_predicate_equal_expression(expr[, ...])

visit_quantification_expression(expr[, value])

visit_variable_expression(expr)

Attributes

CONDITIONAL_ASSIGN_QUANTIZE

csp

__init__(executor)[source]#

Initialize a PDExpressionExecutionDefaultVisitor.

Parameters:

executor (PDSketchExecutor) – the executor that uses this visitor.

__new__(**kwargs)#
forward_args(*args, force_tuple=False, expand_list_arguments=False)#
Parameters:
  • force_tuple (bool) –

  • expand_list_arguments (bool) –

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:
Return type:

TensorValue

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:

Any

visit_assign_expression(expr)[source]#
Parameters:

expr (AssignExpression) –

Return type:

Any

visit_bool_expression(expr, argument_values=None)[source]#
Parameters:
Return type:

TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]

visit_conditional_assign_expression(expr)[source]#
Parameters:

expr (ConditionalAssignExpression) –

Return type:

Any

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)#
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) –

Return type:

Any

visit_deictic_select_expression(expr)[source]#
Parameters:

expr (DeicticSelectExpression) –

Return type:

Any

visit_function_application_expression(expr, argument_values=None)[source]#
Parameters:
Return type:

TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]

visit_generalized_quantification_expression(expr)#
Parameters:

expr (GeneralizedQuantificationExpression) –

Return type:

Any

visit_list_creation_expression(expr)#
Parameters:

expr (ListCreationExpression) –

Return type:

Any

visit_list_expansion_expression(expr)#
Parameters:

expr (ListExpansionExpression) –

Return type:

Any

visit_list_function_application_expression(expr)#
Parameters:

expr (ListFunctionApplicationExpression) –

Return type:

Any

visit_object_constant_expression(expr)#
Parameters:

expr (ObjectConstantExpression) –

Return type:

StateObjectReference | ListValue

visit_predicate_equal_expression(expr, feature=None, value=None)[source]#
Parameters:
Return type:

Any

visit_quantification_expression(expr, value=None)[source]#
Parameters:
Return type:

Any

visit_variable_expression(expr)#
Parameters:

expr (VariableExpression) –

Return type:

TensorValue | slice | StateObjectReference | ListValue | None | Tuple[TensorValue | slice | StateObjectReference | ListValue | None, …]

CONDITIONAL_ASSIGN_QUANTIZE = False#
property csp: ConstraintSatisfactionProblem#