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.ObjectA base class to define the common interface and configurations of program path counting algorithms- Author:
- Ben Holland, Payas Awadhutkar
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classPathCounter.CountingResultHolds a path counting result, which consists of the number of paths counted and the number of additions performed to compute the result.
 - 
Constructor SummaryConstructors Constructor Description PathCounter()Construct a new path counter with the default configurationsPathCounter(boolean considerShortCircuitPaths)Construct a new path counter with the given configurations
 - 
Method SummaryModifier and Type Method Description abstract PathCounter.CountingResultcountPaths(com.ensoftcorp.atlas.core.query.Q cfg)Counts the number of paths in a given control flow graphbooleanisConsiderShortCircuitPaths()Returns true if the path counter is considering short circuiting paths from logical AND and OR operatorsvoidsetConsiderShortCircuitPaths(boolean considerShortCircuitPaths)Configures whether or not the path counter should consider short circuiting paths from logical AND and OR operators
 
- 
- 
- 
Constructor Detail- 
PathCounterpublic PathCounter() Construct a new path counter with the default configurations
 - 
PathCounterpublic 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- 
isConsiderShortCircuitPathspublic boolean isConsiderShortCircuitPaths() Returns true if the path counter is considering short circuiting paths from logical AND and OR operators- Returns:
 
 - 
setConsiderShortCircuitPathspublic void setConsiderShortCircuitPaths(boolean considerShortCircuitPaths) Configures whether or not the path counter should consider short circuiting paths from logical AND and OR operators- Parameters:
- considerShortCircuitPaths-
 
 - 
countPathspublic 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:
 
 
- 
 
-