package goblint

  1. Overview
  2. Docs
Static analysis framework for C

Install

dune-project
 Dependency

Authors

Maintainers

Sources

goblint-2.8.0.tbz
sha256=9175eec0143102243964e34a0786584fd590c60422009259c705a89a27f88de4
sha512=9d760007dd8d003cf596516444ed7acc7370fc3d446e75ac71b0176522c3baae090410762f9035e7aae4f6b0e394bf28bb5b1c08ca0476920b94aa919ef04f42

doc/goblint.lib/Goblint_lib/DeadCode/index.html

Module Goblint_lib.DeadCode

Dead code elimination transformation (remove_dead_code).

val empty_block : unit -> GoblintCil.block
val filter_map_block : ?unchecked_condition:??? -> (GoblintCil.stmt -> bool) -> GoblintCil.block -> bool

Filter statements out of a block (recursively). CFG fields (prev/next, Loop continue/break) are no longer valid after calling. Returns true if anything is left in block, false if the block is now empty. Invariants:

  • f (goto label) ==> f (labelled stmt), i.e. if a goto statement is not filtered out, the target may not be filtered out either.
  • block may not contain switch statements.
val may_stop_execution : GoblintCil.stmt -> bool

Is it possible for this statement to begin executing normally, but not finish?

val find_live_statements : (MyCFG.node -> bool) -> (MyCFG.node -> MyCFG.edges -> MyCFG.node -> GoblintCil.stmt list) -> MyCFG.cfg -> MyCFG.node -> BatSet.Int.t

Perform a depth first search over the CFG. Record the IDs of live statements; for each traversed edge, record the skipped statements along the edge as live, if the nodes on both ends of the edge are live. Record live statements in the nodes themselves as well.