Package com.kcsl.paths.counting
Class BottomUpBFMultiplicitiesPathCounter
- java.lang.Object
-
- com.kcsl.paths.algorithms.PathCounter
-
- com.kcsl.paths.counting.BottomUpBFMultiplicitiesPathCounter
-
public class BottomUpBFMultiplicitiesPathCounter 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.kcsl.paths.algorithms.PathCounter
PathCounter.CountingResult
-
-
Constructor Summary
Constructors Constructor Description BottomUpBFMultiplicitiesPathCounter()
BottomUpBFMultiplicitiesPathCounter(boolean considerShortCircuitPaths)
-
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(function) var counter = BottomUpBFMultiplicitiesPathCounter 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 BottomUpBFMultiplicitiesPathCounter counter.countSTPaths(graph,s,t)-
Methods inherited from class com.kcsl.paths.algorithms.PathCounter
isConsiderShortCircuitPaths, setConsiderShortCircuitPaths
-
-
-
-
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 BottomUpBFMultiplicitiesPathCounter 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(function) var counter = BottomUpBFMultiplicitiesPathCounter counter.countPaths(graph)- Specified by:
countPaths
in classPathCounter
- Parameters:
cfg
-- Returns:
-
-