Skip to main content

Module call_tree

Module call_tree 

Source
Expand description

Call tree analysis module for Calcit programs

This module extracts and analyzes the call tree structure of a Calcit program, starting from a specified entry point. It helps understand code dependencies and identify unused definitions.

Structs§

CallCountEntry
A single entry in the call count result
CallCountResult
Result of call count analysis
CallTreeAnalyzer
Call tree analyzer
CallTreeConfig
Configuration for call tree analysis
CallTreeNode
Represents a node in the call tree
CallTreeResult
Result of call tree analysis
CallTreeStats
Statistics about the call tree
UnusedDefinition
Represents an unused definition

Enums§

CallCountSort
Row order of a call count report.

Functions§

analyze_call_graph
Main entry point for call tree analysis
count_calls
Count calls from entry point
format_as_json
Format the call tree result as JSON for machine consumption
format_count_as_json
Format call count result as JSON
format_count_for_display
Format call count result for display
format_for_llm
Format the call tree result for LLM consumption
reachable_definitions
Collect non-core definitions statically reachable from roots. Besides the call-tree references, this follows alias/def and ns/def symbols so :as imports keep their targets reachable.