use of at.ac.tuwien.kr.alpha.core.programs.transformation.StratifiedEvaluation in project Alpha by alpha-asp.
the class AlphaImpl method prepareDebugSolve.
@Override
public DebugSolvingContext prepareDebugSolve(final NormalProgram program, java.util.function.Predicate<Predicate> filter) {
final DependencyGraph depGraph;
final ComponentGraph compGraph;
final AnalyzedProgram analyzed = AnalyzedProgram.analyzeNormalProgram(program);
final NormalProgram preprocessed;
if (this.config.isEvaluateStratifiedPart()) {
preprocessed = new StratifiedEvaluation().apply(analyzed).toNormalProgram();
} else {
preprocessed = program;
}
depGraph = analyzed.getDependencyGraph();
compGraph = analyzed.getComponentGraph();
final Solver solver = prepareSolverFor(analyzed, filter);
return new DebugSolvingContext() {
@Override
public Solver getSolver() {
return solver;
}
@Override
public NormalProgram getPreprocessedProgram() {
return preprocessed;
}
@Override
public NormalProgram getNormalizedProgram() {
return program;
}
@Override
public DependencyGraph getDependencyGraph() {
return depGraph;
}
@Override
public ComponentGraph getComponentGraph() {
return compGraph;
}
};
}
Aggregations