Skip to content

Commit 384eb05

Browse files
committed
first half-baked attempt to generalize the scheduling strategies
1 parent 757b63b commit 384eb05

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package soot.jimple.infoflow.solver;
2+
3+
import soot.jimple.infoflow.solver.fastSolver.FastSolverLinkedNode;
4+
import soot.jimple.infoflow.solver.fastSolver.ISchedulingStrategy;
5+
6+
/**
7+
* Common interface for IFDS solvers that schedule their IFDS edge processing
8+
* tasks based on interchangeable strategies
9+
*
10+
* @author Steven Arzt
11+
*
12+
*/
13+
public interface IStrategyBasedParallelSolver<N, D extends FastSolverLinkedNode<D, N>> {
14+
15+
/**
16+
* Sets the strategy for scheduling edges
17+
*
18+
* @param strategy The strategy for scheduling edges
19+
*/
20+
public void setSchedulingStrategy(ISchedulingStrategy<N, D> strategy);
21+
22+
}

soot-infoflow/src/soot/jimple/infoflow/solver/fastSolver/IFDSSolver.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import soot.jimple.infoflow.memory.IMemoryBoundedSolver;
4646
import soot.jimple.infoflow.memory.ISolverTerminationReason;
4747
import soot.jimple.infoflow.solver.EndSummary;
48+
import soot.jimple.infoflow.solver.IStrategyBasedParallelSolver;
4849
import soot.jimple.infoflow.solver.PredecessorShorteningMode;
4950
import soot.jimple.infoflow.solver.executors.InterruptableExecutor;
5051
import soot.jimple.infoflow.solver.executors.SetPoolExecutor;
@@ -63,7 +64,7 @@
6364
* @see IFDSTabulationProblem
6465
*/
6566
public class IFDSSolver<N, D extends FastSolverLinkedNode<D, N>, I extends BiDiInterproceduralCFG<N, SootMethod>>
66-
implements IMemoryBoundedSolver {
67+
implements IMemoryBoundedSolver, IStrategyBasedParallelSolver<N, D> {
6768

6869
public enum ScheduleTarget {
6970
/**
@@ -891,11 +892,7 @@ public void setMaxAbstractionPathLength(int maxAbstractionPathLength) {
891892
this.maxAbstractionPathLength = maxAbstractionPathLength;
892893
}
893894

894-
/**
895-
* Sets the strategy for scheduling edges
896-
*
897-
* @param strategy The strategy for scheduling edges
898-
*/
895+
@Override
899896
public void setSchedulingStrategy(ISchedulingStrategy<N, D> strategy) {
900897
this.schedulingStrategy = strategy;
901898
}

0 commit comments

Comments
 (0)