run
Run a Polyspace analysis
Syntax
run(proj, product)
Description
status
=
run(
runs a Polyspace®
Bug Finder™ or Polyspace
Code Prover™ analysis using the configuration specified in the proj
, product
)polyspace.Project
object
proj
. The analysis results are also stored in
proj
.
Input Arguments
proj
— Polyspace project
polyspace.Project
object
Polyspace project with configuration and results, specified as a polyspace.Project
object.
product
— Type of analysis
'bugFinder'
| 'codeProver'
Type of analysis to run.
Output Arguments
status
— Results of a Code Prover analysis
true
| false
Status of analysis. If the analysis succeeds, the status is
false
. Otherwise, it is
true
.
The analysis can fail for multiple reasons:
You provide source files that do not exist.
None of your files compile. Even if one file compiles, unless you set the property
StopWithCompileError
totrue
, the analysis succeeds and returns afalse
status.
There can be many other reasons why the analysis fails. If
the analysis fails, in your results folder, check the log file. You can see
the results folder using the Configuration
property of
the polyspace.Project
object:
proj = polyspace.Project; proj.Configuration.ResultsDir
Polyspace_R20##n_ProjectName_date-time
.log
.
Examples
Read Results to MATLAB Tables
Run a Polyspace
Bug Finder analysis on the demo file numerical.c
.
Configure these options:
Specify GCC 4.9 as your compiler.
Save the results in a
results
subfolder of the current working folder.
proj = polyspace.Project % Configure analysis proj.Configuration.Sources = {fullfile(polyspaceroot, 'polyspace', ... 'examples', 'cxx', 'Bug_Finder_Example', 'sources', 'numerical.c')}; proj.Configuration.TargetCompiler.Compiler = 'gnu4.9'; proj.Configuration.ResultsDir = fullfile(pwd,'results'); % Run analysis bfStatus = run(proj, 'bugFinder'); % Read results bfSummary = proj.Results.getSummary('defects');
Version History
Introduced in R2017b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)