How can Polyspace configurations be reused between different analysis runs?

4 views (last 30 days)
I want to apply a set of standard configurations across multiple Polyspace Code Prover or Polyspace Bug Finder analysis runs.
How can I reuse these configurations without having to manually set them each time?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Oct 2022
Polyspace configurations can be reused in two different ways depending on the desired workflow:
1. Using Polyspace from the MATLAB command line
Provided that you have integrated Polyspace with MATLAB, you can use the MATLAB API to set up configurations with MATLAB commands. These commands can be stored in an M script file, which can be executed to reuse the desired configuration settings. The link below shows how to run Polyspace from the MATLAB API:
Additionally, you can use the "pslinkoptions" method to automatically populate the configurations of the generated code
2.  Using the Polyspace Simulink App
Polyspace configurations can be transferred from PSPRJ files in the Simulink Polyspace App, by copying the file and placing it in the relevant location.
For example, suppose that we have a set of configurations done for analysing model_A.slx. In the same level of directory as model_A.slx, there will be a folder called pslink_config. Inside this folder will be a file called model_A_config.psprj. This PSPRJ file contains the analysis configurations used by Polyspace during the analysis of model_A. This directory structure is illustrated as follows:
To use these configurations for e.g. model_B.slx,
    i) Copy the file model_A_config.psprj and rename the copy as model_B_config.psprj. Note that the model name should match the newly created PSPRJ file.
    ii) Place this file into a folder called pslink_config located at the same directory level as model_B.slx. If the pslink_config already exists, there is no need to create it again.
The directory structure should now be as follows:
When the Polyspace project settings are opened from model_B.slx, the configurations from model_A should automatically have been set. 

More Answers (0)

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!