Parameters (-variables-written-before-loop)
Specify variables that the generated main must
initialize before the cyclic code loop
Description
This option is automatically set if you run Polyspace® from Simulink® or MATLAB® on generated code. If you run Polyspace on generated code outside Simulink or MATLAB, set this option manually.
Specify variables that the generated main must
initialize before the cyclic code loop begins. Before the loop begins, Polyspace considers
these variables to have any value allowed
by their type.
Set Option
Set the option using one of these methods:
Polyspace Platform user interface (desktop products only): In your project configuration, on the Static Analysis tab, select the Run Time Errors node and then select a value for this option. This option is visible only when you open the Polyspace Platform user interface from Simulink.
Command line and options file: Use the option
-variables-written-before-loop. See Command-Line Information.
Settings
Default: none
noneThe generated
maindoes not initialize variables.allThe generated
maininitializes all variables except those declared with keywordconst.uninitThe generated
mainonly initializes variables that are uninitialized.publicThe generated
mainonly initializes variables that arepublic.customThe generated
mainonly initializes variables that you specify. Click
to add a field. Enter variable name. For
C++ class members, use the qualified names such as
className::variableName.
Command-Line Information
Parameter: -variables-written-before-loop |
Value: none | all | custom= |
Default:
none |
Example (Bug Finder): polyspace-bug-finder
-sources |
Example (Code Prover): polyspace-code-prover
-sources |
Example (Bug Finder Server):
polyspace-bug-finder-server -sources |
Example (Code Prover
Server):
polyspace-code-prover-server -sources
|