Local Variable is calculated differently in the two runs

1 visualización (últimos 30 días)
Tran Thang
Tran Thang el 27 de En. de 2021
Comentada: Tran Thang el 4 de Feb. de 2021
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.

Respuesta aceptada

Anirban
Anirban el 29 de En. de 2021
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.

Más respuestas (0)

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by