Visualize Your Code

Fixed crash on analysis when editing an architecture with relative paths.

CODECHECK

Updated the CodeCheck treemap to allow users to double click on files and then open the "Results by File" tab and expand to that desired file with its associated violations expanded.

Update 3.2lineSpacingNotUsedInComments.upl to have the correct example displayed in the Description.

JAVA PARSER

Added 'anonymous' to the short kind for anonymous classes.

Fixed bug where anonymous classes had an 'implements' relation to a class type appearing in a 'new' expression. Now, an 'implements' relation is created if the type is an interface and an 'extends' relation is created if the type is a class.

WEB PARSER

For web/Javascript, fixed bug where the import of an index.js file using the path to the directory was not working correctly.

Sharing your Understand project definitions with your team members saves them from needing to setup all of the include paths, macros, file paths etc. An easy way to do that is by adding the project files to your version control system. However in the past the file size and frequency of change made it a little tricky. Now we’ve added new type of Understand project file that makes this a lot easier – the *.udx settings file. The udx settings file saves the project settings but none of the parse information, so it stays slim and trim and easy to share.

Everything about a project is stored in the udb project file, the project settings along with all of the details from the analysis. The new udx configuration files live side by side with the udb file and share the same name. As you can see there is a substantial size difference.

These udx files can be read from and written to manually or automatically, whatever works best for your team.

Manually

The File menu has a new Export/Import option that lets you manually write/read the project settings to/from the udx file for the currently opened project. There is also an option under the New menu for creating a new project file from a udx file. Note that the udb file is always created next to the udx file specified. The two files always need to be paired together.

Automatically

The options to automatically use the udx files are located in Tools->Options->General. If “Read” is checked then whenever the udx file is modified Understand will prompt you to reanalyze your project with the new configuration settings. If “Write” is checked then whenever the project configuration is changed then the .udx file will be updated to reflect those changes.

Walkthrough

As a possible use case let’s say you are the guru who sets up projects for everyone else and you want to setup a new project and share it with your team using git.

When sharing a project file, always make sure you have the correct portability options set so the files align on each users environment. I prefer to setup my project in the root directory of my source code and use relative paths.

Next go into Tools->Options->General and enable the “Write .udx export files automatically”option. This will create a new .udx file in the directory with the .udb file. Alternatively you can do it manually using the File->Export command

As a one time change add these lines to your .gitignore file to ignore the bigger udb files

# Understand project files
*.udb

Add the .udx file to git, then commit and push. Now whenever the other engineers pull the latest source they will get your udx settings file. Whenever you need to change the project configuration just commit the changes to this file as you would any other source file.

To create a new project with it the other engineers need to run git pull and then double click on the udx file or open Understand and select File->New->New UDX Project. That project will then stay up-to-date whenever they update git.

Function pointer support is available in Understand 5.0 when using the C/C++ Strict Parser. With this added support, Understand is providing the potential calls so that you can see the bigger picture.

This screenshot shows the Information Browser in Understand 4.0 on the left, and Understand 5.0 on the right, with the same project and the same function being viewed in each version. Understand 4.0 shows only a few calls, while Understand 5.0 is providing all of the possibilities with the added function pointer support.

This also translates to a better, more informative graphical view with the added function pointers. You can see in this next graph, all of the red dots on the nodes which signify the ability to expand the calls.

Notice that the same ‘dthash’ function, prior to function pointer support, only had 2 nodes that were expandable.

Looking at a few of the entities in this call graph, we expand the ‘cmpf’, ‘makef’, and ‘dthtab’ calls and see the potential calls available, noting that the function pointer calls are signified with the red dotted lines.

Here is the same graph available in Understand 4.0 prior to the function pointer support.

The interactive Cluster Call Graphs show the function call graph, organized by file. There are several variants of this graph: Call, Call-by, Butterfly and Internal Call. They can also be accessed from the function, class, file or architecture level. These graphs can all be accessed from the Graphical View right click menu for the entity.

Good news for teams using Codecheck, build 868 lets Codecheck ignore violation via comments in the code. This will allow teams to specify areas in the code where exceptions are permitted and specify the rationale. For example:

This will create a new rule in the Codecheck “Ignores List” to ignore all Codecheck violations on this line and add a note about the approval process. Those ignored violations can still be viewed in Understand, but are hidden by default.

Ignore rules can be created for: a specific line, a range of lines, a file, a specific entity, and a specific entity in a range of lines. They can also be made to ignore all violations or just violations of the specified type(s).

In an effort to make our APIs more consistent a few of the API files have been moved around with build 858. Your code may need to be updated to reflect these changes.

C API

udb.h, libudb_api.so, udb_api.dll and udb_api.lib have all been moved to bin\<OS>\C

Python API

The bin\pc-win64\python folder has been capitalized to bin\<OS>\Python

Custom Perl API

The Understand Perl library files have been moved up a level from bin\<OS>\Perl\STI\Maintain to bin\<OS>\Perl\STI
This will only affect users that are using the perl API with their own custom install of Perl 5.10.0, not those running scripts inside of Understand or using the uperl executable.