module Ctrlflow: sig
.. end
This module defines types for control-flow graph and dominance relations,
and provides utility functions for obtaining information from such graphs.
Control-Flow Graph
type
cfg
Control-Flow Graph
val make_cfg : Dex.dex -> Dex.code_item -> cfg
Dominator Tree
type
dom
Dominator Tree
val doms : cfg -> dom
compute block-level dominance relations for given
Ctrlflow.cfg
val idom : dom -> int -> int
immediate dominator according to dominance relations
val cdom : dom -> int list
longest common dominators
Post Dominator Tree
type
pdom
Post Dominator Tree
val pdoms : cfg -> pdom
compute block-level post dominace relations for given
Ctrlflow.cfg
val ipdom : pdom -> int -> int
immediate post dominator according to post dominace realtions
val cpdom : pdom -> int list
longest common post dominators
val get_last_ins : cfg -> pdom -> Dex.link
get the last instruction
Control-flow Module for Data-flow Analysis
module type CTRLFLOW = sig
.. end
Control-flow
type
cfg_module = (module Ctrlflow.CTRLFLOW with type st = Dex.link)
val to_module : Dex.dex -> cfg -> cfg_module
DOTtify
val cfg2dot : Dex.dex -> cfg -> unit
print control-flow graph in dot format
val dom2dot : Dex.dex -> cfg -> dom -> unit
print dominator tree in dot format
val pdom2dot : Dex.dex -> cfg -> pdom -> unit
print post dominator tree in dot format
Web Accessibility