Module CtrlDpds


module CtrlDpds: sig .. end
Compute the PDB(A,B) set used in the control dependencies algorithm. Roughly speaking, it gives
({B} U postdom(B))-postdom(A)
. It means that if S is in the result, it postdominates B but not A. As B is usually a successor of A, it means that S is reached if the B-branch is chosen, but not necessary for the other branches. Then, S should depend on A. (see the document to know more about the applied algorithm)

Compute some information on the function in order to be able to compute the control dependencies later on


val debug : bool
module S: sig .. end

type t_info =
| ToReturn of S.t
| ToInfinity of S.t
| Init
module State: sig .. end
module States: sig .. end
type t = Lexical_successors.t * States.t 
module Computer: 
functor (Param : sig
val states : States.t
val end_point : int
end) -> sig .. end
val go : States.t -> Cil_types.stmt -> unit
val compute_on_infinite_traces : States.t -> Cil_types.stmt list -> unit
val compute_infos : Kernel_function.t -> State.t Inthash.t
val compute : Kernel_function.t -> Cil_types.stmt Inthash.t * State.t Inthash.t
Compute some information on the function in order to be able to compute the control dependencies later on
val get_postdoms : t_info Inthash.t ->
without:bool -> Cilutil.StmtSet.elt -> bool * S.t
val pd_b_but_not_a : t_info Inthash.t ->
Cilutil.StmtSet.elt -> Cilutil.StmtSet.elt -> S.t
Compute the PDB(A,B) set used in the control dependencies algorithm. Roughly speaking, it gives
({B} U postdom(B))-postdom(A)
. It means that if S is in the result, it postdominates B but not A. As B is usually a successor of A, it means that S is reached if the B-branch is chosen, but not necessary for the other branches. Then, S should depend on A. (see the document to know more about the applied algorithm)
val get_if_controled_stmts : 'a * t_info Inthash.t ->
Cilutil.StmtSet.elt -> Cilutil.StmtSet.elt list
Compute the list of the statements that should have a control dependency on the given IF statement.
Returns the statements which are depending on the condition.

= U (PDB (if, succs(if))
(see the document to know more about the applied algorithm).
val get_jump_controled_stmts : Cilutil.StmtSet.elt Inthash.t * t_info Inthash.t ->
Cilutil.StmtSet.elt -> Cilutil.StmtSet.elt list
let's find the statements which are depending on the jump statement (goto, break, continue, loop) =
PDB(jump,lex_suc) U (PDB(lex_suc,label) - lex_suc)
(see the document to know more about the applied algorithm).

Compute the list of the statements that should have a control dependency on the given jump statement. This statement can be a goto of course, but also a break, a continue, or even a loop because CIL transformations make them of the form

while(true) body;
which is equivalent to
L : body ; goto L;

val display : Format.formatter -> t_info Inthash.t -> unit