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] Visitor example in plugin-development guide
- Subject: [Frama-c-discuss] Visitor example in plugin-development guide
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- Date: Wed, 11 Jan 2012 12:53:44 +0100
- In-reply-to: <4F0D5781.9020702@cea.fr>
- References: <1326192880.2067.46.camel@iti27.informatik.htw-dresden.de> <4F0D5781.9020702@cea.fr>
On Wed, 2012-01-11 at 10:33 +0100, Virgile Prevosto wrote: > > (* current_stmt is deprecated, so I changed this to current_kinstr. To extract the Kstmt part, is there a function similar to Extlib.the or do I have to provide my own the_stmt function? *) > > There's currently no function to do that. One might be added in a later > version in Cil_datatype.Kinstr (where there is already a > kinstr_of_opt_stmt), but anyways, most functions should take a kinstr > and not a stmt but is it alright to use stmt here? > Actually, since Nitrogen, you have access to the new kernel function, > but not to Kernel_function.find_englobing_kf (At this very point, AST > has been computed, but not the auxiliary tables necessary to compute > this information). The proper way to retrieve the new kf is the following: > > let new_kf = Cil.get_kernel_function (Extlib.the self#current_kf) in > Queue.add (fun () -> Annotations.add_assert new_kf ...) shouldn't this be Cil.get_kernel_function (Cil.copy_visit ()) (Extlib.the self#current_kf) as the type is val get_kernel_function : visitor_behavior -> Cil_types.kernel_function-> Cil_types.kernel_function Also, what does this function do? Does it construct a new kernel function? -- Best regards, Boris
- References:
- [Frama-c-discuss] Visitor example in plugin-development guide
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] Visitor example in plugin-development guide
- From: virgile.prevosto at cea.fr (Virgile Prevosto)
- [Frama-c-discuss] Visitor example in plugin-development guide
- Prev by Date: [Frama-c-discuss] Visitor example in plugin-development guide
- Next by Date: [Frama-c-discuss] ACSL by Example (for Nitrogen)
- Previous by thread: [Frama-c-discuss] Visitor example in plugin-development guide
- Next by thread: [Frama-c-discuss] New release of WP plug-in
- Index(es):