Skip to main content

Module transitive

Module transitive 

Source
Expand description

Transitive effect propagation.

Given declared effects per symbol and a call graph (callees edges), compute each symbol’s transitive effects — the union of declared effects across its callees, recursively, with via chains pointing at the immediate callee that surfaced each effect.

Computed per strongly connected component of the call graph (see transitive_effects), so every member of a call cycle gets the same, complete answer whatever order the symbols are visited in.

Functions§

declared_effect_blast_radius
Per-declarer transitive blast radius, derived entirely from the stored transitive data written by propagate_transitive — no call-graph reachability is recomputed here.
propagate_transitive
Compute transitive effects for each symbol in symbol_ids and write them back via effects.put_effects(...). Returns the count of symbols whose EffectDecl.transitive actually changed.
transitive_effects
Each of symbol_ids with its transitive effects: every effect category reachable through a callee — declared by the callee or by anything it reaches — with the direct callees it is reachable through (via), minus the categories the symbol declares itself. Sorted by effect, then via.