Polyspace assumption regarding global/static variable
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dimo
le 7 Déc 2017
Modifié(e) : Alexandre De Barros
le 8 Déc 2017
Hello,
In R2015a in codeprov_ref.pdf (page 5-10) under External Variables topic is written:
Polyspace verification works on the principle that a global or static external variable could take any value within the range of its type.
I don't understand the meaning of the words * or static* here. Does it mean that static variable with file scope will also have full range?
0 commentaires
Réponse acceptée
Alexandre De Barros
le 8 Déc 2017
Modifié(e) : Alexandre De Barros
le 8 Déc 2017
Hello,
This notion of extern static variable is a little bit strange indeed. It no longer appears in the current version of the documentation.
Static variables are considered local to the file, and so they will not have full-range. A static variable is initialized to its initial value, if there is one, or to 0 without explicit initialization and keep this value unless it is assigned to a new value.
Static variables can still be set to full-range thanks to the main generator option "Variables to initialize" with the value 'all'. With this parameter, the global and static variables are considered as modified and can then take any value.
Alex
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Code Prover Analysis Assumptions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!