polyspace code prover: variable range does not change after function call
조회 수: 2 (최근 30일)
이전 댓글 표시
A simmilar code like the following I'm checking with polyspace codeprover 2014b.
...
setAllToZero(myState);
x = myState->myVariable;
...
In the function setAllToZero() the variable myState->myVariable is set to 0. But after the function Call polyspace asumes, that the variable has full range. Why is the range not [0]. Or what I'm doing wrong?
Thanks
best regards
Johannes
댓글 수: 0
답변 (2개)
Lucas Lebert
2016년 12월 8일
Since this post is quite old I assume that the issue has already been resolved. Nevertheless I want to leave tips for users who encounter the same issue. The first thing I would check is, whether the struct the pointer is pointing to is a global variable and if it is assigned to a permanent range. To check this just hover over "myVariable" in the third line of the example above. If the range is specified as "permanent range" in the tooltip. The first step is to investigate the "Variable/function range setup" in the "Inputs & Stubbing" pane of the Configurations. For the struct change the Init mode from "Permanent" to for example "Init".
If the struct the pointer is pointing to is not a global variable then it is a whole other story and I would need to have a closer look at it.
댓글 수: 0
Jan Kablitz
2017년 5월 8일
편집: Jan Kablitz
2017년 5월 8일
I have the same Problem! It seems that Polyspace does not mentioned the connection between the pointer and the corresponding variable.
[EDIT] I'am working with 2017b
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Command-Line Only Options에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!