Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Question about get varinfo from vid



Hello,

On 04/03/2014 06:08 AM, Qi Alfred Chen wrote:
> I have some question when using a Frama-c program in old version. It
> used the function varinfo_from_vid () to get varinfo.
> In the change log I saw that it has been removed and can use maps or
> hash tables indexed by varinfo to get it.
> I am not quite understand since I am new to cil and frama-c. Does it
> mean that I need to keep a (vid,varinfo) hashtable by myself and pass it
> to every function that has used variunfo_from_vid()? Or there are other
> ways to do that. If some one has example or advice, I would be really
> appreciated.

It means that anywhere you use a vid, you can use directly a varinfo 
(the vid necessarily comes from its associated varinfo). So instead of 
using a hashtbl (or a map, or a set) indexed by your vid, you can now 
use Cil_datatype.Varinfo.Hashtbl (or .Map, or .Set). Doing this change 
will simplify your code (that was at least the case for all the Frama-C 
codebase that we saw when we propagated this change).

Hope this helps,
Julien