Assigns clause for local variables in Frama-C -


I try fram-c

  / * to verify the following code @make sure! = \ Null; @ Assign \ Nnothing; @ * / Extra int * New_Ville (); // @Assign * P; Zero F (int * p) {* p = 8; } // @ Assign \ Nothing; Int main (zero) {int * p = new_value (); F (p); }  

It is unable to seem that the assigns assigns to \ nothing, which makes sense, because the main Assigns p * to f However, how do I assign that to the \ assignment clause, because p is a local variable and can not be reached within annotations.

specifies nothing is actually false variable P is local but its effect is made on * p which is an arbitrary indicator.

Counteremption

If new_value is defined as the following:

  int g; Int * new_value () {Return & amp; G; }  

This specification satisfies and the value of g is 8 at the end of the main.

To go forward

If the function is to be able to assign the function to new_value without any knowledge of the function, then you can create the result Can be accessible from Logic Space new_value :

For example:

  // @ logic int * R; // @ make sure \ results == R & amp; \ Legitimate (r); Assign \ nothing; Extern int * new_value (); // @Assign * P; Zero F (int * p) {...} // @ assign * r; 

P>

HTML>

Comments