use of at.ac.tuwien.kr.alpha.common.NoGood in project Alpha by alpha-asp.
the class BerkMinTest method countPositiveLiteralsOnce.
@Test
public void countPositiveLiteralsOnce() {
NoGood violatedNoGood = new NoGood(1, 2);
berkmin.violatedNoGood(violatedNoGood);
berkmin.analyzedConflict(pseudo(violatedNoGood));
assertEquals(1, berkmin.getActivity(1), EPSILON);
assertEquals(1, berkmin.getActivity(2), EPSILON);
}
use of at.ac.tuwien.kr.alpha.common.NoGood in project Alpha by alpha-asp.
the class BerkMinTest method countNegativeLiteralsOnce.
@Test
public void countNegativeLiteralsOnce() {
NoGood violatedNoGood = new NoGood(-1, -2);
berkmin.violatedNoGood(violatedNoGood);
berkmin.analyzedConflict(pseudo(violatedNoGood));
assertEquals(1, berkmin.getActivity(-1), EPSILON);
assertEquals(1, berkmin.getActivity(-2), EPSILON);
}
use of at.ac.tuwien.kr.alpha.common.NoGood in project Alpha by alpha-asp.
the class NoGoodStoreAlphaRoamingTest method binaryNoGoodViolatedDuringAdditionAllTrue.
@Test
public void binaryNoGoodViolatedDuringAdditionAllTrue() {
NoGood noGood = new NoGood(1, 2);
assertTrue(assignment.assign(1, TRUE));
assertTrue(assignment.assign(2, TRUE));
NoGoodStore.ConflictCause conflictCause = store.add(11, noGood);
assertNotNull(conflictCause);
assertNotNull(conflictCause.violatedNoGood);
}
use of at.ac.tuwien.kr.alpha.common.NoGood in project Alpha by alpha-asp.
the class NoGoodStoreAlphaRoamingTest method conflictingBinary.
@Test
public void conflictingBinary() {
final NoGood noGood = new NoGood(1, 2);
assignment.assign(1, TRUE);
assignment.assign(2, TRUE);
NoGoodStore.ConflictCause conflictCause = store.add(1, noGood);
assertEquals(noGood, conflictCause.violatedNoGood);
}
use of at.ac.tuwien.kr.alpha.common.NoGood in project Alpha by alpha-asp.
the class NoGoodStoreAlphaRoamingTest method naryNoGoodViolatedAfterAddition.
@Test
public void naryNoGoodViolatedAfterAddition() {
NoGood noGood = new NoGood(1, 2, 3);
assertNull(store.add(11, noGood));
assertTrue(assignment.assign(1, MBT));
assertTrue(assignment.assign(2, MBT));
assertTrue(assignment.assign(3, MBT));
store.propagate();
assertNotNull(store.getViolatedNoGood());
}
Aggregations