Supervision tree extractor.
Analyzes modules that implement the Supervisor or Application
behaviour to extract child specifications, restart strategies, and
supervision structure.
Approach
Reads the module's attributes to detect @behaviour Supervisor or
use Application. For supervisors, inspects init/1; for application
modules, inspects start/2. Both paths scan the function's literal
table for child spec data. Since child specs are often built at compile
time and stored in the literal table, we can extract them without full
dataflow analysis.
Emitted facts
supervisor(mod, strategy, site)— module is a supervisor with given strategy;siteis the instruction ID of the call (or literal) that defines the tree — the strategy line — or"dynamic"when no such instruction was foundchild_spec_restart(mod, restart)— the restart the module's own child_spec/1 declarespost_start_call(func, site, callee)— a call made after a Supervisor.start_link in the same functionsupervisor_child(sup, position, child_mod, restart, type)— child specnamed_process(mod, name)— named process registration detected