Module type Filter.T_RemoveInfo


module type T_RemoveInfo = sig .. end
Signature of a module that decides which element of a function have to be visible or not

exception EraseAssigns
exception that fun_assign_visible should raise to indicate that the corresponding assigns clause should be erased entirely
type t_proj 
some type for the whole project information
type t_fct 
some type for a function information
val fct_info : t_proj ->
Cil_types.kernel_function -> t_fct list
This function will be called for each function of the source program. A new function will be created for each element of the returned list.
val fct_name : Cil_types.varinfo -> t_fct -> string
useful when we want to have several functions in the result for one source function. If if is not the case, you can return varinfo.vname. It is the responsibility of the user to given different names to different function.
val param_visible : t_fct -> int -> bool
tells if the n-th formal parameter is visible.
val body_visible : t_fct -> bool
tells if the body of a function definition is visible. True is most cases, but can be defined to be false when we want to export only the declaration of a function instead of its definition
val loc_var_visible : t_fct -> Cil_types.varinfo -> bool
tells if the local variable is visible.
val inst_visible : t_fct -> Cil_types.stmt -> bool
tells if the statement is visible.
val label_visible : t_fct -> Cil_types.stmt -> Cil_types.label -> bool
tells if the label is visible.
val annotation_visible : t_fct ->
Cil_types.stmt -> Cil_types.code_annotation -> bool
tells if the annotation, attached to the given statement is visible.
val fun_precond_visible : t_fct -> Cil_types.predicate -> bool
val fun_postcond_visible : t_fct -> Cil_types.predicate -> bool
val fun_variant_visible : t_fct -> Cil_types.term -> bool
val fun_assign_visible : t_fct -> Cil_types.identified_term Cil_types.from -> bool
true if the assigned value (first component of the from) is visible
Raises 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 \nothing
val fun_deps_visible : t_fct -> Cil_types.identified_term -> bool
true if the corresponding functional dependency is visible.
val called_info : t_proj * t_fct ->
Cil_types.stmt ->
(Cil_types.kernel_function * t_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 t_fct to know if the return value and the arguments are visible. The input t_fct parameter is the one of the caller function.
val res_call_visible : t_fct -> Cil_types.stmt -> bool
tells if the lvalue of the call has to be visible
val result_visible : Cil_types.kernel_function -> t_fct -> bool
tells if the function returns something or if the result is 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.