Documentation

Set Up Polyspace Project

Tutorial Overview

In this tutorial, you create a new Polyspace® project to verify Ada code.

What Is a Project?

A Polyspace project consists of:

  • Source files.

  • Include folders.

  • One or more modules. You run verification on the source files in each module. Each module has the following folders:

    • Source — Contains files used for verification.

    • Configuration — Contains analysis options used for verification.

    • Result — Contains results of verification.

Prepare Project Folder

In the following procedures, Polyspace_Install is the Polyspace installation folder, for example, C:\Program Files\Polyspace\.

  1. Create a folder polyspace_project in a particular location, for example C:\.

  2. Open polyspace_project and create subfolders:

    • sources

    • includes

  3. Copy example.adb and example.ads from Polyspace_Install\polyspace\examples\ada\Demo_Ada_Single-File\sources to polyspace_project\sources.

  4. Copy the files from Polyspace_Install\polyspace\examples\ada\Demo_Ada_Single-File\sources to polyspace_project\includes.

Open Polyspace Verification Environment

  • Windows®: From the MATLAB_Install\polyspace\bin folder, double-click the polyspace executable.

    You can create a desktop or Start menu shortcut to this executable with the icon

    if it does not already exist.

  • Linux® or Mac: Run the following command:

    /MATLAB_Install/polyspace/bin/polyspace
    

For project setup, you can use the following panes in the Polyspace user interface here.

SectionUse For
Project BrowserSpecifying:
  • Source files

  • Include folders

  • Results folder

ConfigurationSpecifying analysis options
Output SummaryMonitoring the progress of a verification, and viewing status, log messages, and general verification statistics.

You can resize or hide sections.

Create Project

Create New Project

  1. Select File > New Project.

  2. In the Project – Properties dialog box:

    • For Project name, enter example_project.

    • Clear the Use default location check box. To specify where your polyspace_project folder is, click .

    • Clear the boxes under Project Configuration.

      For more information on the option Use template, see Create Project Using Template.

  3. Click Next.

Specify Source Files and Include Folders

  1. Select the sources folder that you created. Click Add Source Files.

  2. Select the includes folder. Click Add Include Folders

  3. Click Finish. You can see your project in the Project Browser.

Next steps

  1. Run Verification

  2. Review Verification Results

Was this topic helpful?