SentenceForm headForm = model.getSentenceForm(rule.getHead());
Map<GdlVariable, Set<GdlConstant>> varDomains = SentenceDomainModels.getVarDomains(rule, domainModel, VarDomainOpts.INCLUDE_HEAD);
Map<SentenceForm, ? extends FunctionInfo> functionInfoMap = sentencesSoFar.getFunctionInfo();
Map<SentenceForm, ? extends Collection<GdlSentence>> completedSentenceFormValues = sentencesSoFar.getSentences().asMap();
AssignmentsImpl assignments = new AssignmentsImpl(rule, varDomains, functionInfoMap, completedSentenceFormValues);
AssignmentIterator asnItr = assignments.getIterator();
GdlSentenceSet sentencesToAdd = GdlSentenceSet.create();
while (asnItr.hasNext()) {
Map<GdlVariable, GdlConstant> assignment = asnItr.next();
boolean allSatisfied = true;
for (GdlLiteral literal : rule.getBody()) {