Class ControlFlowExtractor
- java.lang.Object
-
- it.unive.lisa.program.cfg.controlFlow.ControlFlowExtractor
-
public class ControlFlowExtractor extends java.lang.ObjectAn extractor ofControlFlowStructures fromCFGs. It usesDominatorsto extractLoops, and a graph visiting heuristics to findIfThenElses.
Extracting control flows should be a last-resort: if the cfg contains arbitrary jumps (likegoto, break, continue, ...) the aforementioned algorithms will fail to properly infer some of the structures. It is always preferable to have frontends define each structure relying on source code information.
-
-
Constructor Summary
Constructors Constructor Description ControlFlowExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<ControlFlowStructure>extract(CFG target)Runs the algorithms for extractingControlFlowStructures.
-
-
-
Method Detail
-
extract
public java.util.Collection<ControlFlowStructure> extract(CFG target)
Runs the algorithms for extractingControlFlowStructures.- Parameters:
target- the cfg whose control flows structures are to be extracted- Returns:
- the collection of extracted structures
-
-