Frama-C API - BackwardsTransfer
Interface to provide for a backward dataflow analysis.
The type of the data we compute for each block start. In many presentations of backwards data flow analysis we maintain the data at the block end. This is not easy to do with JVML because a block has many exceptional ends. So we maintain the data for the statement start.
val pretty : Stdlib.Format.formatter -> t -> unit
Pretty-print the state
val funcExitData : t
The data at function exit. Used for statements with no successors. This is usually bottom, since we'll also use doStmt on Return statements.
val combineStmtStartData : Cil_types.stmt -> old:t -> t -> t option
When the analysis reaches the start of a block, combine the old data with the one we have just computed. Return None if the combination is the same as the old data, otherwise return the combination. In the latter case, the predecessors of the statement are put on the working list.
val doStmt : Cil_types.stmt -> t action
The (backwards) transfer function for a branch. The (Current_loc.get ())
is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)
val doInstr : Cil_types.stmt -> Cil_types.instr -> t -> t action
The (backwards) transfer function for an instruction. The (Current_loc.get ())
is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)
val filterStmt : Cil_types.stmt -> Cil_types.stmt -> bool
Whether to put this predecessor block in the worklist. We give the predecessor and the block whose predecessor we are (and whose data has changed)
module StmtStartData : StmtStartData with type data = t
For each block id, the data at the start. This data structure must be initialized with the initial data for each block