concepts.dsl.expression_utils#

Utilities for manipulating expressions.

Functions

find_free_variables(expr)

flatten_expression(expr[, mappings, ctx, deep])

Flatten an expression by replacing certain variables or function applications with sub-expressions.

get_simple_bool_predicate(expr)

If the expression is a simple bool (see is_simple_bool()), it returns the underlying predicate.

ground_fol_expression(expression, ...)

Ground the given FOL expression with the given variable mapping.

ground_fol_expression_str(expression, ...)

Ground the given FOL expression with the given variable mapping.

is_simple_bool(expr)

Check if the expression is a simple Boolean expression.

iter_exprs(expr)

Iterate over all sub-expressions of the input.

simplify_bool_expr(expr[, propagate_negation])

Simplify a Boolean expression.

split_simple_bool(expr[, initial_negated])

If the expression is a simple Boolean expression (see is_simple_bool()), it returns the feature definition and a boolean indicating whether the expression is negated.

surface_fol_downcast(expression_1, expression_2)

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

Classes