| Contents | Index |
In Polyspace software, a project is a named set of parameters for verification of your software project's source files. A project includes:
Source files
Include folders
One or more configurations, specifying a set of analysis options
One or more modules, each of which include:
Source (specific versions of source files used in the verification)
Configuration (specific set of analysis options used for the verification)
Verification results
You create and modify a project using the Project Manager perspective.
A Project Template (Compilation Environment Template), is a predefined set of analysis options configured for a specific compilation environment.
When you create a new project, you can select a project template to automatically set analysis options for your compiler, and help locate required include folders.
Polyspace software provides predefined templates for common compilers such as Cosmic, IAR, Kiel, and VxWorks.
You can also create custom templates from existing project configurations. For more information, see Creating Custom Project Templates.
Before you begin verifying your code with Polyspace software, you must know the location of your source files and include files. You must also know where you want to store the verification results.
To simplify the location of your files, you may want to create a project folder, and then in that folder, create separate folders for the source files, include files, and results. For example:
polyspace_project/
sources
includes
results
You use the Polyspace verification environment to create projects, start verifications, and review verification results.
To open the Polyspace verification environment:
Double-click the Polyspace icon (Windows® systems).
![]()
On a Linux® or UNIX® system, use the following command:
$POLYSPACE/PVE/bin/polyspace
The Polyspace verification environment opens.

By default, the Polyspace Verification Environment displays the Project Manager perspective. The Project Manager perspective has three main panes.
| Use this section... | For... |
|---|---|
| Project Browser (upper-left) | Specifying:
|
| Configuration (upper-right) | Specifying verification options |
| Output (lower-right) | Monitoring the progress of a verification, and viewing status, log messages, and general verification statistics. |
You can resize or hide any of these panes.
The Polyspace verification environment can manage multiple projects simultaneously. When you create a new project or open an existing project, the project is added to the Project Browser tree.
To create a new project:
Select File > New Project.
The Project – Properties dialog box opens:

In the Project name field, enter a name for your project.
If you want to specify a location for your project, clear the Default location check box, and enter a Location for your project.
In the Project language section, select either C or C++.
Click Next.
The Project – Browse for a Project Template dialog box opens.

Select the Template for your compiler (for more information, see What Is a Project Template?).
If your compiler does not appear in the list of predefined templates, select Baseline C or Baseline C++ to start with a generic template.
Click Next.
The Polyspace Project – Add Source Files and Include Folders dialog box opens.

The project folder Location you specified in step 3 should appear in Look in. If it does not, navigate to that folder.
Select the source files you want to include in the project, then click Add Source.
The source files appear in the Source tree for your project.
Select the Include folders you want to include in the project, then click Add Include.
The Include folders appear in the Include tree for your project.
Click Finish.
The new project opens in the Polyspace verification environment, with default options based on the project template you selected.

The Polyspace verification environment can manage multiple projects simultaneously. When you create a new project or open an existing project, the project is added to the Project Browser tree.
To open an existing project:
Select File > Open Project.
The Open Polyspace Project dialog box opens.
Navigate to the project folder, for example, Demo_C.

Select the project configuration file, for example, Demo_C.cfg. Then click Open.
The selected project opens in the Project Manager perspective.

The Polyspace verification environment can manage multiple projects simultaneously. When you create a new project or open an existing project, the project is added to the Project Browser tree. To remove a project from the Project Browser tree, you must close the project.
To close a project:
In the Project Browser, select the project you want to close.
Right-click the project, then select Close Active Project.
The project is closed and removed from the Project Browser tree.
To specify the source files for your project:
In the Project Browser, select the Source folder.
Click the Add source icon
in the upper left the
Project Browser.
The Project – Add Source Files and Include Folders dialog box opens.

In the Look in field, navigate to the folder containing your source files.
Select the source files you want to include in the project, then click Add Source.
The source files appear in the Source tree for your project.
Click Finish to apply the changes and close the dialog box.
The source files you selected appear in the Project Browser.

Polyspace software automatically adds the standard include folders to your project.
If your project uses additional include files, you can specify additional folders to include with your verification.
To specify the include folders for the project:
In the Project Browser, select the Include folder.
Click the Add source icon
in the upper left the
Project Browser.
The Project – Add Source Files and Include Folders dialog box opens.

In the Look in field, navigate to the folder containing your Include files.
Select the Include folders you want to include in the project, then click Add Include.
The Include folders appear in the Include tree for your project.
Click Finish to apply the changes and close the dialog box.
The Include folders you selected appear in the Project Browser.

You can change the order of the include folders in your project to manage the sequence in which include files are compiled during verification.
To re-order the sequence of include folders for the project:
In the Project Browser, expand the Include folder.
Select the include folder you want to move.
Click the Move up
or Move down
icons in the Project Browser toolbar
to move the include.
The Include folders are reordered in the Project Browser.

Each Polyspace project can contain multiple modules. Each of these modules can verify a specific set of source files using a specific set of analysis options.
By default, each module you create uses the same analysis options, allowing you to verify different subsets of source files using the same options. However, you can also create multiple configurations in each module, allowing you to change analysis options each time you run a verification.
To create a new module in your project:
In the Project Browser, select any project.
Click the Create a new module icon
in the upper left the
Project Browser.
A second module, Module_(2), appears in the Project Browser tree.

In the Project Browser Source tree, right-click the files you want to add to the module, and select Copy Source File to > Module_(2).
The source files appear in the Source tree of Module_(2).
Each Polyspace project can contain multiple configurations. Each of these configurations specifies a specific set of analysis options for a verification. Using multiple configurations allows you to verify a set of source files multiple times using different analysis options for each verification.
To create a new configuration in your project:
In the Project Browser, select any module.
Right-click the Configuration folder in the module, and select Create New Configuration. The new configuration appears in the Project Browser.

In the Configuration pane, specify the appropriate analysis options for the configuration.
Select File > Save to save your project with the new settings.
For detailed information about specific analysis options, see Option Descriptions for C Codein the Polyspace Products or C Reference.
You can 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.
Note This option applies only to automatically generated mains. Therefore, you must also select the option Generate a main (-main-generator) for this option to take effect. |
To specify a source file as not called by the main generator:
In the Project Browser Source tree, select the source files you want the main generator to ignore.
Right click any selected file, and select Define As > Not Called by Main Generator.

The files ignored by the main generator appear is italics in the Source tree of the project.

Note To specify that a file previously marked Not Called by Main Generator should be called, right-click the file in the project Source tree, then select Regular Source File. |
Polyspace software saves verification results in Module_(#) subfolders within the project folder. To change the location of your results, you must change the project location.
To change the location of an existing project:
In the Project Browser, right-click on the project name and select Project Properties.
The Polyspace Project – Properties dialog box opens:

Clear the Default location check box.
Enter the new Location for your project.
Click Finish.
Many applications are designed to run on specific target CPUs and operating systems. Since some run-time errors are dependent on the target, you must specify the type of CPU and operating system used in the target environment before running a verification.
The Compiler Settings tab in the Configuration pane of the Project Manager perspective allows you to specify the target operating system and processor type for your application.
To specify the target environment for your application:
From the Target operating system drop-down list, select the operating system on which your application is designed to run.

From the Target processor type drop-down list, select the processor on which your application is designed to run.
For more information about emulating your target environment, see Setting Up a Target.
The Configuration pane in the Project Manager perspective allows you to set Analysis options that Polyspace software uses during the verification process. For more information about analysis options, see "Options Description" in the Polyspace Products for C/C++ Reference
To specify analysis options for your project:
In the Configuration pane, select the All Settings tab. Under Analysis options, you see different categories of options, for example, General, Target/Compilation, and Compliance with standards

Specify the appropriate analysis options for your project.
Select File > Save to save your project with the new settings.
For detailed information about specific analysis options, see Option Descriptions for C Code in the Polyspace Products for C Reference.
Once you have configured a project, you can save the Configuration as a custom Project Template, and use it to configure future projects. Using custom templates allows you to automatically set up the compilation environment, include folders, and other analysis options for your projects.
You can include any Analysis option in the template, but the following options should typically be included:
Target processor type (-target)
Target operating system (-OS-target)
Dialect support (-dialect)
Defined Preporcessor Macros (-D)
Include (-include)
To create a custom project template:
Open the project you want to use a template.
Right-click the configuration you want to use, and select Export As Template.

Enter a description for the template, then click Proceed.

Save your Compilation Environment Template file with the name you want to appear in the Templates browser.
Create a new project.
In the Project – Browse for a Project Template dialog box, select Add custom template.

Select the template that you exported, then click Open.
The new template appears in the Custom templates folder of the Templates browser, and can be used for future projects.

Before you run a verification, you should configure your text and XML editors through the Polyspace Preferences dialog box. Configuring text and XML editors allows you to view source files and MISRA reports directly from the Polyspace verification environment.
To configure your text and .XML editors:
Select Options > Preferences.
The Polyspace Preferences dialog box opens.
Select the Editors tab.
The Editors tab opens.

Specify an XML editor to use to view MISRA-C reports. For example:
C:\Program Files\MSOffice\Office12\EXCEL.EXE
Specify a text editor to use to view source files from the Project Manager logs. For example:
C:\Program Files\Windows NT\Accessories\wordpad.exe
To automatically specify the command line arguments for your editor, from the Arguments drop-down list, select your text editor.
Emacs
Notepad++
UltraEdit
VisualStudio
Wordpad
If you are using another text editor, select Custom from the drop-down menu, and specify the command line arguments for the text editor.
Click OK.
To save the project, select File > Save.
Polyspace software saves your project using the Project name and Location you specified when creating the project.
![]() | Setting Up a Verification Project | Specifying Options to Match Your Quality Goals | ![]() |
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |