| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → PolySpace |
| Contents | Index |
| Learn more about PolySpace |
| On this page… |
|---|
In PolySpace software, a project is a named set of parameters for a verification of your software project's source files. A project includes:
The location of source files and include folders
The location of a folder for verification results
Analysis options
You can create your own project or use an existing project. You create and modify a project using the Launcher graphical user interface.
A project file has one of the following file types:
| Project Type | File Extension | Description |
|---|---|---|
| Configuration | cfg | Required for running a verification. Does not include generic target processors. |
| PolySpace Project Model | ppm | For populating a project with analysis options, including generic target processors. |
| Desktop | dsk | In earlier versions of PolySpace software, for running a verification on a client computer. |
In this tutorial, you create a new project and save it as a configuration file (.cfg).
Before you start verifying a C file with PolySpace software, you must know the locations of the C source file and the include files. You must also know where you want to store the verification results.
For each project, you decide where to store source files and results. For example, you can create a project folder, and then in that folder, create separate folders for the source files, include files, and results.
For this tutorial, prepare a project folder as follows:
Create a project folder named polyspace_project.
Open polyspace_project, and create the following folders:
sources
includes
results
Copy the file example.c from
Install_folder\Examples\Demo_C_Single-File\sources
to
polyspace_project\sources
where Install_folder is the installation folder.
Copy the files include.h and math.h from
Install_folder\Examples\Demo_C_Single-File\sources
to
polyspace_project\includes.
You use the PolySpace Launcher, a graphical user interface, to create a project and start a verification.
To open the PolySpace Launcher:
Double-click the PolySpace Launcher icon.
![]()
If you have only PolySpace Client for C/C++ software installed on your computer, skip this step. If you have both PolySpace Client for C/C++ and PolySpace Client for Ada products on your system, the PolySpace Language Selection dialog box will appear.

Select PolySpace for C/C++ and click OK.
The PolySpace Launcher window appears:

The Launcher window has three main sections.
| Use this section... | For... |
|---|---|
| Upper-left | Specifying:
|
| Upper-right | Specifying analysis options |
| Lower | Controlling and monitoring a verification |
You can resize or hide any of these sections. You learn more about the Launcher window later in this tutorial.
PolySpace software allows you to specify the default folder that appears in directory browsers in dialog boxes. If you do not change the default folder, the default folder is the installation folder. In this tutorial, you change the default folder to the project folder that you created in Preparing the Project Folders. Changing the default folder to the project folder makes it easier for you to locate and specify source files and include folders in dialog boxes.
To change the default folder to the project folder:
Select Edit > Preferences.
The Preferences dialog box appears.

Select the Default folder tab.
Select Always use this specific folder if it is not already selected.
Enter or navigate to the project folder that you created earlier. In this example, the project folder is C:\PolySpace\polyspace_project.
The Preferences dialog box should now look like the following.

Click OK to apply the changes and close the dialog box.
You must have a project, saved with file type cfg, to run a verification. In this part of the tutorial, you create a new project for verifying example.c.
You create a new project by:
To open a new project for verifying example.c:
Select File > New Project.
The Choose the language dialog box appears:

Select C, then click OK.
The default project name, New_Project, appears in the title bar.
In the Analysis options section, the General options node expands with default project identification information and options.

To specify the source files, include folders, and results folder for the verification of example.c:
Click the green plus sign button in the upper right of the files section of the Launcher window.
![]()
The Please select a file dialog box appears.

The project folder polyspace_project should appear in Look in. If it does not, navigate to that folder.
Select the folder includes and then click the green down arrow button in the Folders to include section.
![]()
The path for the folder appears in the source files list.
Double-click the folder sources.
Select the file example.c and then click the green down arrow button in the Source files section.
![]()
The path for example.c appears in the source files list.
Click OK to apply the changes and close the dialog box.
In Results Folder, specify the folder for the verification results. Enter the path for the results folder that you created earlier. In this example, the results folder is C:\PolySpace\polyspace_project\results.
The files section in the upper left of the Launcher window now looks like:

The analysis options in the upper-right section of the Launcher window include identification information and parameters that PolySpace software uses during the verification process. For more information about analysis options, see "Options Description" in the PolySpace Products for C Reference.
To specify the analysis options for this tutorial:
In the General section, change the Session identifier to Example_Project.
Expand the Target/Compilation section.
Select no-predefined-OS from the drop-down menu next to Operating system target for PolySpace stubs.
Keep the default values for all other options.
The analysis options will now look like this.

To save the project:
Select File > Save project. The Save the project as dialog box appears.

In Look in, leave the default folder, polyspace_project.
In Session identifier, enter example.
In Files of type, leave the default *.cfg. You must have a project file with type cfg to run a verification.
Note You can also run a verification with a project file of type dsk. Older versions of PolySpace software created files with type dsk for use with a verification running on a desktop PC. For more information about the dsk file type, see What Is a Project?. |
Click OK to save the project and close the dialog box.
![]() | About This Tutorial | Running a Verification | ![]() |
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |