Skip to Main Content Skip to Search
Product Documentation

Version 8.2 (R2011b) Polyspace for C/C++ Products

This table summarizes what's new in V8.2 (R2011b):

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

STD_LIB Check

Previously, if the arguments of a function that belonged to the C standard library were not valid, the software would generate a check within the corresponding stub in __polyspace_stdstubs.c. In addition, the check category (visible in the procedural entities view) did not indicate a link to the standard library.

Now, Polyspace supports a new check category STD_LIB, which allows easier review of run-time errors arising from standard library calls. For example, if a standard library function call does not contain valid arguments, the software generates a red STD_LIB check at the function call in your code. The check does not appear in __polyspace_stdstubs.c.

For more information, see Stubbing Standard Library Functions.

Compatibility Considerations.  Due to the introduction of the STD_LIB check, verification results may change when compared to previous versions of the software.

In addition, since the STD_LIB check has a different location and aggregates information from multiple checks, you cannot import review comments on standard library checks from previous releases.

For example, if you commented a check in the standard stubs using R2011a results, that comment is lost when you import comments from the R2011a results into R2011b results.

Enhanced MISRA-C Coding Rules Checker

The following improvements have been made:

For more information, see Checking Coding Rules.

Compatibility Considerations.  Due to the improvements to the MISRA C® coding rules checker, verification results may change when compared to previous versions of the software.

Review Orange Checks that are Potential Run-Time Errors

Previously, there were two modes in which you could review verification results — manual and assistant. For the manual mode, you set the Assistant slider to Off and the software displayed all orange checks (in addition to the red and green checks) . With the assistant mode, there were three levels of review — corresponding to settings 1, 2, and 3 of the Assistant slider. You could specify the number of orange checks to display through the Assistant Configuration tab in the Polyspace Preference dialog box.

Now, Polyspace allows you to review results at five different levels. You can set the Review slider to 0, 1, 2, 3, or All:

The Assistant Configuration tab is renamed the Review Configuration tab.

For more information, see Reviewing Results Systematically and Reviewing All Checks.

Display Sources of Orange Checks

The software identifies, where possible, code that is the source of orange checks and provides information about this code on the new Orange Sources tab. You can display this tab in the Run-Time Checks perspective, and see the following columns of information:

For more information, see Viewing Sources of Orange Checks.

With some orange checks, through this new tab, you can add or modify data range specifications to resolve the checks. See Refining Data Range Specifications.

Enhanced Automatic Orange Tester

Previously, you had to run the Automatic Orange Tester manually after the completion of a verification. Now, when you select the Automatic Orange Tester option

The Automatic Orange Tester now also supports the following options:

For more information, see Automatically Testing Orange Code.

No Gray Checks in Unreachable Code

The only gray checks that Polyspace generates now are UNR checks for unreachable branches of code. In addition, Polyspace generates the UNR check only at the highest level of a branch. You no longer see nested UNR checks , that is, UNR checks in sub-branches.

In addition, the software displays two new metrics for the project in the procedural entities view:

These metrics provide:

See Results Explorer Tab.

Compatibility Considerations.  Due to the removal of non-UNR gray checks and nested UNR checks, verification results may change when compared to previous versions of the software.

Global Variable Range Information

In the Variable Access pane, Polyspace displays range information for read and write access operations on global variables within each source file. Previously, the displayed value was the union of all access operations on the global variable within a file. The software did not display range information for individual operations. Now, for global variables that are integers (signed and unsigned) or floating point variables (float and double), Polyspace also provides range information for the individual access operations from which the union value is obtained.

See Variable Access Pane.

Read and Write Access in Dead Code

If a read or write access operation on a global variable lies within dead code, then Polyspace colors the operation gray in the Variable Access pane. When you examine verification results, you can hide these operations by clicking the new filter button . See Variable Access Pane.

Run All Verifications in Project

You can have many verifications within a project, each verification being associated with an active configuration. Previously, you could only run one verification at a time from the Polyspace verification environment (PVE). Now, if you select a project and click the button , Polyspace will run all verifications in the project. See Running a Verification.

Specifying Functions Not Called by Generated Main

You can now specify source files in your project that the main generator will ignore. Functions defined in these source files are not called by the automatically generated main.

Use this option for files containing function bodies, so that the verification looks for the function body only when the function is called by a primary source file and no body is found.

For more information, see Verifying a C Application Without a "Main" in the .Polyspace Products for C/C++ User's Guide.

Stubbing Specific Functions

You can now specify specific functions that you want the software to stub using the option Functions to stub (-functions-to-stub).

For more information, see Stubbing in the .Polyspace Products for C/C++ User's 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.

Cross-block Critical Sections.  In previous releases, the beginning and the end of a critical section must be in same block.

In R2011b, every kind of cross block critical section is supported. However, some constructs may raise a warning.

For example:

void foo(void) { 
    BEGIN_CS(); 

    for (;;) { 
       END_CS(); 
    } 
} 

Warning: Ending critical section cs in a loop in test.foo 

Function Pointers in extern const Structure Stubbed.  In previous releases, function pointers in extern const structures were not always stubbed, and could result in a COR error.

For example:

typedef struct { 
int a; 
void (*foo)(void); 
} AA; 

extern const AA aaa; 
extern  AA aaaa; 

extern const a; 
const b; 

void foo(void) 
{ 
int bb; 
bb = a; 
bb = b; 

bb = aaa.a; 
aaaa.foo(); 
aaa.foo(); 		//COR Error in previous releases
} 

In R2011b, every extern variable will be stubbed regardless of its qualifiers.

Pointers point to the Beginning of Allocated Objects.  In previous releases, a pointer in the generated main points anywhere in the allocated buffer, which could cause problems when using DRS.

Allocated objects now point at the beginning of the object.

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.

New MISRA-C Rules Supported.  The coding rules checker now supports the following MISRA-C Rules:

MISRA-C: Rule 1.1 Messages.  Message reported for violations of MISRA-C: Rule 1.1 has been improved.

MISRA-C: Rule 6.3 Improvements.  Enforcement of MISRA-C Rule 6.3 has been improved:

In previous releases, the coding rules checker reported a violation on the following code:

typedef struct TestData_tag { 

unsigned int  IsOK              :1; 
unsigned int  IsCounterOK       :1; 
unsigned int  IsNew             :1; 
unsigned int  UnusedBytes       :13; 

} TestData; 

void main(void) { 

TestData c; 

c.IsOK = 1; 
}

In R2011b, this syntax is allowed.

MISRA-C: Rule 17.6 Improvements.  Enforcement of MISRA-C: Rule 17.6 has been improved.

If the address of an object is assigned to another object that may persist after the first object has ceased to exist, a runtime error may occur.

In previous releases, the coding rules checker did not detect a violation in the following example:

extern int *vg; 
void provide( short int a ) 
{ 
   int v1; 
   v1 = a; 
   vg = &v1; 
} 

Changes to Analysis Options

New Options.  

OptionFor more information
Functions to stub
(-functions-to-stub)
Stubbing Specific Functions
-main-generator-files-to-ignoreSpecifying Functions Not Called by Generated Main
Maximum test time
-dynamic-execution-test-timeout
Enhanced Automatic Orange Tester
Maximum loop iterations
-dynamic-execution-loop-max-iteration
Enhanced Automatic Orange Tester
Number of automatic tests
-dynamic-execution-tests-number
Enhanced Automatic Orange Tester

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

New Name (R2011b)Previous Name (R2011a)Change
Stub complex functionsStub all functionsGUI name only
Dialect supportKeil/IAR supportGUI name only
-automatic-orange-tester -prepare-automatic-testCommand-line name and enhanced functionality

Deprecated Options

Polyspace Server for C/C++ Product

Running Multiple Verifications Simultaneously

If you purchase more than one license for a Polyspace server, you can now configure the server to run multiple verifications at the same time. This can improve the performance of server verifications.

To configure your server to run multiple verifications, open the Remote Launcher Manager, then set the Number of Polyspace verifications that can run simultaneously on this server to the number of licenses you have activated for your server.

For more information, see Configuring Polyspace Server Software in the Polyspace Installation Guide.

Compatibility Considerations.  If you configure your server to run more than one verification simultaneously, the server will not be able to run verifications using older versions of the software.

For example, if your server has both R2011a and R2011b software installed, you cannot run a verification using the R2011a software.

Polyspace Metrics

Review Changes between Results of Successive Verifications.  You can specify a version of a project and review only the differences between verification results of the specified version and the previous verification. See Review New Findings.

File Modules with Quality Levels.  If you have projects with two or more file modules in the Polyspace verification environment, by default Polyspace Metrics displays verification results using the same module structure. However, Polyspace Metrics also allows you to create or delete file modules. You can group files into a module and specify a quality level for the module, which applies to all files within the module. This feature allows you to specify different quality levels for your files in the review of verification results. See Creating a File Module and Specifying Quality Level.

Enhanced Graphs and Charts.  Polyspace Metrics displays enhanced graphs and charts.

If you specify a range of project versions:

If you specify a single version of a project, Polyspace Metrics displays file defect information, ordering the files according to the number of defects in each file. Use the new # items field to specify the maximum number of files for which information is displayed. See Displaying Metrics for Single Project Version.

  


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