public ContinuousRulesStrategy(final ABox abox) { super(abox); _bindingStrategy = new BindingGeneratorStrategyImpl(abox); _partialBindings = new ConcurrentLinkedQueue<>(); _unsafeRules = new HashSet<>(); _rulesApplied = new HashMap<>(); _atermTranslator = new RulesToATermTranslator(); _ruleAtomAsserter = new RuleAtomAsserter(); _atomTester = new TrivialSatisfactionHelpers(abox); }
@Test public void testIsAtomTrue() { _kb.addObjectProperty(p); _kb.addIndividual(mary); _kb.addIndividual(robert); _kb.addPropertyValue(p, mary, robert); final VariableBinding binding = new VariableBinding(_kb.getABox()); binding.set(_x, mary); binding.set(_y, robert); final RuleAtom atom = new IndividualPropertyAtom(p, _x, _y); final TrivialSatisfactionHelpers tester = new TrivialSatisfactionHelpers(_kb.getABox()); assertTrue(tester.isAtomTrue(atom, binding) != null); }
helpers.add(new ObjectVariableBindingHelper(_abox, var)); helpers.addAll(new TrivialSatisfactionHelpers(_abox).getHelpers(rule));
final DependencySet atomDS = _atomTester.isAtomTrue(atom, binding); if (atomDS != null) ds = ds.union(atomDS, _abox.doExplanation()); final DependencySet atomDS = _atomTester.isAtomTrue(atom, binding); if (atomDS == null) atoms.add(atom);
helpers.add(new ObjectVariableBindingHelper(_abox, var)); helpers.addAll(new TrivialSatisfactionHelpers(_abox).getHelpers(rule));
final DependencySet atomDS = _atomTester.isAtomTrue(atom, binding); if (atomDS != null) ds = ds.union(atomDS, _abox.doExplanation()); final DependencySet atomDS = _atomTester.isAtomTrue(atom, binding); if (atomDS == null) atoms.add(atom);
public ContinuousRulesStrategy(final ABox abox) { super(abox); _bindingStrategy = new BindingGeneratorStrategyImpl(abox); _partialBindings = new ConcurrentLinkedQueue<>(); _unsafeRules = new HashSet<>(); _rulesApplied = new HashMap<>(); _atermTranslator = new RulesToATermTranslator(); _ruleAtomAsserter = new RuleAtomAsserter(); _atomTester = new TrivialSatisfactionHelpers(abox); }