Skip to Main Content Skip to Search
Product Documentation

Version 8.1 (R2011a) Polyspace for C/C++ Products

This table summarizes what's new in V8.1 (R2011a):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known Problems
Yes
Details below
Yes—Details labeled as Compatibility Considerations, below. See also Summary.Includes fixes:
Polyspace Client for C/C++ Bug Reports
Polyspace Server for C/C++ Bug Reports

New features and changes introduced in this version are organized by product:

Polyspace Client for C/C++ Product

Code Metrics (New for C++)

Code metric support, including cyclomatic number and other HIS metrics.

Polyspace verification can now generate metrics about code complexity, which are based on the Hersteller Initiative Software (HIS) standard.

These metrics include:

When you run a verification with the -code-metrics option enabled, you can view software quality metrics data in the Polyspace Metrics Web interface (Code Metrics view), or by running a Software Quality Objectives report from the Polyspace verification environment.

The software generates numeric values or pass/fail results for various metrics.

For more information, see Software Quality with Polyspace Metrics in the Polyspace Products for C/C++ User's Guide.

Saving Polyspace Metrics Review

Previously, when you saved your project (Ctrl+S) after a review of results from Polyspace Metrics, the software would save your comments and justifications both locally and in the Polyspace Metrics repository.

Now, if you save your project (Ctrl+S), the software saves your review to a local folder only. A new button is available on the Run-Time Checks toolbar. If you click this button, the software saves your comments and justifications to a local folder and the Polyspace Metrics repository.

This feature allows you to upload your review to the repository only when you are satisfied that your review is, for example, correct and complete.

You can still configure your software to display the previous behavior.

For more information, see Saving Review Comments and Justifications in the Polyspace Products for C/C++ User's Guide.

Compilation Assistant

New Compilation Assistant to ease project configuration (cross-compiler settings).

The Compilation Assistant allows you to check your project for compilation problems before launching a verification. The Compilation Assistant then:

For more information, see Checking for Compilation Problems in the Polyspace Products for C/C++ User's Guide.

Improved Search Function

Enhanced search functionality in the Run-Time Checks perspective allows you to perform a search in several views at once (call hierarchy, variable access, run-time checks and source code), and provides search results in a single "Search" view.

For more information, see Searching Results in Results Manager Perspective in the Polyspace Products for C/C++ User's Guide.

Back to Source Function in Run-Time Checks Perspective

Improved navigation from the Run-Time Checks perspective to the source code containing a check.

You can now right-click a check in your verification results, and open the source file containing that check.

You can configure the software to open source files in either a text editor, or your IDE.

For more information, see Configuring Text and XML Editors in the Polyspace Products for C/C++ User's Guide.

Structure Fields in Data Dictionary

Distinction of variable fields in the Data Dictionary provides a more accurate Data Dictionary.

The enhanced Data Dictionary:

For more information, see Variable Access Pane in the Polyspace Products for C/C++ User's Guide.

Overflow Check Customization

New options allow you to customize how OVFL checks are handled during verification. You can customize computation through overflow constructions, control the presence of overflow checks, and the dynamic behavior in case of a run-time error.

These options allow you to:

For more information, see Detect overflows on (-scalar-overflows-checks) and Overflows computation mode (-scalar-overflows-behavior) in the Polyspace Products for C/C++ Reference.

Compatibility Considerations.  The option -detect-unsigned-overflows (available in previous releases) has been renamed. To achieve the same behavior as the previous option, specify the new option -scalar-overflows-checks signed-and-unsigned.

When using the new options, your verification results may change when compared to previous versions of the software. Some checks may change color, and the Selectivity rate of your results may change.

Main Generator Improvements

Enhanced main-generator to improve verification results for generated code.

The new main-generator allows you greater control over the behavior of the generated main. New options allow you to generate a main specifically designed for cyclic programs, to support generated code and Model-Based Design. This improves verification results at the subsystem level.

The generated main now has the following behavior:

  1. It initializes any variables identified by the option -variables written-before-loop.

  2. It calls any functions specified by the option -functions-called-before-loop. This could be considered an initialization function.

  3. It initializes any variables identified by the option -variables written-in-loop.

  4. It calls any functions specified by the option -functions-called-in-loop.

  5. It calls any functions specified by the option -functions-called-after-loop. This could be a terminate function for a cyclic program.

For more information, see Automatically Generating a Main in the Polyspace Products for C/C++ User's Guide.

Compatibility Considerations.  Due to precision improvements, verification results may change when compared to previous versions of the software. Some checks may change color, and the Selectivity rate of your results may change.

In addition, several Analysis options have been renamed to support the new main generator.

Previous Name (R2010b)New Name (R2011a)
-main-generator-writes-variables-variables-written-before-loop
-function-called-before-main-function-called-before-loop
-main-generator-calls-functions-called-in-loop

If you have any scripts that use the old options, update them to reflect the new names.

Verification Time Limit

You can now specify a time limit for verifications using the -timeout option. If the verification does not complete within the specified time, the verification fails.

For more information, see Verification time limit (-timeout) in the Polyspace Products for C/C++ Reference.

Continue Verification with Compile Errors

You can now specify that a verification continues even if some source files do not compile, using the option -continue-with-compile-error.

Functions that are used but not specified are stubbed automatically.

If a source file contains global variables, you may also need to select the option -allow-undef-variables to enable verification.

For more information, see Continue with compile error (-continue-with-compile-error) in the Polyspace Products for C/C++ Reference.

Precision Improvements

Improved precision on arrays and functions, resulting in less orange checks.

The precision improvements effect:

Compatibility Considerations.  Verification results may change when compared to previous versions of the software. Some checks may change color, and the Selectivity rate of your results may change.

Permissive Mode Set By Default

Permissive verification mode is now set by default for new projects. This reduces the number of compilation errors for verifications launched with default settings.

The following options are now set by default:

If you want to use stricter compilation settings, you can select them in the project configuration.

Compatibility Considerations.  When using the default options, your results may change when compared to previous versions of the software. Some checks may change color, and the Selectivity rate of your results may change.

Default Project Location

On Windows systems, the default project location has changed.

The default project location is now in My Documents. Previously, the default location was defined in the user profile.

Variable Range Inconsistency between Variable Access Pane and Tooltips

The range given for a variable in the Variable Access Pane (Variables View) can differ from the range given by tooltips on the reads of a variable in the Source code view. The range provided by the tooltip will be wider than the range given in the Variables View.

This difference is due to imprecision in the tooltip. The Variables View provides the correct range for the variable.

For example:

In this case, [0..4000] is the correct range. The tooltip range is caused by imprecision that may be fixed in future releases.

Visual Studio Integration

New Visual Studio® import tool allows you to automatically extract some Polyspace settings from a Visual Studio project file.

This tool can help you:

For more information, see Importing Visual Studio Project Information into Polyspace Project in the PolySpace® Products for C++ User's Guide.

Product Name Change in Files and Folders

The Polyspace product name has changed from "PolySpace" to "Polyspace" in R2011a. This change impacts the name of all files and folders created by the software.

For example:

Compatibility Considerations.  If you have existing folders that use the previous product name (for example, PolySpace/PolySpace_Common) the R2011a installation will continue to use these existing folders. However, any files or folders created during or after installation will use the new name.

If you have any shortcuts or scripts that are case-sensitive, you should update them to use the correct name.

Visual Studio Support

Added support for Microsoft® Visual Studio 2010.

For more information, see the Polyspace Installation Guide.

Eclipse IDE Support

Added support for Version 3.6 of the Eclipse IDE.

For more information, see the Polyspace Installation Guide.

License Manager Support

The License Manager for Polyspace products has been upgraded to FLEXnet® 11.9.

You may need to upgrade your FLEXnet server and daemon.

For more information, see Polyspace License Installation in the Polyspace Installation Guide.

Changes to Verification Results

Compatibility Considerations.  Verification results may change when compared to previous versions of the software. Some checks may change color, and the Selectivity rate of your results may change.

Refer to the following sections for information on the specific changes.

Certain COR Checks Changing to OVFL.  In previous releases, certain types of overflow errors were reported as COR checks instead of OVFL checks. For example:

typedef long int32; 
extern int32 random(void); 


int32 func(int32 a, int32 b) 
{ 
int32 res = 0; 
if (random()) { 
res =  a/b; 			// COR changing to OVFL in R2011a 
} 
return res; 
} 

These checks are now reported as OVFL, which will impact check statistics when compared to previous releases.

COR Checks on Function Pointer.  In previous releases, verification reported a COR check on function pointer when the parameter type of function pointer is void*. For example:

typedef void (*func)(void*); 

void foo(int *p) { *p=1; } 

void bar(void) 
{ 
int a; 
func A = foo; 
A(&a); 
} 

In R2011a, verification considers that type void * is compatible with all other pointer types.

This may result in changes to the color of COR checks. The Call graph may also been impacted. It can also have an impact on performance and precision (more calls considered).

NIV Check on Local Volatile Variables.  The behavior of NIV checks for local volatile variables has changed.

In previous releases, the NIV for a local volatile variable was always orange. In R2011a, verification allows local volatile variables to behave just like other variables – if they are initialized in the code, the NIV is green.

Polyspace verification considers that the hardware can bring a value (so NIV cannot be red) but will not de-initialize. Therefore, if the variable is initialized by the code, it is green.

OVFL Checks on Assignment.  By default, verification no longer reports OVFL checks on assignment, for example:

uc = ~uc;

The total number of checks in your results may change when compared to previous releases.

If you want the verification to report these types of checks, you can use the option -detect-overflows-on-operator-not to retain the previous behavior.

Precision Improvements for NIV Checks.  Improved precision on NIV, NIVL, NIP, and IRV checks.

Precision Improvements on Arrays and Functions.  Improved precision on arrays and functions.

Compilation Errors for Classes without Constructors.  In previous releases, a compilation error occurs when you use the options -unit-by-unit or -class-analyzer all on source code containing classes with no user defined or compiler generated constructor.

In R2011a, this behavior changes as follows:

Changes to Coding Rules Checker Results

Compatibility Considerations.  Due to changes in the coding rules checker, the number of coding rule violations may change when compared to previous versions of the software.

Refer to the following sections for information on the specific changes.

MISRA C Rule 12.1 – Parentheses for Operand of Unary Operator..  In previous releases, the coding rules checker could incorrectly report a violation of MIRSA C Rule 12.1 for the operand of a unary operator. For example:

Y1 =  (U1 * U2) -0.366;  				// Passes 12.1 
Y2 =  (-1 * (0.366)) + (U1 * U2);   // Fails 12.1 
Y3 =  -0.366 + (U1 * U2); 				// Fails 12.1
4 = 0.366 + (U1 * U2); 					// Passes 12.1

The MISRA rule states that parentheses are not required for the operand of a unary operator.

The number of violations of Rule 12.1 may decrease when compared to previous releases.

Single Rule Violation Reported Multiple Times.  In previous releases, Polyspace Metrics could report more than one violation of a single coding rule in the same location. This occurred when the message of a rule violation was modified, and the same results were uploaded to the Metrics database multiple times.

In R2011a, messages for rule violations that have the same ID and the same location are merged into a single message of only one rule violation

Therefore, the total number of rule violations may be lower in R2011a than in previous releases.

Changes to Analysis Options

New Options.  

OptionFor more information
Variables written in loop
(-variables-written-in-loop)
Main Generator Improvements
Functions called after loop
(-functions-called-after-loop)
Main Generator Improvements
Overflow computation mode
(-scalar overflows-behavior)
Overflow Check Customization
Continue with compile error
(-continue-with-compile-error)
Continue Verification with Compile Errors
Verification time limit
(-timeout)
Verification Time Limit

Changes to Existing Options.  The following options have been renamed in R2011a.

New Name (R2011a)Previous Name (R2010b)Change
Target operating systemOperating system target for PolySpace stubsGUI name only
Ignore assembly codeDiscard Assembly codeGUI name only
Allow non int types for bitfieldsAllow non-ANSI/ISO C-90 types of bitfields GUI name only
Allow undefined global variablesContinue even with undefined global variablesGUI name only
Ignore overflowing computations on constantsPermits overflowing computations on constantsGUI name only
Allow anonymous unions/structure fieldsAllow un-named Unions/StructuresGUI name only
Allow negative operand for left shiftsDo not check the sign of operand in left shiftsGUI name only
Ignore missing header filesNo error on missing header fileGUI name only

Variables written before loop

(-variables-written- before-loop)

Write accesses to global variables

(-main-generator- writes-variables)

GUI and command-line name

See Main Generator Improvements

Functions called before loop

(-functions-called- before-loop)

First functions to call

(-function-called- before-main)

GUI and command-line name

See Main Generator Improvements

Functions called in loop

(-functions-called-in-loop)

Function calls

(-main-generator-calls)

GUI and command-line name

See Main Generator Improvements

Detect overflows on

(-scalar-overflows-checks)

Detect overflows on unsigned integers

(-detect-unsigned- overflows)

Functionality change

GUI and command line name

See Overflow Check Customization

In addition, the default settings for some Permissive options have changed.

Deprecated Options.  None.

Polyspace Server for C/C++ Product

Code Metrics (New for C++)

Code metric support, including cyclomatic number and other HIS metrics.

Polyspace verification can now generate metrics about code complexity, which are based on the Hersteller Initiative Software (HIS) standard.

These metrics include:

When you run a verification with the -code-metrics option enabled, you can view software quality metrics data in the Polyspace Metrics Web interface (Code Metrics view), or by running a Software Quality Objectives report from the Polyspace verification environment.

The software generates numeric values or pass/fail results for various metrics.

For more information, see Software Quality with Polyspace Metrics in the PolySpace Products for C++ User's Guide.

Saving Polyspace Metrics Review

Previously, when you saved your project (Ctrl+S) after a review of results from Polyspace Metrics, the software would save your comments and justifications both locally and in the Polyspace Metrics repository.

Now, if you save your project (Ctrl+S), the software saves your review to a local folder only. A new button is available on the Run-Time Checks toolbar. If you click this button, the software saves your comments and justifications to a local folder and the Polyspace Metrics repository.

This feature allows you to upload your review to the repository only when you are satisfied that your review is, for example, correct and complete.

You can still configure your software to display the previous behavior.

For more information, see Saving Review Comments and Justifications in the Polyspace Products for C/C++ User's Guide.

Automatic Comment Import for Server Verifications

When you download results from the Polyspace server, the software now automatically imports any comments from results in the destination folder into the downloaded results (except for verifications using the option -add-to-results-repository).

As a result of this change, you can now download intermediate results for a verification running on the Polyspace server, and add or edit comments on those results. When you later download the final results, your comments are preserved.

You can also download and comment on a single unit of a unit-by-unit verification, even if other units are still pending in the server queue. When you download the final results (which overwrites the earlier results), your comments are preserved.

License Manager Support

The License Manager for Polyspace products has been upgraded to FLEXnet 11.9.

You may need to upgrade your FLEXnet server and daemon.

For more information, see Polyspace License Installation in the Polyspace Installation Guide.

  


 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS