@Override public void propagate(int evtmask) throws ContradictionException { PropUtil.envSubsetEnv(s1, s2, this); PropUtil.envSubsetEnv(s2, s1, this); PropUtil.kerSubsetKer(s1, s2, this); PropUtil.kerSubsetKer(s2, s1, this); }
@Override public void propagate(int evtmask) throws ContradictionException { if (!antecedent.isInstantiated()) { if (!PropUtil.isKerSubsetEnv(result, consequent) || !PropUtil.isKerSubsetEnv(consequent, result)) { antecedent.instantiateTo(0, this); } else if (!PropUtil.isKerSubsetEnv(result, alternative) || !PropUtil.isKerSubsetEnv(alternative, result)) { antecedent.instantiateTo(1, this); } else { ISetIterator iter = result.getUB().iterator(); while (iter.hasNext()) { int i = iter.nextInt(); if (!consequent.getUB().contains(i) && !alternative.getUB().contains(i)) { result.remove(i, this); } else if (consequent.getLB().contains(i) && alternative.getLB().contains(i)) { result.force(i, this); } } } } if (antecedent.isInstantiated()) { if (antecedent.getValue() == 1) { PropUtil.envSubsetEnv(result, consequent, this); PropUtil.envSubsetEnv(consequent, result, this); PropUtil.kerSubsetKer(result, consequent, this); PropUtil.kerSubsetKer(consequent, result, this); } else { PropUtil.envSubsetEnv(result, alternative, this); PropUtil.envSubsetEnv(alternative, result, this); PropUtil.kerSubsetKer(result, alternative, this); PropUtil.kerSubsetKer(alternative, result, this); } } }