Super Project Analyzer

Pro and Enterprise Edition only

Combine several analyses. Super Project Analyzer combines several analyses to find code that's left dead by all the analyses, and also to find shared code.

A super project is a collection of ordinary Visual Basic projects that share some source code files.

A super project is not the same as a project group (.vbg) or a solution (.sln). These are groups of projects that usually call each other. Super Project Analyzer does not analyze calls between projects. For that purpose, use multi-project analysis. In most cases, multi-project analysis is a better way to detect dead code than Super Project Analyzer. Differences

When do you need Super Project Analyzer?

One file in several projects. When a source code file is included in several projects, it is impossible to tell if a procedure is dead or alive without looking at all of the projects. Super Project Analyzer takes the output of several analyses and forms a general picture of what can be removed and what cannot. If you have the Enterprise Edition, you can also do a multi-project analysis to accomplish this goal.

Super Project Analyzer can also prove useful in some special cases.

Mutually exclusive compiler directives. If you use compiler directives (#If..Then..#Else..#End If) to produce several programs out of the same code, a normal single analysis may not be enough. That's because Project Analyzer ignores the false branches of the compiler directives, and the results remain incomplete. In this case, analyze the code under all the different compiler directive settings and save the results for Super Project Analyzer. — If your compiler directives allow a configuration where there are only True branches, or just a few False branches, you're better off. In this case, you might not need Super Project Analyzer. Instead, define the compiler constants so that most brances evaluate to True. This way you get the most complete picture.

Multi-project analysis, reference depends on project. This case applies to a multi-project analysis where a single source file belongs to several projects. If the calls from that file go to a different places depending on the project the file is in, Project Analyzer will find calls based on one project only. Example. You have 2 projects. Both of them define a different constant named APP_TITLE, with values "Standard Program" and "DeLuxe Program". Both of the projects also contain the same file library.bas, which uses the value of APP_TITLE. Now, APP_TITLE in library.bas means a reference to 2 constants, depending on the project. Multi-project analysis will detect just one reference, and the other APP_TITLE may look dead. In this case, analyze the projects separately and and use Super Project Analyzer to combine the results.

How to run Super Project Analyzer

Saving the data

First you need to save some data. Don't open Super Project Analyzer yet! Analyze a couple of projects with Project Analyzer as you would normally do. After each analysis, save the results with the menu command Save data for Super Project Analyzer in the Pro menu. This will create a .sud (Super Project Data) file for each analysis. This file includes information on the files, procedures, variables, constants, Types and Enums used in that analysis.

Exposed code. When saving a .sud file, Project Analyzer may ask the following question: "This analysis found code that is exposed to other projects. If this code is not in use, would you like to mark it dead?" Here are the alternative answers:

Combining the data

After saving a minimum of 2 .sud files, start Super Project Analyzer by pressing F5. Open the .sud files via the Project menu by choosing the Add project command. You can now see all the files, procedures, variables, constants, Types and Enums combined.

Viewing the results

It is important to understand the terminology before using the results.

Included vs. usedIncluded in projects
12 or more
Used in projectsNoneDeadShared but dead
1 or moreLiveShared and live

File list

The file list contains all the files in the analyzed projects.

Notice that being included does not necessarily indicate that the file is actually used by the project. Unused file analysis is not available in Super Project Analyzer. You can remove any unused files with Project Analyzer without the use of Super Project Analyzer.

Other lists

The procedure list and the variables, constants, Types & Enums list contain the actual results of a super project analysis. The following columns are included.


You can see two checkboxes in the Super Project Analyzer window. These checkboxes limit the amount of data shown in the list.


You can find reports in the Reports menu.

Report what you see. To get a report on what you currently see listed on the screen, select Report what you see. This report includes the current list contents with the present options.

Reuse report gives reuse ratios. This report includes reuse ratios for modules, procedures, variables & constants and Types & Enums by project and for the whole super project as well.

File reuse = Shared files / All files in super project

Procedure reuse = Shared procedures / All procedures used in super project
(thus excluding dead ones)

Var & const reuse = Shared vars & consts / All vars & consts read in super project
(thus excluding ones that are dead or that are only written to)

Type & Enum reuse = Shared Types & Enums / All Types & Enums used in super project
(thus excluding dead ones)

Super report lists which file, procedure, variable, constant, Enum or Type is used in which project. The report looks best when either printed or taken in HTML or PDF format. Each item is marked as follows:

.=Not included in project. The item is not part of a project at all.
I=Included in project. The item is included in a project, but its deadness status is unknown.
L=Live in project. The item is included and used in a project.
D=Dead in project. The item is included in a project but not used in it.
$=Reused in 2 or more projects.
†=Dead in all projects. This mark indicates code that you can potentially delete, because it is not required by any of the analyzed projects.

Saving a Super Project definition

To save a Super Project definition to a .sup file, use the File|Save Super Project menu command. You can later open this file rather than opening each .sud file separately. - In addition to the .sup file, you will need to have the saved .sud files in order for the analysis to work. The .sup file only includes the file names of those .sud files.

Super Project Analyzer file types

A .sud (Super Project Data) file contains information about files, procedures, variables, constants, Types and Enums. By loading in several .sud files Super Project Analyzer can tell which ones are used in which projects.

A .sup (Super Project Definition) file is simply a list of .sud files to load.

Details and limitations

Shared filename feature. If two files have the same filename, but they reside in different directories, they are treated as if they were the same file. This allows you to have 2 copies of the same file while keeping Super Project Analyzer working correctly.

Super Project Analyzer works with source code files only. It does not handle any COM or binary files.

VB.NET Structures are not analyzed while VB Classic Types are.

Demo limitation. The free demo version of Super Project Analyzer can handle analyses with less than 10 source files per project. This is a project-level limit, the full super project can have more files.

©Aivosto Oy - Project Analyzer Help Contents