use of at.ac.tuwien.kr.alpha.grounder.BooleanAssignmentReader in project Alpha by alpha-asp.
the class DefaultSolver method obtainNoGoodsFromGrounder.
/**
* Obtains new NoGoods from grounder and adds them to the NoGoodStore and the heuristics.
* @return false iff the set of NoGoods is detected to be unsatisfiable.
*/
private boolean obtainNoGoodsFromGrounder() {
Map<Integer, NoGood> obtained = grounder.getNoGoods(new BooleanAssignmentReader(assignment));
LOGGER.debug("Obtained NoGoods from grounder: {}", obtained);
if (!obtained.isEmpty()) {
// Record to detect propagation fixpoint, checking if new NoGoods were reported would be better here.
didChange = true;
}
// Record choice atoms.
final Pair<Map<Integer, Integer>, Map<Integer, Integer>> choiceAtoms = grounder.getChoiceAtoms();
choiceManager.addChoiceInformation(choiceAtoms);
// Inform heuristics.
branchingHeuristic.newNoGoods(obtained.values());
return addAllNoGoodsAndTreatContradictions(obtained);
}
Aggregations