Main Content

Initialization functions (-functions-called-before-loop)

Specify functions that the generated main must call 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 functions that the generated main must call before the cyclic code begins.

Set Option

User interface (desktop products only): In your project configuration, the option is available on the Code Prover Verification node. You see this option only if you open a project configuration from Simulink.

Command line and options file: Use the option -functions-called-before-loop. See Command-Line Information.

Settings

No Default if you run the analysis outside Simulink. If you run from Simulink, the option uses the initialize functions from the generated code by default. See also How Polyspace Analysis of Generated Code Works.

Click to add a field. Enter function name.

If you use the scope resolution operator to specify the function from a particular namespace, enter the fully qualified name, for instance, myClass::init(int). If the function does not have a parameter, use an empty parenthesis, for instance, myClass::init().

Tips

Command-Line Information

Parameter: -functions-called-before-loop
No Default
Value: function1[,function2[,...]]
Example (Bug Finder): polyspace-bug-finder -sources file_name -main-generator -functions-called-before-loop myfunc
Example (Code Prover): polyspace-code-prover -sources file_name -main-generator -functions-called-before-loop myfunc
Example (Bug Finder Server): polyspace-bug-finder-server -sources file_name -main-generator -functions-called-before-loop myfunc
Example (Code Prover Server): polyspace-code-prover-server -sources file_name -main-generator -functions-called-before-loop myfunc