@Test(groups = "1s", timeOut = 60000) public void testfirstNotInst() throws ContradictionException { cos.stampIt(mvars[0]); cos.stampIt(mvars[1]); cos.stampIt(mvars[2]); cos.stampIt(mvars[3]); cos.stampIt(mvars[4]); cos.stampIt(mvars[5]); Assert.assertEquals(cos.firstNotInst(), mvars[5]); mvars[5].instantiateTo(0, Cause.Null); Assert.assertEquals(cos.firstNotInst(), mvars[4]); mvars[4].instantiateTo(0, Cause.Null); mvars[3].instantiateTo(0, Cause.Null); Assert.assertEquals(cos.firstNotInst(), mvars[2]); mvars[2].instantiateTo(0, Cause.Null); Assert.assertEquals(cos.firstNotInst(), mvars[1]); mvars[1].instantiateTo(0, Cause.Null); mvars[0].instantiateTo(0, Cause.Null); Assert.assertNull(cos.firstNotInst()); }
V firstNotInst() { int p = pcft; V v; while (p > -1) { v = vars.get(p); if (!v.isInstantiated()) { return vars.get(p); } p = prev.get(p); } return null; }
ConflictOrderingSearch extends AbstractStrategy<V> implements IMonitorContradiction { V firstNotInst() { int p = pcft; V v; while (p > -1) { v = vars.get(p); if (!v.isInstantiated()) { return vars.get(p); } p = prev.get(p); } return null; } }
ConflictOrderingSearch extends AbstractStrategy<V> implements IMonitorContradiction { V firstNotInst() { int p = pcft; V v; while (p > -1) { v = vars.get(p); if (!v.isInstantiated()) { return vars.get(p); } p = prev.get(p); } return null; } ConflictOrderingSearch(Model model, AbstractStrategy<V> mainStrategy); }
ConflictOrderingSearch extends AbstractStrategy<V> implements IMonitorContradiction { V firstNotInst() { int p = pcft; V v; while (p > -1) { v = vars.get(p); if (!v.isInstantiated()) { return vars.get(p); } p = prev.get(p); } return null; } ConflictOrderingSearch(Model model, AbstractStrategy<V> mainStrategy); @Override boolean init(); @Override void remove(); @SuppressWarnings("unchecked") @Override Decision<V> getDecision(); @Override void onContradiction(ContradictionException cex); }
ConflictOrderingSearch extends AbstractStrategy<V> implements IMonitorContradiction { V firstNotInst() { int p = pcft; V v; while (p > -1) { v = vars.get(p); if (!v.isInstantiated()) { return vars.get(p); } p = prev.get(p); } return null; } ConflictOrderingSearch(Model model, AbstractStrategy<V> mainStrategy); @Override boolean init(); @Override void remove(); @SuppressWarnings("unchecked") @Override Decision<V> getDecision(); @Override void onContradiction(ContradictionException cex);  }