concepts.dsl.expression_utils.FlattenExpressionVisitor#
- class FlattenExpressionVisitor[source]#
Bases:
IdentityExpressionVisitor
Methods
make_dummy_variable
(variable)visit
(expr)The main entry point of the visitor.
visit_assign_expression
(expr)visit_bool_expression
(expr)visit_null_expression
(expr)- __init__(ctx, mappings, deep=True)[source]#
- Parameters:
mappings (Dict[FunctionApplicationExpression | VariableExpression, Variable | ValueOutputExpression])
deep (bool)
- __new__(**kwargs)#
- 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)
- Return type:
- visit_bool_expression(expr)[source]#
- Parameters:
expr (BoolExpression)
- Return type:
- visit_condition_expression(expr)#
- Parameters:
expr (ConditionExpression)
- Return type:
- visit_conditional_assign_expression(expr)[source]#
- Parameters:
expr (ConditionalAssignExpression)
- Return type:
- visit_conditional_select_expression(expr)[source]#
- Parameters:
expr (ConditionalSelectExpression)
- Return type:
- visit_constant_expression(expr)[source]#
- Parameters:
expr (Expression)
- Return type:
- visit_deictic_assign_expression(expr)[source]#
- Parameters:
expr (DeicticAssignExpression)
- Return type:
- visit_deictic_select_expression(expr)[source]#
- Parameters:
expr (DeicticSelectExpression)
- Return type:
- 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)[source]#
- Parameters:
expr (FunctionApplicationExpression | ListFunctionApplicationExpression)
- Return type:
- 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)#
- Parameters:
expr (NullExpression)
- Return type:
- visit_object_compare_expression(expr)[source]#
- Parameters:
expr (ObjectCompareExpression)
- Return type:
- visit_object_constant_expression(expr)[source]#
- Parameters:
expr (Expression)
- Return type:
- visit_predicate_equal_expression(expr)[source]#
- Parameters:
expr (PredicateEqualExpression)
- Return type:
- visit_quantification_expression(expr)[source]#
- Parameters:
expr (QuantificationExpression)
- Return type:
- visit_value_compare_expression(expr)[source]#
- Parameters:
expr (ValueCompareExpression)
- Return type:
- visit_variable_expression(expr)[source]#
- Parameters:
expr (VariableExpression)
- Return type: