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] RE : RE : How to discard a visiting glob?



Dear David,

My solution works in the general case. Actually, in the special case of globals, an alternative solution would be to redefine vglob_aux like in your example in order to return an empty list (since this method returns a list of globals and not only a single one). Both solutions work, so the best choice (the easiest one to implement) depends on what you really want to do on the AST.

Julien

________________________________________
De : frama-c-discuss-bounces at lists.gforge.inria.fr [frama-c-discuss-bounces at lists.gforge.inria.fr] de la part de David Yang [abiao.yang at gmail.com]
Date d'envoi : samedi 11 janvier 2014 12:06
? : Frama-C public discussion
Objet : Re: [Frama-c-discuss] RE : How to discard a visiting glob?

Dear Julien,

It is really helpful to me.
Following your suggestion, I choose to create a new project by using
the new cil_types.file without that visited global.
Thank you very much.

-david



On 11 January 2014 17:48, SIGNOLES Julien <julien.signoles at cea.fr> wrote:
> Hello,
>
> It is not possible to discard something you are currently visiting (like a global in your example). You have to discard the element when visiting its container. For globals, it is the file itself (method vfile) in which you remove the global from the fiel 'globals'.
>
> Hope this helps,
> Julien
> ________________________________________
> De : frama-c-discuss-bounces at lists.gforge.inria.fr [frama-c-discuss-bounces at lists.gforge.inria.fr] de la part de David Yang [abiao.yang at gmail.com]
> Date d'envoi : vendredi 10 janvier 2014 14:29
> ? : Frama-C public discussion
> Objet : [Frama-c-discuss] How to discard a visiting glob?
>
> Hi all,
>
> How to discard a visiting glob while it satisfy some condition?
>
> method vglob_aux g =
>      match g with
>      | GType _ -> SkipChildren
>      | GVar _ ->
>          if(g satisfy some condition) then
>                ; (*** discard this glob ***)
>          else SkipChildren
>      | _ -> SkipChildren
>
>
> Here, How to write the code for if condition?
>
> Thanks.
>
> -david
>
> _______________________________________________
> Frama-c-discuss mailing list
> Frama-c-discuss at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss
>
> _______________________________________________
> Frama-c-discuss mailing list
> Frama-c-discuss at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss

_______________________________________________
Frama-c-discuss mailing list
Frama-c-discuss at lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss