Functions to call within the specified classes (-class-analyzer-calls
)
Specify class methods that you want to verify
Description
This option affects a Code Prover analysis only.
This option is not available for code generated from MATLAB® code or Simulink® models.
Specify class methods that Polyspace® uses to generate a main
.
The generated main
can call static, public and
protected methods in classes that you specify using the Class option.
Set Option
User interface (desktop products only): In your project configuration, the option is on the Code Prover Verification node. See Dependencies for other options that you must also enable.
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. See Dependencies for other options that you must also enable.
Command line and options file: Use the option
-class-analyzer-calls
. See Command-Line Information.
Why Use This Option
If you are verifying a module or library, Code Prover generates
a main
function if one does not exist. If a main
exists,
the analysis uses the existing main
.
Use this option and the option Class (-class-analyzer)
to specify the class
methods that the generated main
must call. Unless a class method
is called directly or indirectly from main
, the software does not
analyze the method.
Settings
Default: unused
all
The generated
main
calls all public and protected methods. It does not call methods inherited from a parent class.all-public
The generated
main
calls all public methods. It does not call methods inherited from a parent class.inherited-all
The generated
main
calls all public and protected methods including those inherited from a parent class.inherited-all-public
The generated
main
calls all public methods including those inherited from a parent class.unused
The generated
main
calls public and protected methods that are not called in the code.unused-public
The generated
main
calls public methods that are not called in the code. It does not call methods inherited from a parent class.inherited-unused
The generated
main
calls public and protected methods that are not called in the code including those inherited from a parent class.inherited-unused-public
The generated
main
calls public methods that are not called in the code including those inherited from a parent class.custom
The generated
main
calls the methods that you specify.Enter function names or choose from a list.
Click to add a field and enter the function name.
Click to list functions in your code. Choose functions from the list.
If you use the scope resolution operator to specify the function from a particular namespace, enter the fully qualified name, for instance,
myClass::myMethod(int)
. If the function does not have a parameter, use an empty parenthesis, for instance,myClass::myMethod()
.
Dependencies
You can use this option only if:
Source code language (-lang)
is set toCPP
orC-CPP
.Verify module or library (-main-generator)
is selected.
Command-Line Information
Parameter: -class-analyzer-calls |
Value: all | all-public | inherited-all | inherited-all-public | unused | unused-public | inherited-unused | inherited-unused-public | custom= |
Default: unused |
Example (Code Prover): polyspace-code-prover
-sources |
Example (Code Prover
Server):
polyspace-code-prover-server -sources
|
See Also
Verify module or library (-main-generator)
| Class (-class-analyzer)
Topics
- Specify Polyspace Analysis Options
- Verify C++ Classes (Polyspace Code Prover)