Class TopDownBFMultiplicitiesPathCounter


  • public class TopDownBFMultiplicitiesPathCounter
    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:
    Ben Holland, 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 = cfg(dskqopt) var counter = new TopDownBFMultiplicitiesPathCounter 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 TopDownBFMultiplicitiesPathCounter counter.countSTPaths(graph,s,t)
      • Methods inherited from class java.lang.Object

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

      • TopDownBFMultiplicitiesPathCounter

        public TopDownBFMultiplicitiesPathCounter()
      • TopDownBFMultiplicitiesPathCounter

        public TopDownBFMultiplicitiesPathCounter​(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 TopDownBFMultiplicitiesPathCounter 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 = cfg(dskqopt) var counter = new TopDownBFMultiplicitiesPathCounter counter.countPaths(graph)
        Specified by:
        countPaths in class PathCounter
        Parameters:
        cfg -
        Returns:
        [additions,numPaths]