logic-ng/LogicNG

enumerateAllModels with additionalVariables

d-bischoff opened this issue · 1 comments

Judging from the documentation, i expected this test case to suceed. It doesn't,

@Test
public void testModelEnumerationWithDontCares() {
    FormulaFactory factory = new FormulaFactory();
    SATSolver solver = MiniSat.miniSat(factory);
    Variable a = factory.variable("A");
    Variable b = factory.variable("B");
    solver.add(a);
    List<Variable> allVars = new LinkedList<>();
    allVars.add(a);
    allVars.add(b);
    List<Assignment> models = solver.enumerateAllModels(null,allVars);
    //The models should be A,B as well as A, -B
    assertEquals(2, models.size());
  }

missunderstood documentation.