Class TopDownDFMultiplicitiesPathCounter


  • public class TopDownDFMultiplicitiesPathCounter
    extends PathCounter
    This program counts all paths in a CFG by counting path multiplicities. This algorithm is has a worst case complexity of O(V+E)
    Author:
    Payas Awadhutkar
    • Method Summary

      Modifier and Type Method Description
      PathCounter.CountingResult countPaths​(com.ensoftcorp.atlas.core.query.Q cfg)
      Counts the number of paths in a given CFG Example Atlas Shell Usage: var function = functions("function name here") var graph = graph(function) var counter = new TopDownDFMultiplicitiesPathCounter counter.countPaths(graph)
      PathCounter.CountingResult countSTPaths​(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q s, com.ensoftcorp.atlas.core.query.Q t)
      Counts the number of paths between two nodes in a given CFG Example Atlas Shell Usage: var function = functions("function name here") var graph = graph(function) var s = start node var t = end node var counter = new TopDownDFMultiplicitiesPathCounter counter.countSTPaths(graph,s,t)
      • Methods inherited from class java.lang.Object

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

      • TopDownDFMultiplicitiesPathCounter

        public TopDownDFMultiplicitiesPathCounter()
      • TopDownDFMultiplicitiesPathCounter

        public TopDownDFMultiplicitiesPathCounter​(boolean considerShortCircuitPaths)
    • Method Detail

      • countSTPaths

        public PathCounter.CountingResult countSTPaths​(com.ensoftcorp.atlas.core.query.Q cfg,
                                                       com.ensoftcorp.atlas.core.query.Q s,
                                                       com.ensoftcorp.atlas.core.query.Q t)
        Counts the number of paths between two nodes in a given CFG Example Atlas Shell Usage: var function = functions("function name here") var graph = graph(function) var s = start node var t = end node var counter = new TopDownDFMultiplicitiesPathCounter counter.countSTPaths(graph,s,t)
        Parameters:
        cfg - , s, t
        Returns:
        [additions,numPaths]
      • countPaths

        public PathCounter.CountingResult countPaths​(com.ensoftcorp.atlas.core.query.Q cfg)
        Counts the number of paths in a given CFG Example Atlas Shell Usage: var function = functions("function name here") var graph = graph(function) var counter = new TopDownDFMultiplicitiesPathCounter counter.countPaths(graph)
        Specified by:
        countPaths in class PathCounter
        Parameters:
        cfg -
        Returns:
        [additions,numPaths]