Groups and Views in Call-Hierarchy Graph
Overview
Automatic Group Creating
User-Defined Groups
Select Available Items
Built-in Views
User-Defined Views
Using Views in the Graph
Overview
A software project may contain from tens to thousands of functions and data items. Functions call each other, transfer parameters, return results and change or uses global data. In a project the number of such interactions can be very high and difficult to monitor. DA-C offers you groups and views in Call-Hierarchy Graph as a useful tool for understanding project design.
Groups can contain functions and/or data. DA-C independently creates a certain number of groups to facilitate your work, but also leaves you with the possibility of defining them yourself. Groups can contain other groups and in this way you can create a hierarchy.
You use views to create a logical view of a particular graph. The emphasis can be on a part of the project with detailed display with the rest displayed only in rough wholes, interfaces. View elements are groups or other views.
Example of graph with applied view
For example, you define a group, "Kernel", which groups functions and data from the kernel subsystem and another group, "IO subsystem",
which groups input-output functions and data. The view containing both groups will then display in graph relation and correlation of these two subsystems and other parts of the project.
Automatic Group Creating
It is possible to view project design at various levels of detail in accordance with needs and interests. Sometimes you may want to view Call-Hierarchy details and from which modules the data used or changed by functions from the graph are. At other times, you may want to view only the connection between two modules in order to clarify the hierarchy.
That is why DA-C create groups to satisfy any approach to studying the project.
Four groups are formed for each project module.
1) A group containing functions from the module
2) A group containing module global (static) data from the module
3) A group containing global and module global data from the module
4) A group containing functions, global and module global data from the module
Apart from these module groups, the following groups are also formed at project level.
1) A group containing all global project functions
2) A group containing all global and module global data from the project
3) A group containing all project library functions
4) A group containing all project library data.
Groups formed according to one of these two systems contain only functions and/or data from a single module or from the entire project. With large projects, it is highly likely that program modules are grouped by directory. DA-C enables you to use this organization to create groups of a higher logical level.
You can see folder hierarchy in the Project Window. An important criterion for graph groups is the layout of program modules by folder (Default (folders)).
For each folder belonging to the project (subfolder of the Default folder (folders)) four groups are formed:
1) A group containing functions, global and module global data defined in folder modules
2) A group containing global and module global data defined in folder modules
3) A group containing module global (static) data defined in folder modules
4) A group containing all functions defined in folder modules
These groups contain module level groups according to type.
User-Defined Groups
For your own groups start the Graph / Group and Views / Groups command, and use the Group Manager dialog as described in "Groups and Views / Groups"
Select Available Items
The Fill available list with and Type of groups drop-down lists are used to display groups of a particular type on the Available items list and in this way facilitate browsing.
Type of groups - Select items
The following table shows the possible combinations of values for Fill available list with and Type of groups lists.
Table 2: Filling in the Available items in the Group Manager dialog
Fill available items with
Type of groups
Available items
Basic symbols
Functions
All project functions
Data
All global and module global project data
Library functions and data
All library functions and data
Project functions and data
All functions (public, static, library) and all global and module global data
Module level groups
Functions and data
Functions and global and module global data from the module
Functions
Only functions from the module
Static data
Only module global data
Data
Global and module global data
Directory level groups
< empty >
Groups:
– functions and global and module global data from the directory
– only functions from the directory
– only module global data from the directory
– global and module global data from the directory
Logical groups
< empty >
Same as for Directory level groups
Project level groups
< empty >
Groups:
– library functions used in the project
– library data used in the project
– all project functions
– all global and module global project data
User-defined groups
< empty >
Groups which you have previously defined
Groups formed in the Project Explorer Logical View tab are treated like Directory level groups.
Group names are formed by adding suffixes to module or file names in accordance with group type and they differ graphically in the graph.
Suffixes are formed according to the following table:
Table 3: Names of predefined groups
Suffix
Group content
...functions
Only functions from the module / file
...static data
Only module global data from the module / file
...data
Global and module global data from the module / file
No suffix
Functions, global and module global from module / file
This means that if there is a module called "kernel.c" four groups will be formed: "kernel.c functions", "kernel.c static data", "kernel.c data" and "kernel.c".
Built-in Views
There are several views which DA-C create automatically. These views as well as those which you create yourself can be used to view various aspects of your project design.
In the following table you have a list of views which are formed automatically.
Table 4: Predefined views
View name
Description
Data access - grouped (Default)
Functions are not grouped while all global and module global data are grouped in a single group. By applying this view you can view which project functions are used or change global data.
Data access by modules (D)
Functions are not grouped and global and module global data are grouped according to module. By applying this view you can view in which modules the data joined by the functions expanded in the graph reside.
Function - Data interaction - grouped (D)
Functions are grouped by module, and all global and module global data are in a single group. The view gives some idea of relations between program modules and global data.
Function - Data interaction by modules (D)
Functions are grouped by module, and in separate groups global and module global data are also grouped by module. The view gives some idea about the design, relations between functions and data by module.
Modules interaction (D)
For each module a group containing functions and global and module global data from the said module was formed. The view gives some idea of relations between project program modules.
Apart from the understood views, DA-C offers application of views based on logical groups defined in the Project Explorer Logical View tab. Initially the views Default (folders)\ and Default (folders)\functions are predefined. As you create your groups in Project Explorer, you will be able to apply them as views in the graph.
User-Defined Views
For your own views start the Graph / Group and Views / Views command, and use the View Manager dialog as described in "Groups and Views / Views"
Using Views in the Graph
There are two ways to use views. The first way is to open a new graph on the basis of a defined view. Groups which you have defined in the view are displayed in the graph and are connected by graph branches which exist only between function nodes and data nodes located in groups. If you have defined a group so that it has hidden status, then it will be connected by branches to the rest of the graph.
Let us say that you have created the view "User interface relations" which has as its goal to monitor relation of functions and data from the part of the user interface with functions and data from kernel and the part for process control. Your view contains three groups: "Process control" , "Kernel", and "User interface".
By activating the command from the Graph / Use View menu, you open the dialog in figure. Select the corresponding view from the list and click OK. A new graph is opened in DA-C. In a Call-Hierarchy Graph opened in this way, there are group nodes which appear in the selected view. Between the group nodes are the graph branches which appear between the functions and data members of these groups.
This DA-C option provides you with a view of relations between the larger logical wholes-subsystems in your project. The operations which you have at your disposal in the graph enable you to expand the graph and see more detail.
Another way is applying views to an open graph. This can be accomplished by starting the Graph / Apply View command.
In figure you can see an example of an open graph in DA-C with around fifteen function and data nodes and their correlation. If you apply the "User interface relations" view, group nodes from the view will appear on the graph. All functions and data from the graph which belong to groups from the view will be located in them. Functions and data which do not belong to any of the groups from the view will remain in the graph independently. Graph branches connect group nodes which have appeared in the graph and data and function nodes which have remained outside the groups. In this way you can see relation of the "User interface" subsystem with other subsystems of the project and "independent" nodes which have remained in the graph.
Regardless of whether a view has been applied to an existing graph or whether a graph has been opened on the basis of a view, node expansion operations behave differently compared to when a view has not been applied. Newly added nodes created by these operations which belong to groups from the applied view stay within the group nodes, that is, they do not appear in the graph. Branches connecting the other nodes with the newly added ones end or begin in a group node. Nodes which do not belong to any group from the view appear independently in the graph.
Very often in projects you encounter a situation in which certain functions are often called from different modules. These functions can burden the graph with a large number of branches leading to them. Hidden groups solve this problem as the nodes within them remain "unconnected" with the rest of the graph. This means that hidden groups are visible in the graph but in the form of "isolated" nodes.
Copyright © 1993-2022, RistanCASE PR