public boolean activate(final Individual ind, final ATermAppl type, final DependencySet ds) { assert _predicate.equals(type); if (_name != null) { final Individual node = initNode(); if (!ind.isSame(node)) return false; } activate(WME.createType(ind, type, ds)); return true; }
public boolean activate(final Individual ind, final ATermAppl type, final DependencySet ds) { assert _predicate.equals(type); if (_name != null) { final Individual node = initNode(); if (!ind.isSame(node)) return false; } activate(WME.createType(ind, type, ds)); return true; }
@Override public DependencySet check(final VariableBinding binding) { final Individual ind1 = binding.get(_arg1); final Individual ind2 = binding.get(_arg2); if (ind1.isSame(ind2)) { // we might be returning a super set of the actual dependency // set for the sameness since it is not straight-forward to come // up with the exact dependency set if there are other // individuals involved in this sameAs inference final DependencySet ds1 = ind1.getMergeDependency(true); final DependencySet ds2 = ind2.getMergeDependency(true); return ds1 == null ? ds2 : ds2 == null ? ds1 : ds1.union(ds2, true); } else return null; }
@Override public DependencySet check(final VariableBinding binding) { final Individual ind1 = binding.get(_arg1); final Individual ind2 = binding.get(_arg2); if (ind1.isSame(ind2)) { // we might be returning a super set of the actual dependency // set for the sameness since it is not straight-forward to come // up with the exact dependency set if there are other // individuals involved in this sameAs inference final DependencySet ds1 = ind1.getMergeDependency(true); final DependencySet ds2 = ind2.getMergeDependency(true); return ds1 == null ? ds2 : ds2 == null ? ds1 : ds1.union(ds2, true); } else return null; }
if (y.isSame(z)) return;
if (y.isSame(z)) return;
if (head.isSame(next)) continue;
if (head.isSame(next)) continue;
for (int i = 0; i < inds.length - 1; i++) for (int j = i + 1; j < inds.length; j++) if (_kb.getABox().getIndividual(inds[i]).isSame(_kb.getABox().getIndividual(inds[j]))) _kb.addDifferent(inds[i], inds[j]); assertTrue(_kb.isConsistent());