Skip to content

Use of Layout,alloc and dealloc to create and free dynamic arrays #104

Answered by celinval
QinyuanWu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @QinyuanWu, since the code you are trying to verify (NonNull) is part of the core crate, you cannot use dynamic allocation. In this case, I would recommend that you use a fixed array size, and an index variable with non-deterministic value that is less than length to cover different scenarios.

Another possibility is to use the new PointerGenerator that we recently added to Kani.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by QinyuanWu
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants