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] Modifying the AST to insert statements / declarations


  • Subject: [Frama-c-discuss] Modifying the AST to insert statements / declarations
  • From: Pierre.Karpman at rennes.supelec.fr (Pierre Karpman)
  • Date: Mon, 19 Mar 2012 13:36:54 +0100

> 2012/3/16 Virgile Prevosto<virgile.prevosto at m4x.org  <http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss>>:
> >/
> />/  The attached script contains a very basic visitor that generates a new
> /
> Oops, I forgot that since the visitor adds some statement, It'd be
> better to recompute the cfg afterwards. The issue does not show up
> when printing the code, but doing a real analysis (e.g. -val) would
> result in a lot of trouble if the cfg is not correct. Attached is a
> correct version. Sorry for the noise.
>
> -- 
> E tutto per oggi, a la prossima volta
> Virgile

Hello,

I'm using your script as a basis for the instrumentation code in my 
plugin but it appears that it's not possible to call any functions of 
the "File" module from inside a dynamic plugin (although there's no 
problems opening the module itself)?!
I found no reference to such a restriction in the module documentation 
or in the plugin development guide, so is it possible that the issue 
comes from some misconfiguration of mine?

Anyway, I replaced the call to "File.create_project_from_visitor" by one 
to "Project.create_by_copy" and it seems to work all right, but I'm not 
quite sure there's no difference between the two?

Cheers,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20120319/17638d50/attachment.html>