Package com.kcsl.paths.enumeration
Class TopDownBFPropagatePathEnumerator
- java.lang.Object
-
- com.kcsl.paths.algorithms.PathCounter
-
- com.kcsl.paths.algorithms.PathEnumerator
-
- com.kcsl.paths.enumeration.TopDownBFPropagatePathEnumerator
-
public class TopDownBFPropagatePathEnumerator extends PathEnumerator
This program counts all paths in the graph by iteratively enumerating all paths. It uses breadth first traversal to walk on the graph. WARNING: This can be very memory intensive on large graphs! Although it is time-efficient in contrast to its backtrack cousins, it uses a lot more memory avoid backtracking.- Author:
- Payas Awadhutkar
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.kcsl.paths.algorithms.PathEnumerator
PathEnumerator.EnumerationResult
-
Nested classes/interfaces inherited from class com.kcsl.paths.algorithms.PathCounter
PathCounter.CountingResult
-
-
Constructor Summary
Constructors Constructor Description TopDownBFPropagatePathEnumerator()
TopDownBFPropagatePathEnumerator(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 CFGPathEnumerator.EnumerationResult
enumeratePaths(com.ensoftcorp.atlas.core.query.Q cfg)
Enumerates each path in the given CFG and returns each path as a list of line numbers.-
Methods inherited from class com.kcsl.paths.algorithms.PathCounter
isConsiderShortCircuitPaths, setConsiderShortCircuitPaths
-
-
-
-
Method Detail
-
enumeratePaths
public PathEnumerator.EnumerationResult enumeratePaths(com.ensoftcorp.atlas.core.query.Q cfg)
Enumerates each path in the given CFG and returns each path as a list of line numbers. Note: I'm not sure if the way additions are counted here makes a lot of sense We need a more rigorous way to analyze the complexity of this algorithm.- Specified by:
enumeratePaths
in classPathEnumerator
-
countPaths
public PathCounter.CountingResult countPaths(com.ensoftcorp.atlas.core.query.Q cfg)
Counts the number of paths in a given CFG- Specified by:
countPaths
in classPathCounter
- Returns:
-
-