use of org.logicng.propositions.ExtendedProposition in project LogicNG by logic-ng.
the class DRUPTest method testWithCcPropositions.
@Test
public void testWithCcPropositions() throws ParserException {
final FormulaFactory f = new FormulaFactory();
final SATSolver solver = MiniSat.miniSat(f, MiniSatConfig.builder().proofGeneration(true).cnfMethod(MiniSatConfig.CNFMethod.PG_ON_SOLVER).build());
final ExtendedProposition<StringBackpack> p1 = new ExtendedProposition<>(new StringBackpack("CC"), f.parse("A + B + C <= 1"));
final StandardProposition p2 = new StandardProposition(f.parse("A"));
final StandardProposition p3 = new StandardProposition(f.parse("B"));
final StandardProposition p4 = new StandardProposition(f.parse("X & Y"));
solver.add(p1);
solver.add(p2);
solver.add(p3);
solver.add(p4);
assertThat(solver.sat()).isEqualTo(FALSE);
assertThat(solver.unsatCore().propositions()).containsExactlyInAnyOrder(p1, p2, p3);
}
Aggregations