module type RemoveInfo =sig
..end
exception EraseAssigns
exception EraseAllocation
type
proj
type
fct
val fct_info : proj ->
Cil_types.kernel_function -> fct list
val fct_name : Cil_types.varinfo -> fct -> string
varinfo.vname
.
It is the responsibility of the user to given different names to different
function.val param_visible : fct -> int -> bool
val body_visible : fct -> bool
val loc_var_visible : fct -> Cil_types.varinfo -> bool
val inst_visible : fct -> Cil_types.stmt -> bool
val label_visible : fct -> Cil_types.stmt -> Cil_types.label -> bool
val annotation_visible : fct -> Cil_types.stmt -> Cil_types.code_annotation -> bool
val fun_precond_visible : fct -> Cil_types.predicate -> bool
val fun_postcond_visible : fct -> Cil_types.predicate -> bool
val fun_variant_visible : fct -> Cil_types.term -> bool
val fun_frees_visible : fct -> Cil_types.identified_term -> bool
val fun_allocates_visible : fct -> Cil_types.identified_term -> bool
val fun_assign_visible : fct -> Cil_types.identified_term Cil_types.from -> bool
EraseAssigns
to indicate that the corresponding assigns clause
should be erased entirely (i.e. assigns everything. If it were to
just return false to all elements, this would result in assigns \nothingval fun_deps_visible : fct -> Cil_types.identified_term -> bool
val called_info : proj * fct ->
Cil_types.stmt -> (Cil_types.kernel_function * fct) option
called_info
will be called only if the call statement is visible.
If it returns None
, the source call will be visible,
else it will use the returned fct
to know if the return value and the
arguments are visible.
The input fct
parameter is the one of the caller function.
val res_call_visible : fct -> Cil_types.stmt -> bool
val result_visible : Cil_types.kernel_function -> fct -> bool
void
.
Notice that if this function returns true
the function will have the same
return type than the original function. So, if it was already void
, it
makes no difference if this function returns true or false.
inst_visible fct_info (Kernel_function.find_return kf)
.res_call_visible
must return false
if result_visible
returns false on the called function.val cond_edge_visible : fct -> Cil_types.stmt -> bool * bool
cond_edge_visible f s
emplies that s
is an 'if' in f
. The
first returned boolean indicates that the 'then' edge is useful,
the second one the 'else' is. Setting one or both to true will
lead to the simplification in the 'if'.