aeat.domain.calculations.registry._formula_initial_values module¶
Initial-value assembly for registry formula evaluation.
The ModeloRevision declares the
casilla and binding slots that seed
aeat.domain.calculations.registry._formula_runtime.calculate_registry_snapshot();
materialisation emits
CasillaObservation rows carrying
registry provenance.
See also
aeat.domain.calculations.registry._formula_runtimeRuntime caller that consumes the initial values and materialised observations produced here.
aeat.domain.calculations.registry._bindingsBinding helpers that resolve bound casilla values and equivalent binding groups before provenance materialisation.
aeat.domain.calculations.registry._bindings_previous_filingPrevious-filing selector model used to decide whether a missing bound slot is absent by design for the target period.
- materialise_observations(*, values, computed_provenance, casillas_by_id, absent_by_design_casilla_ids=frozenset({}))[source]¶
Project per-casilla runtime state into the canonical observation tuple.
Each returned
CasillaObservationis either preserved from computed provenance or rebuilt from aCasillaDefinitionlegal/source reference set.- Return type:
- Parameters:
computed_provenance (Mapping[CasillaId, CasillaObservation])
casillas_by_id (Mapping[CasillaId, CasillaDefinition])
absent_by_design_casilla_ids (frozenset[CasillaId])
- initial_values(revision, inputs, *, binding_values, target_period)[source]¶
Build initial numeric casilla values and absent-by-design markers.
The
ModeloRevisionsuppliesCasillaIdmembership, formula targets, andBindingIdslots before formula evaluation starts.
- initial_value_casilla_ids(revision)[source]¶
Return casilla ids seeded before registry formula evaluation.
Source-resolution preview passes can use this to distinguish declared or bound input slots from values that only exist after the formula engine runs. It is intentionally descriptive only; computed casillas still cannot be supplied through the input channel.
revisionis the compiledModeloRevisionwhose casillas are scanned for their declaredinput_kind.- Return type:
frozenset[TypeAliasType]- Parameters:
revision (ModeloRevision)
- binding_values_with_absent_by_design_defaults(revision, binding_values, *, target_period)[source]¶
Add structural zeroes for absent-by-design binding slots.
The
ModeloRevisionbinding declarations are inspected throughDataBindingDefinitionso previous-filing and relation-prefill slots can default only when the selected target period has no required source period.