Polyspace Code Verification: Coding Standards Report For Project: Polyspace
Polyspace Code Verification: Coding Standards Report For Project: Polyspace
Result Folder(s):
/mathworks/devel/sbs/31/ctreille.Bpolyspace_integ.j1378116/matlab/toolbox/qualkits/iec/codeprover/tests/code-prover-server-results/reporting/template-codingstandards/OR-414-6-codingsta
ndards_1
Table of Contents
Chapter 1. Custom Coding Rules ............................................................................................................................................................................................................... 1
Custom Coding Rules Summary - Violations by File ........................................................................................................................................................................ 1
Custom Coding Rules Summary - Violations by Rule ...................................................................................................................................................................... 1
Custom Coding Rules Summary for all Files ..................................................................................................................................................................................... 2
Custom Coding Rules Summary for Enabled Rules ......................................................................................................................................................................... 2
Custom Coding Rules Violations ........................................................................................................................................................................................................ 3
Chapter 2. Appendix 1 - Configuration Settings ...................................................................................................................................................................................... 6
Polyspace Settings ............................................................................................................................................................................................................................... 6
Analysis Assumptions ................................................................................................................................................................................................................. 6
Coding Standard Configuration ......................................................................................................................................................................................................... 7
Chapter 3. Appendix 2 - Definitions ........................................................................................................................................................................................................... 9
................................................................................................................................................................................................................................................................. 9
i
Chapter 1. Custom Coding Rules
Custom Coding Rules Summary - Violations by File
1
Custom Coding Rules Summary for all Files
File Total
/mathworks/devel/sbs/31/ctreille.Bpolyspace_integ.j1378116/matlab/toolbox/qualkits/iec/codeprover/tests/reporting/template-codingstandards/OR-414-6-codingstandar 18
ds_1.c
Total 18
2
Rule Description Pattern Total
6.1 All enumeration tags must follow the specified pattern. _e_.* 0
6.2 All enumeration types must follow the specified pattern. e_.* 0
6.3 All enumeration constants must follow the specified pattern. E_[A-Z_]+ 0
7.1 All global functions must follow the specified pattern. gf_.* 4
7.2 All static functions must follow the specified pattern. sf_.* 0
7.3 All function parameters must follow the specified pattern. .*_p 2
8.1 All global constants must follow the specified pattern. G_[A-Z][A-Z0-9_]* 0
8.2 All static constants must follow the specified pattern. S_[A-Z][A-Z0-9_]* 0
8.3 All local constants must follow the specified pattern. L_[A-Z][A-Z0-9_]* 0
8.4 All static local constants must follow the specified pattern. SL_[A-Z][A-Z0-9_]* 0
9.1 All global variables must follow the specified pattern. gv_[a-z][a-z0-9_]* 0
9.2 All static variables must follow the specified pattern. sv_[a-z][a-z0-9_]* 0
9.3 All local variables must follow the specified pattern. lv_[a-z][a-z0-9_]* 7
9.4 All static local variables must follow the specified pattern. slv_[a-z][a-z0-9_]* 0
10.1 All namespaces must follow the specified pattern. nm_.* 0
11.1 All class templates must follow the specified pattern. Tmp_.* 0
11.2 All class template parameters must follow the specified pattern. T_.* 0
12.1 All function templates must follow the specified pattern. F_.* 0
12.2 All function template parameters must follow the specified pattern. FT_.* 0
12.3 All function template members must follow the specified pattern. FM_.* 0
Total 18
3
ID Rule Message Function Line Col Jus Severity Status Comment
atlab/toolbox/qualkits/iec/codeprover/tests/reporting/temp
late-codingstandards' does not match the specified pattern
.
2 1.1 All source file names must follow the specified pattern. File Scope 1 0 No Unset Unreviewed
files basename
The source file name 'OR-414-6-codingstandards_1.c' does
not match the specified pattern.
3 2.1 All macros must follow the specified pattern. File Scope 4 9 No Unset Unreviewed
macros
The macro 'offsetof' does not match the specified pattern.
4 2.2 All macro parameters must follow the specified pattern. File Scope 4 9 No Unset Unreviewed
macro parameters
The macro parameter 'type' does not match the specified
pattern.
macro parameters
The macro parameter 'field' does not match the specified
pattern.
5 7.1 All global functions must follow the specified pattern. File Scope 7 4 No Unset Unreviewed
global functions
The global function 'foo1' does not match the specified pat
tern.
10 4.1 All struct tags must follow the specified pattern. foo1() 8 11 No Unset Unreviewed
struct tag names
The struct tag 'new_stc_2' does not match the specified pat
tern.
11 9.3 All local variables must follow the specified pattern. foo1() 8 22 No Unset Unreviewed
local variables
The local variable 'ptr_str_1' does not match the specified
pattern.
12 9.3 All local variables must follow the specified pattern. foo1() 10 25 No Unset Unreviewed
local variables
The local variable 'ptr_union_2_2_1' does not match the
specified pattern.
13 7.1 All global functions must follow the specified pattern. File Scope 15 4 No Unset Unreviewed
global functions
The global function 'foo' does not match the specified patt
ern.
7 7.1 All global functions must follow the specified pattern. File Scope 19 4 No Unset Unreviewed
global functions
The global function 'bar' does not match the specified patt
ern.
4
ID Rule Message Function Line Col Jus Severity Status Comment
14 9.3 All local variables must follow the specified pattern. bar() 20 17 No Unset Unreviewed
local variables
The local variable 'rd' does not match the specified patter
n.
8 7.1 All global functions must follow the specified pattern. File Scope 27 5 No Unset Unreviewed
global functions
The global function 'func' does not match the specified pat
tern.
16 7.3 All function parameters must follow the specified pattern. main() 35 13 No Unset Unreviewed
function parameters
The function parameter 'argc' does not match the specifie
d pattern.
17 7.3 All function parameters must follow the specified pattern. main() 35 25 No Unset Unreviewed
function parameters
The function parameter 'argv' does not match the specifie
d pattern.
6 9.3 All local variables must follow the specified pattern. main() 38 8 No Unset Unreviewed
local variables
The local variable 'a' does not match the specified pattern.
18 9.3 All local variables must follow the specified pattern. main() 39 8 No Unset Unreviewed
local variables
The local variable 'b' does not match the specified pattern.
15 9.3 All local variables must follow the specified pattern. main() 40 9 No Unset Unreviewed
local variables
The local variable 'ptr' does not match the specified patter
n.
9 9.3 All local variables must follow the specified pattern. main() 41 10 No Unset Unreviewed
local variables
The local variable 'p' does not match the specified pattern.
5
Chapter 2. Appendix 1 - Configuration Settings
Polyspace Settings
Option Value
-author Polyspace
-compiler generic
-custom-rules /mathworks/devel/sbs/31/ctreille.Bpolyspace_integ.j1378116/matlab/toolbox/qualkits/iec/codeprover/tests/reporting/custom_rules.txt
-date 05/05/2020
-I /mathworks/devel/sbs/31/ctreille.Bpolyspace_integ.j1378116/matlab/toolbox/qualkits/iec/codeprover/tests/options-api/lib
-lang C
-O2 -O2
-prog polyspace
-results-dir /mathworks/devel/sbs/31/ctreille.Bpolyspace_integ.j1378116/matlab/toolbox/qualkits/iec/codeprover/tests/code-prover-server-results/reporting/templa
te-codingstandards/OR-414-6-codingstandards_1
-target i386
-to pass2
-verif-version 1.0
Analysis Assumptions
Assumption Issuer
External arrays of unspecified size can be safely accessed at any index Product
Nonfinite floats (infinities and NaNs) are not considered Product
Computations involving unsigned integers do not overflow Product
Results of floating-point arithmetic are rounded following the IEE754 rule: round to nearest, ties to even Product
Structure fields are not volatile unless the entire structure is volatile-qualified Product
Stack pointers can be safely dereferenced even outside the pointed variable's scope Product
External pointers cannot be null. They point to allocated data of sufficient size for safe dereference Product
6
Assumption Issuer
Absolute addresses can be safely dereferenced Product
7
Rule Description Convention Pattern Comment Enabled
6.2 All enumeration types must follow the specified pattern. enumeration type names e_.* - yes
6.3 All enumeration constants must follow the specified pattern. enumeration constants E_[A-Z_]+ - yes
7.1 All global functions must follow the specified pattern. global functions gf_.* - yes
7.2 All static functions must follow the specified pattern. static functions sf_.* - yes
7.3 All function parameters must follow the specified pattern. function parameters .*_p - yes
8.1 All global constants must follow the specified pattern. global constants G_[A-Z][A-Z0-9_]* - yes
8.2 All static constants must follow the specified pattern. static constants S_[A-Z][A-Z0-9_]* - yes
8.3 All local constants must follow the specified pattern. local constants L_[A-Z][A-Z0-9_]* - yes
8.4 All static local constants must follow the specified pattern. static local constants SL_[A-Z][A-Z0-9_]* - yes
9.1 All global variables must follow the specified pattern. global variables gv_[a-z][a-z0-9_]* - yes
9.2 All static variables must follow the specified pattern. static variables sv_[a-z][a-z0-9_]* - yes
9.3 All local variables must follow the specified pattern. local variables lv_[a-z][a-z0-9_]* - yes
9.4 All static local variables must follow the specified pattern. static local variables slv_[a-z][a-z0-9_]* - yes
10.1 All namespaces must follow the specified pattern. namespaces nm_.* C++ yes
11.1 All class templates must follow the specified pattern. class templates Tmp_.* C++ yes
11.2 All class template parameters must follow the specified pattern. class template parameters T_.* C++ yes
12.1 All function templates must follow the specified pattern. function templates F_.* C++ yes
12.2 All function template parameters must follow the specified pattern. function template parame FT_.* C++ yes
ters
12.3 All function template members must follow the specified pattern. function template membe FM_.* C++ yes
rs
20.1 Source line length must not exceed specified number of characters. - - - no
8
Chapter 3. Appendix 2 - Definitions