Main Content

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.

Specify whether the analysis must automatically detect POSIX®, VxWorks®, Windows®, μC/OS III and other multithreading functions.

Set Option

Set the option using one of these methods:

  • Polyspace® user interface (desktop products only): In your project configuration, select the Multitasking node and then select this option. See Dependencies for other requirements on this option.

  • Polyspace Platform user interface (desktop products only): In your project configuration, on the Static Analysis tab, select the Multitasking node and then select this option. See Dependencies for other requirements on this option.

  • 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 file_name -enable-concurrency-detection
Example (Code Prover Server): polyspace-code-prover-server -sources file_name -enable-concurrency-detection

Version History

expand all