module type ForwardsTransfer =sig..end
val name : stringFor debugging purposes, the name of the analysis
val debug : bool Stdlib.refWhether to turn on debugging
type t
The type of the data we compute for each block start. May be imperative.
val copy : t -> tMake a deep copy of the data
val stmtStartData : t Inthash.tFor each statement id, the data at the start. Not found in the hash table means nothing is known about the state at this point. At the end of the analysis this means that the block is not reachable.
val pretty : unit -> t -> Pretty.docPretty-print the state
val computeFirstPredecessor : Cil.stmt -> t -> tGive the first value for a predecessors, compute the value to be set for the block
val combinePredecessors : Cil.stmt ->
old:t ->
t -> t optionTake some old data for the start of a statement, and some new data for the same point. Return None if the combination is identical to the old data. Otherwise, compute the combination, and return it.
val doInstr : Cil.instr ->
t -> t Dataflow.actionThe (forwards) transfer function for an instruction. The
Cil.currentLoc is set before calling this. The default action is to
continue with the state unchanged.
val doStmt : Cil.stmt ->
t ->
t Dataflow.stmtactionThe (forwards) transfer function for a statement. The Cil.currentLoc
is set before calling this. The default action is to do the instructions
in this statement, if applicable, and continue with the successors.
val doGuard : Cil.exp ->
t ->
t Dataflow.guardactionGenerate the successor to an If statement assuming the given expression is nonzero. Analyses that don't need guard information can return GDefault; this is equivalent to returning GUse of the input. A return value of GUnreachable indicates that this half of the branch will not be taken and should not be explored. This will be called twice per If, once for "then" and once for "else".
val filterStmt : Cil.stmt -> boolWhether to put this statement in the worklist. This is called when a block would normally be put in the worklist.