Package com.kcsl.paths.enumeration
Class TopDownDFBacktrackPathEnumerator
- java.lang.Object
-
- com.kcsl.paths.algorithms.PathCounter
-
- com.kcsl.paths.algorithms.PathEnumerator
-
- com.kcsl.paths.enumeration.TopDownDFBacktrackPathEnumerator
-
public class TopDownDFBacktrackPathEnumerator extends PathEnumerator
This program counts all paths in the graph by iteratively enumerating all paths. It uses depth first traversal to walk on the graph. WARNING: This can be very expensive on large graphs! It's not only potentially exponential in terms of the traversal, but also in terms of the space to store each path!- Author:
- Ben Holland
-
-
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 TopDownDFBacktrackPathEnumerator()
TopDownDFBacktrackPathEnumerator(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
-
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:
-
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.- Specified by:
enumeratePaths
in classPathEnumerator
-
-