Package com.kcsl.paths.algorithms
Class PathCounter
- java.lang.Object
-
- com.kcsl.paths.algorithms.PathCounter
-
- Direct Known Subclasses:
BottomUpBFMultiplicitiesPathCounter
,BottomUpDFMultiplicitiesPathCounter
,PathEnumerator
,TopDownBFMultiplicitiesPathCounter
,TopDownDFMultiplicitiesPathCounter
public abstract class PathCounter extends java.lang.Object
A base class to define the common interface and configurations of program path counting algorithms- Author:
- Ben Holland, Payas Awadhutkar
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PathCounter.CountingResult
Holds a path counting result, which consists of the number of paths counted and the number of additions performed to compute the result.
-
Constructor Summary
Constructors Constructor Description PathCounter()
Construct a new path counter with the default configurationsPathCounter(boolean considerShortCircuitPaths)
Construct a new path counter with the given configurations
-
Method Summary
Modifier and Type Method Description abstract PathCounter.CountingResult
countPaths(com.ensoftcorp.atlas.core.query.Q cfg)
Counts the number of paths in a given control flow graphboolean
isConsiderShortCircuitPaths()
Returns true if the path counter is considering short circuiting paths from logical AND and OR operatorsvoid
setConsiderShortCircuitPaths(boolean considerShortCircuitPaths)
Configures whether or not the path counter should consider short circuiting paths from logical AND and OR operators
-
-
-
Constructor Detail
-
PathCounter
public PathCounter()
Construct a new path counter with the default configurations
-
PathCounter
public PathCounter(boolean considerShortCircuitPaths)
Construct a new path counter with the given configurations- Parameters:
considerShortCircuitPaths
- Whether or not to consider short circuiting paths from logical AND and OR operators
-
-
Method Detail
-
isConsiderShortCircuitPaths
public boolean isConsiderShortCircuitPaths()
Returns true if the path counter is considering short circuiting paths from logical AND and OR operators- Returns:
-
setConsiderShortCircuitPaths
public void setConsiderShortCircuitPaths(boolean considerShortCircuitPaths)
Configures whether or not the path counter should consider short circuiting paths from logical AND and OR operators- Parameters:
considerShortCircuitPaths
-
-
countPaths
public abstract PathCounter.CountingResult countPaths(com.ensoftcorp.atlas.core.query.Q cfg)
Counts the number of paths in a given control flow graph- Parameters:
cfg
-- Returns:
-
-