Call Hierarchy in Polyspace Desktop User Interface
This topic focuses on the Polyspace® desktop user interface. To learn about the equivalent pane in the Polyspace Access web interface, see Call Hierarchy in Polyspace Access Web Interface.
The Call Hierarchy pane displays the call tree of functions in the source code.
For each function
foo, the Call Hierarchy pane
lists the functions and tasks that call
foo (callers) and those called by
foo (callees). The callers are indicated by (functions) or (tasks). The callees are indicated by (functions) or (tasks). The Call Hierarchy pane lists
direct function calls and indirect calls through function pointers. The indirect calls are
shown with the icon. Calls that are unreachable are shown with the function
name in grey.
To open this pane, in the Polyspace desktop user interface, select the button on the Result Details pane.
To update the pane:
You can click a run-time check, either on the Results List or Source pane. You see the function containing the check with its callers and callees.
You can click a function name in your source code. You see the callers and callees of the function. If the function name also shows a run-time check color, instead of clicking the function name, right-click the name and select Go To Definition.
In this example, the Call Hierarchy pane displays the function
generic_validation, and its callers and callees.
The line number in the Call Hierarchy pane refers to a different line in the source code:
For the function name, the line number refers to the beginning of the function definition. The definition of
generic_validationbegins on line 69.
For a callee name, the number refers to the line where the callee is called. The callee
functional_rangesis called by
generic_validationon line 86.
For a caller name, the number refers to the line where the caller calls the function. The caller
generic_validationon line 50.
To navigate to the call location in the source code, select a caller or callee name
In the Call Hierarchy pane, you can perform these actions.
Show or Hide Callers and Callees
Customize the view to display callers only or callees only. Show or hide callers and callees by clicking this button:
Navigate Call Hierarchy
You can navigate the call hierarchy in your source code. For a function, double-click a caller or callee name to navigate to the caller or callee definition in the source code.
Determine if Function is Stubbed
You can determine from the Stubbed column if a function is stubbed. The entries in the column show why a function was stubbed.
Automatic: Polyspace cannot find the function definition. For instance, you did not provide the file containing the definition.
User specified: You override the function definition by using the option
Functions to stub (-functions-to-stub).
Lookup table: You verify generated code with functions that return values from specific kinds of lookup tables. You use the option
Generate stubs for Embedded Coder lookup tables (-stub-embedded-coder-lookup-table-functions).
Std library: The function is a standard library function. You do not provide the function definition explicitly in your Polyspace project.
Mapped to std library: You map the function to a standard library function by using the option
For more information, see Assumptions About Stubbed Functions.
See Entire Call Hierarchy of Program
To see the entire call hierarchy of your program, on the Source
pane, click the
main function. Right-click a node in the call hierarchy
and select Expand All Nodes.
Instead of seeing the entire call hierarchy at once, you can expand nodes as needed to focus on a specific slice of the call hierarchy.