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] Problem between Project change and modifying Ast information through visitors


  • Subject: [Frama-c-discuss] Problem between Project change and modifying Ast information through visitors
  • From: Pierre-Loic.Garoche at onera.fr (Pierre-Loïc Garoche)
  • Date: Fri, 25 Sep 2009 16:20:39 +0200

Hi

I'm trying to update some information of the ast using the visitors provided in the Frama-C API.
I followed the exemple of the plugin dev manual without success.

My goal is just to update the value of the mutable annotation status.

class status_update_visitor = object ( self )
  inherit Visitor.frama_c_inplace

  method vcode_annot annot =
	match annot.annot_content with
	    | AAssert (_,_,annot_status) -> annot_status.status <- a_new_value_for_this_status
	    | _ -> Self.fatal "Found a code annotation that is not an assert"
	Cil.DoChildren
end

I use two different projects. The call of this visitor works and modify the Ast. However if I change to the second project
	Project.set_current prj2
the modification disappear. The problem is that going back to the first project doesn't solve the problem.

How could I keep this information, either available to all project or at least in one of them ?


pl
-- 
Pierre-Lo?c Garoche
pierre-loic.garoche at onera.fr
http://www.onera.fr/staff/pierre-loic-garoche/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20090925/0a888a92/attachment.pgp