Enable automatic concurrency detection for Code Prover
(-enable-concurrency-detection
)
Automatically detect certain families of multithreading functions
Description
This option affects a Code Prover analysis only.
This option is not available for code generated from MATLAB® code or Simulink® models.
Specify whether the analysis must automatically detect POSIX®, VxWorks®, Windows®, μC/OS II and other multithreading functions.
Set Option
User interface (desktop products only): In your project configuration, the option is available on the Multitasking node. See Dependencies for other options that you must enable or disable.
User interface (Polyspace Platform, desktop products only): In your project configuration, the option is on the Static Analysis tab on the Multitasking node. See Dependencies for other options you must also enable.
Command line and options file: Use the option
-enable-concurrency-detection
. See Command-Line Information.
Why Use This Option
If you use this option, Polyspace® determines your multitasking model from your use of multithreading functions. In Bug Finder, automatic concurrency detection is enabled by default. In Code Prover, you have to explicitly enable automatic concurrency detection.
In some cases, using automatic concurrency detection can slow down the Code Prover analysis. In those cases, you can choose to not enable this option and explicitly specify your multitasking model. See Configuring Polyspace Multitasking Analysis Manually.
Settings
- On
If you use one of the supported functions for multitasking, the analysis automatically detects your multitasking model from your code.
For a list of supported multitasking functions and limitations in auto-detection of threads, see Auto-Detection of Thread Creation and Critical Section in Polyspace.
- Off (default)
The analysis does not attempt to detect the multitasking model from your code.
If you want to manually configure your multitasking model, see Configuring Polyspace Multitasking Analysis Manually.
Dependencies
If you enable this option, your code must contain a main
function.
You cannot use the Code Prover options to generate a main
.
Command-Line Information
Parameter: -enable-concurrency-detection |
Default: Off |
Example (Code Prover): polyspace-code-prover
-sources |
Example (Code Prover
Server):
polyspace-code-prover-server -sources
|