some bug on Polyspace ,the variable imask never has value of 3。

2 vues (au cours des 30 derniers jours)
ElectronicABC
ElectronicABC le 5 Sep 2023
Commenté : Shubham le 12 Sep 2023
the variable imask never has value of this simple program.
  1 commentaire
ElectronicABC
ElectronicABC le 5 Sep 2023
[0..4] mean 0 1 2 3 4 ,but the program never has value 3.

Connectez-vous pour commenter.

Réponse acceptée

ElectronicABC
ElectronicABC le 12 Sep 2023
Modifié(e) : ElectronicABC le 12 Sep 2023
this is a bug in this verion polyspace ,I run the same on my friends computer,get the right answer [0 ..2] or 4 or 8 ...

Plus de réponses (1)

Shubham
Shubham le 8 Sep 2023
Hi Chen,
I understand you could not figure out when the value of the variable "imask" reaches "3" as shown in the variable access panel.
The value of 3 in the "Reads" and "Writes" columns in the variable access denotes the frequency of reading or writing operations performed on the variable. It does not indicate the specific value of the variable "imask" during program execution.
For more info, read here:
  4 commentaires
ElectronicABC
ElectronicABC le 12 Sep 2023
version 2021A
Shubham
Shubham le 12 Sep 2023
Hi Chen, Polyspace does not execute source code but does approximation. It looks like it is an over approximation in Polyspace R2021. Polyspace provided an over approximation of the possible values of imask. This issue has been fixed in the latest release. Thanks

Connectez-vous pour commenter.

Tags

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by