aeat.domain.calculations.registry._validate_formulas module

Formula expression and dependency graph validation helpers.

Validates formula expressions and the DAG formed by formula targets declared on a ModeloRevision, checking casilla, binding, parameter, and relation reference closure and detecting cycles.

See also

aeat.domain.calculations.registry._runtime_graph.expression_casilla_refs()

Formula-expression walker used to derive target dependencies.

aeat.domain.calculations.registry._runtime_graph.formula_evaluation_order()

Runtime topological order builder that assumes this validator has rejected cycles.

validate_formula_dag(scope, revision)[source]

Return dependency-cycle failures for a revision’s computed formulas.

The ModeloRevision supplies formula targets and expressions. Only dependencies that point at another computed target participate in the DAG; registry membership and reference existence are handled by validate_formula_expression().

Return type:

list[str]

Parameters:
validate_formula_expression(scope, formula_id, expression, *, casillas, bindings, parameters, relations)[source]

Return reference-closure failures for one formula expression tree.

The FormulaExpression may refer to CasillaId, BindingId, parameter, and RelationId values. This recursive validator keeps every nested expression node inside the selected revision’s declared id sets.

Return type:

list[str]

Parameters: