- The DRS configuration, also known as Constraint Specification, is used with the main generator to tell the main generator how to constrain calls to functions.
- The option to "Verify Whole Application" means that Polyspace is expecting you to provide a main() for the analysis, which you are doing.
In Polyspace Code, while configuring DRS, even if a user defined function's argument is initialized with "Init Range", it is not affective in verification
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
if true
Func1(arg1, arg2, arg3)
{
....
....
local variable = arg1 + arg2;
if (arg3>=200)
{
/*do something/no unreachable code*/
}
}
main()
{
...
Func1(10,20,100);
}
end
During DRS configuration, arg3 is initialised to 200. Project is configured to be Verified at whole application level.
But arg3 is not taking 200 during verification.In check details/tip pointing, it is considering only 100.
Request : Inorder to test my Protection code(cases where error flag check), please provide a solution
0 commentaires
Réponses (1)
Matt Rhodes
le 15 Mai 2017
Hi Jyothi-
There are 2 different conflicting configuration settings happening here:
In other words, you have to tell Polyspace to "Verify Module or Library" instead of "Verify Whole Application." I also see that you are providing a main in your example code. When you do this, Polyspace sees the main you provide and overrides your setting to be "Verify Whole Application" because it cannot correctly resolve which main to use on its own. You will have to either exclude the main you are providing, or use a MACRO to rename main so that Polyspace can use its own main generator.
One more thought. If you are using your main, and you are seeing the argument being initialized with 100 instead of 200, that is because your main is causing the initialization to 100. If you are actually using 100 instead of 200, what is the reason you are trying to get Polyspace to initialize this value to 200?
0 commentaires
Voir également
Catégories
En savoir plus sur Get Started with Polyspace Products for Ada 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!