Visitor.frama_c_visitor
Class type for a Db-aware visitor. This is done by defining auxiliary methods that can be redefined in inherited classes, while the corresponding ones from Cil.cilVisitor
must retain their values as defined here. Otherwise, annotations may not be visited properly. The replaced functions are
vstmt
(use vstmt_aux
instead)vglob
(use vglob_aux
instead)A few hints on how to use correctly this visitor
File.init_project_from_visitor
), use a visitor with copy behaviorSkipChildren
and ChangeTo
must be used with extreme care in a visitor with copy behavior, or some nodes may be shared between the original and the copy.generic_frama_c_visitor
will know what to do.vid
or sid
: this must be done before anything has been attached to the corresponding variable or statement in the new project, which means -- for statements, in vstmt
, for the current statement only -- for variables, at their declaration point.inherit Frama_c_kernel.Cil.cilVisitor
method frama_c_plain_copy : frama_c_visitor
same as plain_copy_visitor but for frama-c specific methods
method vstmt_aux : Frama_c_kernel.Cil_types.stmt ->
Frama_c_kernel.Cil_types.stmt Frama_c_kernel.Cil.visitAction
Replacement of vstmt.
method vglob_aux : Frama_c_kernel.Cil_types.global ->
Frama_c_kernel.Cil_types.global list Frama_c_kernel.Cil.visitAction
Replacement of vglob.
method current_kf : Frama_c_kernel.Cil_types.kernel_function option
link to the kernel function currently being visited. NB: for copy visitors, the link is to the original kf (anyway, the new kf is created only after the visit is over).
method set_current_kf : Frama_c_kernel.Cil_types.kernel_function -> unit
Internal use only.