class type cilVisitor =object
..end
Cil.nopCilVisitor
. Each of the
specialized visiting functions can also call the queueInstr
to specify
that some instructions should be inserted before the current instruction
or statement. Use syntax like self#queueInstr
to call a method
associated with the current object.
Important Note for Frama-C Users: Unless you really know what you are
doing, you should probably inherit from the
Visitor.generic_frama_c_visitor
instead of Cil.genericCilVisitor
or
Cil.nopCilVisitor
Consult the Plugin Development Guide for additional details.
method behavior : visitor_behavior
method project : Project.t option
method plain_copy_visitor : cilVisitor
behavior
method vfile : Cil_types.file -> Cil_types.file visitAction
method vvdec : Cil_types.varinfo -> Cil_types.varinfo visitAction
GVar
, GVarDecl
, GFun
,
all the varinfo
in formals of function types, and the formals and
locals for function definitions. This means that the list of formals
in a function definition will be traversed twice, once as part of the
function type and second as part of the formals in a function
definition.method vvrbl : Cil_types.varinfo -> Cil_types.varinfo visitAction
SkipChildren
and
ChangeTo
actions make sense since there are no subtrees. Note that
the type and attributes of the variable are not traversed for a
variable use.method vexpr : Cil_types.exp -> Cil_types.exp visitAction
Cast
or SizeOf
expression) or the
variable use.method vlval : Cil_types.lval -> Cil_types.lval visitAction
method voffs : Cil_types.offset -> Cil_types.offset visitAction
method vinitoffs : Cil_types.offset -> Cil_types.offset visitAction
method vinst : Cil_types.instr -> Cil_types.instr list visitAction
ChangeTo
action can
replace this instruction with a list of instructionsmethod vstmt : Cil_types.stmt -> Cil_types.stmt visitAction
DoChildren
action does not create a
new statement when the components change. Instead it updates the contents
of the original statement. This is done to preserve the sharing with
Goto
and Case
statements that point to the original statement. If you
use the ChangeTo
action then you should take care of preserving that
sharing yourself.method vblock : Cil_types.block -> Cil_types.block visitAction
method vfunc : Cil_types.fundec -> Cil_types.fundec visitAction
method vglob : Cil_types.global -> Cil_types.global list visitAction
method vinit : Cil_types.varinfo ->
Cil_types.offset -> Cil_types.init -> Cil_types.init visitAction
method vtype : Cil_types.typ -> Cil_types.typ visitAction
TComp
, TEnum
and TNamed
are not visited again.method vcompinfo : Cil_types.compinfo -> Cil_types.compinfo visitAction
method venuminfo : Cil_types.enuminfo -> Cil_types.enuminfo visitAction
method vfieldinfo : Cil_types.fieldinfo -> Cil_types.fieldinfo visitAction
method venumitem : Cil_types.enumitem -> Cil_types.enumitem visitAction
method vattr : Cil_types.attribute -> Cil_types.attribute list visitAction
method vattrparam : Cil_types.attrparam -> Cil_types.attrparam visitAction
method queueInstr : Cil_types.instr list -> unit
method unqueueInstr : unit -> Cil_types.instr list
method current_stmt : Cil_types.stmt option
NB: for copy visitor, the stmt is the original one (use
get_stmt
to obtain the corresponding copy)
method current_kinstr : Cil_types.kinstr
Kstmt stmt
when visiting statement stmt, Kglobal
when called outside
of a statement.method push_stmt : Cil_types.stmt -> unit
method pop_stmt : Cil_types.stmt -> unit
method current_func : Cil_types.fundec option
NB: for copy visitors, the fundec is the original one.
method set_current_func : Cil_types.fundec -> unit
method reset_current_func : unit -> unit
method vlogic_type : Cil_types.logic_type -> Cil_types.logic_type visitAction
method vmodel_info : Cil_types.model_info -> Cil_types.model_info visitAction
method videntified_term : Cil_types.identified_term -> Cil_types.identified_term visitAction
method vterm : Cil_types.term -> Cil_types.term visitAction
method vterm_node : Cil_types.term_node -> Cil_types.term_node visitAction
method vterm_lval : Cil_types.term_lval -> Cil_types.term_lval visitAction
method vterm_lhost : Cil_types.term_lhost -> Cil_types.term_lhost visitAction
method vterm_offset : Cil_types.term_offset -> Cil_types.term_offset visitAction
method vlogic_label : Cil_types.logic_label -> Cil_types.logic_label visitAction
method vlogic_info_decl : Cil_types.logic_info -> Cil_types.logic_info visitAction
method vlogic_info_use : Cil_types.logic_info -> Cil_types.logic_info visitAction
method vlogic_type_info_decl : Cil_types.logic_type_info -> Cil_types.logic_type_info visitAction
method vlogic_type_info_use : Cil_types.logic_type_info -> Cil_types.logic_type_info visitAction
method vlogic_type_def : Cil_types.logic_type_def -> Cil_types.logic_type_def visitAction
method vlogic_ctor_info_decl : Cil_types.logic_ctor_info -> Cil_types.logic_ctor_info visitAction
method vlogic_ctor_info_use : Cil_types.logic_ctor_info -> Cil_types.logic_ctor_info visitAction
method vlogic_var_decl : Cil_types.logic_var -> Cil_types.logic_var visitAction
method vlogic_var_use : Cil_types.logic_var -> Cil_types.logic_var visitAction
method vquantifiers : Cil_types.quantifiers -> Cil_types.quantifiers visitAction
method videntified_predicate : Cil_types.identified_predicate ->
Cil_types.identified_predicate visitAction
method vpredicate : Cil_types.predicate -> Cil_types.predicate visitAction
method vpredicate_named : Cil_types.predicate Cil_types.named ->
Cil_types.predicate Cil_types.named visitAction
method vbehavior : Cil_types.funbehavior -> Cil_types.funbehavior visitAction
method vspec : Cil_types.funspec -> Cil_types.funspec visitAction
method vassigns : Cil_types.identified_term Cil_types.assigns ->
Cil_types.identified_term Cil_types.assigns visitAction
method vfrees : Cil_types.identified_term list ->
Cil_types.identified_term list visitAction
method vallocates : Cil_types.identified_term list ->
Cil_types.identified_term list visitAction
method vallocation : Cil_types.identified_term Cil_types.allocation ->
Cil_types.identified_term Cil_types.allocation visitAction
method vloop_pragma : Cil_types.term Cil_types.loop_pragma ->
Cil_types.term Cil_types.loop_pragma visitAction
method vslice_pragma : Cil_types.term Cil_types.slice_pragma ->
Cil_types.term Cil_types.slice_pragma visitAction
method vimpact_pragma : Cil_types.term Cil_types.impact_pragma ->
Cil_types.term Cil_types.impact_pragma visitAction
method vdeps : Cil_types.identified_term Cil_types.deps ->
Cil_types.identified_term Cil_types.deps visitAction
method vfrom : Cil_types.identified_term Cil_types.from ->
Cil_types.identified_term Cil_types.from visitAction
method vcode_annot : Cil_types.code_annotation -> Cil_types.code_annotation visitAction
method vannotation : Cil_types.global_annotation -> Cil_types.global_annotation visitAction
method fill_global_tables : unit
method get_filling_actions : (unit -> unit) Queue.t