Main Content

Verify whole application

Stop verification if sources files are incomplete and do not contain a main function

Description

This option affects a Code Prover analysis only.

This option is not available for code generated from MATLAB® code or Simulink® models.

Specify that Polyspace® verification must stop if a main function is not present in the source files.

If you select a Visual C++® setting for Compiler (-compiler), you can specify which function must be considered as main. See Main entry point (-main).

Set Option

User interface (desktop products only): In your project configuration, the option is on the Code Prover Verification node.

User interface (Polyspace Platform, desktop products only): In your project configuration, the option is on the Static Analysis tab on the Run Time Errors node.

Command line and options file: There is no corresponding command-line option. See Command-Line Information.

Settings

On

Polyspace verification stops if it does not find a main function in the source files.

Off (default)

Polyspace continues verification even when a main function is not present in the source files. If a main is not present, it generates a file __polyspace_main.c that contains a main function.

Tips

If you use this option, your code must contain a main function. Otherwise you see the error:

Error: required main procedure not found

If your code does not contain a main function, use the option Verify module or library (-main-generator) to generate a main function.

Command-Line Information

Unlike the user interface, by default, a verification from the command line stops if it does not find a main function in the source files. If you specify the option -main-generator, Polyspace generates a main if it cannot find one in the source files.