Class CfaUtil


  • public class CfaUtil
    extends java.lang.Object
    This is a util class for creating Cfas.
    • Constructor Detail

      • CfaUtil

        public CfaUtil()
    • Method Detail

      • createIntraproceduralCfaFromClassPool

        @Deprecated
        public static JvmCfa createIntraproceduralCfaFromClassPool​(ClassPool programClassPool)
        Deprecated.
        Returns a CFA for the given program class pool.
        Parameters:
        programClassPool - a program class pool
      • createIntraproceduralCfa

        public static JvmCfa createIntraproceduralCfa​(ClassPool programClassPool)
        Returns a CFA for the given program class pool.
        Parameters:
        programClassPool - a program class pool
      • createIntraproceduralCfaFromClassPool

        @Deprecated
        public static JvmCfa createIntraproceduralCfaFromClassPool​(ClassPool programClassPool,
                                                                   java.util.function.Supplier<java.lang.Boolean> shouldAnalyzeNextCodeAttribute)
        Deprecated.
        Returns a CFA for the given program class pool. Allows to limit the number of processed code attributes with shouldAnalyzeNextCodeAttribute.
        Parameters:
        programClassPool - a program class pool
      • createIntraproceduralCfa

        public static JvmCfa createIntraproceduralCfa​(ClassPool programClassPool,
                                                      java.util.function.Supplier<java.lang.Boolean> shouldAnalyzeNextCodeAttribute)
        Returns a CFA for the given program class pool. Allows to limit the number of processed code attributes with shouldAnalyzeNextCodeAttribute.
        Parameters:
        programClassPool - a program class pool
      • addInterproceduralEdgesToCfa

        public static void addInterproceduralEdgesToCfa​(JvmCfa cfa,
                                                        CallGraph callGraph)
        Adds interprocedural arcs to the given CFA from the call graph.
        Parameters:
        cfa - a CFA
        callGraph - a call graph
      • createInterproceduralCfaFromClassPoolAndCallGraph

        @Deprecated
        public static JvmCfa createInterproceduralCfaFromClassPoolAndCallGraph​(ClassPool programClassPool,
                                                                               CallGraph callGraph)
        Deprecated.
        Create an interprocedural CFA from the given program class pool and call graph.
        Parameters:
        programClassPool - a program class pool
        callGraph - a call graph
      • createInterproceduralCfa

        public static JvmCfa createInterproceduralCfa​(ClassPool programClassPool,
                                                      CallGraph callGraph)
        Create an interprocedural CFA from the given program class pool and call graph.
        Parameters:
        programClassPool - a program class pool
        callGraph - a call graph
      • createInterproceduralCfaFromClassPool

        @Deprecated
        public static JvmCfa createInterproceduralCfaFromClassPool​(ClassPool programClassPool)
        Deprecated.
        Create an interprocedural CFA from the given program class pool.
        Parameters:
        programClassPool - a program class pool
      • createInterproceduralCfa

        public static JvmCfa createInterproceduralCfa​(ClassPool programClassPool)
        Create an interprocedural CFA from the given program class pool.
        Parameters:
        programClassPool - a program class pool
      • createInterproceduralCfaFromClassPool

        @Deprecated
        public static JvmCfa createInterproceduralCfaFromClassPool​(ClassPool programClassPool,
                                                                   ClassPool libraryClassPool)
        Deprecated.
        Create an interprocedural CFA from the given program class pool.
        Parameters:
        programClassPool - a program class pool
      • createInterproceduralCfa

        public static JvmCfa createInterproceduralCfa​(ClassPool programClassPool,
                                                      ClassPool libraryClassPool)
        Create an interprocedural CFA from the given program class pool.
        Parameters:
        programClassPool - a program class pool
      • toDot

        public static java.lang.String toDot​(JvmCfa cfa)
        Produces a DOT graph representation of the given JVM control flow automaton.