|While developing software, your focus is usually on the current, latest version of your code. Much of Imagix 4D's functionality supports precisely this - understanding, analyzing, checking and documenting that single latest variant. But software doesn't instantly appear, and software development is a process. Versions evolve from predecessors. Branches expand the software to address new environments and different applications. Customizations lead to an excess of software snapshots. There are times when analyzing the differences between these versions of the code becomes important in overall project management. The knowledge can be essential to insure that latest changes conform with design intentions. Confirm functionality. Identify missing updates. Support code reviews. Focus test activities. Unique about Imagix 4D version comparisons is that they are created at the structural level, not as mere file diffs. Whether you're looking at different file revisions managed by a source control system, separate bodies of source code kept in parallel directory structures, or the same exact code compiled with different compile options, Imagix 4D's Delta Analysis functionality enables you to understand the impact of the source code differences at the level they are meaningful - in the control flow and overall architecture of your software. And the Delta Analysis results can be used to automatically generate checklists for the Review tool, so that you can apply automation to the process of reviewing and verifying your changes.|
Structural analysis of
source code differences
Architecture Level Diffs
Imagix 4D's Delta Analysis identifies structural differences between versions of your software. Identifying symbols unique to one version or the other, it also compares dependencies and usage of any symbols that are in both. The Subsystem Architecture diagrams indicate where these differences exist within the overall architecture of your software. At higher levels of abstraction, you can use the architecture metrics to review both the frequency and the density of these structural differences. And as you drill down in the diagrams, the actual differences themselves appear.
Indicates files, classes, functions and variables occuring:
- In revision project only
- In current project only
For systematically reviewing version changes, the Delta reports detail each structural difference in the members of a file or class. Functions and variables existing only in one version or the other are listed, as are symbols defined in both but having different dependencies or usage. For each listed member, every difference in the dependencies or usage is itemized. The reports are a particularly useful input for activities that require structured, methodical approaches, such as change impact reviews or test case development and refinement.
Tracks changes in structure:
- File or class membership
- File or class internal control hierarchy
- Dependencies of symbols
- Use of symbols
Visually reviewing the structural differences between versions works just like Imagix 4D's normal graphical analysis, sharing many of the advanced features such as database lookups, graphical querying and drill-down. In particular, the Analyzer feature contains queries specific for examining control flow changes under Delta Analysis. The graphs use colors to distinguish those symbols and dependencies that are specific to one version of the software or the other. Features exist to easily highlight and isolate the differences, speeding your examination.
Graph views include:
- Function Calls
- Function Calls with Variables
- Class Calls
- File Calls
- Subsystem Architecture
Although analyzing version differences at a structural level is what makes Delta Analysis powerful and unique, there are times when it's useful to drill down all the way and view the underlying source code differences. For this purpose, Imagix 4D includes a diff tool. Imagix 4D's tool combines the functionality normally found in a diff tool with the navigation and integration of Imagix 4D's file editor. The diff tool can be integrated with your source control management system, so you can automatically load and compare specific versions of source files.
Diff tool-like functionality:
- Automatic loading and comparison of both versions of source
- Side-by-side viewing
- Highlight diffs within line
- Find next / previous diff
- Specify SCM command line
- Load based on revision number
- Load based on revision timestamp
- Sample command line invocations for p4, cvs, etc.
With Imagix 4D's Delta Analysis, you can create a revision at any time. The revision stores information about your source code as currently characterized in your project. As you make project changes, by loading code from substitute directories, using alternative preprocessor settings, or simply evolving the source code itself, you can store further revisions. At any point, you can compare the current project to any of the stored revisions, and analyze the structural differences between the versions.
Potential varients for analysis:
- Different revisions along same source code branch
- Different branches from same source code base
- Same source code with different conditional compile flags
- Same source code incorporating different 3rd party libraries
- Same source code with header files from different compilers