We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When marking a C procedure as pure, one can add a unfold statement like below:
unfold
/*@ pure*/ int size(struct node *list) { if(list==NULL) return 0; else return 1+/*@ with unfold state(list);*/size(list->next); }
This parses fine, so I'd expect that the with unfold gets translated to an unfolding. In reality, it is just dropped; the viper output is
with unfold
unfolding
(some(nothingAs1(optGet1((none1(): Option[Nothing])))): Option[Pointer])) ? 0 : 1 + size1(ptrDeref(ptrAdd(optGet2(list), 0)).ref.next))
Consequently, VerCors reports There may be insufficient permission to dereference the pointer for the list->next.
list->next
The with unfold should either be translated into unfolding, or explicitly disallowed.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When marking a C procedure as pure, one can add a
unfold
statement like below:This parses fine, so I'd expect that the
with unfold
gets translated to anunfolding
. In reality, it is just dropped; the viper output isConsequently, VerCors reports There may be insufficient permission to dereference the pointer for the
list->next
.The
with unfold
should either be translated intounfolding
, or explicitly disallowed.The text was updated successfully, but these errors were encountered: