Local Variable is calculated differently in the two runs
1 次查看(过去 30 天)
显示 更早的评论
Hi Matlab Support teams,
I'm using Polyspace R2019a, and i got a problem about local variable, which is calculated differently in the two runs
At version 1: At the line 1520, range value of local variable "u1t_InBitId" = [0...7]
Please take a look following pic 1:
At version 2: Source code doesn't change in function, but range value of local variable "u1t_InBitId" = [0..199]
Please take a look following pic 2:
We think the reason of this issue is wrong calculation of Code Prover
=> We added 3 lines of code as bellow:
At line 1522: #pragma Inspection_Point u1t_InIdCnv
At line 1523: #pragma Inspection_Point u1t_InCalcWork
At line 1525: #pragma Inspection_Point u1t_InBitId
This is the result after running Code Prover
Range value of local variable "u1t_InBitId" = [0..255]
Please take a look following pic 3:
Why does "u1t_InBitId" change range value?
Please help me answer the question above.
0 个评论
采纳的回答
Anirban
2021-1-29
Hi,
There is usually a thread of logic behind the Code Prover calculation since Code Prover uses quite airtight mathematic. However, it is usually difficult to tell what is going on from a screenshot of just the problem location. If you contact Support through this link (https://www.mathworks.com/support/contact_us.html), they can help you much faster.
I can only make a guess. Your versions 1 and 2 do not seem identical. In your first picture, you show an expanded macro on line 1520 but in the second, the macro is collapsed. In the expanded macro, I can see a grey check right after the ? below the (. If this macro was collapsed, it should appear grey overall. However, in your second picture, the collapsed macro is green. Which indicates to me that something has changed between versions 1 and 2. Even if line 1520 itself has not changed, some line before has changed, which led to the grey check on line 1520 being removed in version 2.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Code Prover Analysis in Polyspace Platform User Interface 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!