Class GotoLoopDetection


  • public class GotoLoopDetection
    extends java.lang.Object
    It uses immediate dominance (idom) analysis to detect Goto loop and add tag as Goto_Back_Edge to the edge which cause loop. It also gives the count of Goto loops.
    Author:
    Sharwan Ram
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<com.ensoftcorp.atlas.core.db.graph.Node,​com.ensoftcorp.atlas.core.db.graph.Node> getIDOM​(com.ensoftcorp.atlas.core.query.Q function)
      Returns an immediate dominator (idom) mapping in the control flow graph of the given function
      static java.lang.String recoverFunctionGotoLoops​(com.ensoftcorp.atlas.core.query.Q cfg)  
      static java.lang.String recoverGotoLoops()  
      static java.lang.String recoverGotoLoops​(com.ensoftcorp.atlas.core.query.Q app)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GotoLoopDetection

        public GotoLoopDetection()
    • Method Detail

      • recoverGotoLoops

        public static java.lang.String recoverGotoLoops()
      • recoverGotoLoops

        public static java.lang.String recoverGotoLoops​(com.ensoftcorp.atlas.core.query.Q app)
      • recoverFunctionGotoLoops

        public static java.lang.String recoverFunctionGotoLoops​(com.ensoftcorp.atlas.core.query.Q cfg)
      • getIDOM

        public static java.util.Map<com.ensoftcorp.atlas.core.db.graph.Node,​com.ensoftcorp.atlas.core.db.graph.Node> getIDOM​(com.ensoftcorp.atlas.core.query.Q function)
        Returns an immediate dominator (idom) mapping in the control flow graph of the given function
        Parameters:
        function -
        Returns:
        Map which contains immediate dominator (idom) mapping, like:- (node, idom of node)