@Override public BindingGenerator createGenerator(final Rule rule, final VariableBinding initialBinding) { List<BindingHelper> helpers; final BodyAtomsToSelectiveHelpersVisitor selectiveVisitor = new BodyAtomsToSelectiveHelpersVisitor(); final Set<AtomIVariable> instanceVariables = new HashSet<>(); final Set<AtomDVariable> dataVariables = new HashSet<>(); for (final RuleAtom pattern : rule.getBody()) { pattern.accept(selectiveVisitor); instanceVariables.addAll(VariableUtils.getIVars(pattern)); dataVariables.addAll(VariableUtils.getDVars(pattern)); } helpers = selectiveVisitor.getHelpers(); final Set<AtomVariable> selectiveVariables = new HashSet<>(); for (final BindingHelper helper : helpers) { final Collection<AtomVariable> emptyCollection = Collections.emptySet(); selectiveVariables.addAll(helper.getBindableVars(emptyCollection)); } // if ( !selectiveVariables.containsAll( dataVariables ) ) { // ABox._logger.warning( "IGNORING RULE "+rule+": Cannot generate bindings for all _data variables." ); // return new BindingGeneratorImpl(); // } for (final AtomIVariable var : instanceVariables)
@Override public BindingGenerator createGenerator(final Rule rule, final VariableBinding initialBinding) { List<BindingHelper> helpers; final BodyAtomsToSelectiveHelpersVisitor selectiveVisitor = new BodyAtomsToSelectiveHelpersVisitor(); final Set<AtomIVariable> instanceVariables = new HashSet<>(); final Set<AtomDVariable> dataVariables = new HashSet<>(); for (final RuleAtom pattern : rule.getBody()) { pattern.accept(selectiveVisitor); instanceVariables.addAll(VariableUtils.getIVars(pattern)); dataVariables.addAll(VariableUtils.getDVars(pattern)); } helpers = selectiveVisitor.getHelpers(); final Set<AtomVariable> selectiveVariables = new HashSet<>(); for (final BindingHelper helper : helpers) { final Collection<AtomVariable> emptyCollection = Collections.emptySet(); selectiveVariables.addAll(helper.getBindableVars(emptyCollection)); } // if ( !selectiveVariables.containsAll( dataVariables ) ) { // ABox._logger.warning( "IGNORING RULE "+rule+": Cannot generate bindings for all _data variables." ); // return new BindingGeneratorImpl(); // } for (final AtomIVariable var : instanceVariables)