private static void addTemplateCallResults(List<ConstraintViolation> results, QueryOrTemplateCall qot,
			Resource resource, boolean matchValue, SPINModuleRegistry registry) {
		TemplateCall templateCall = qot.getTemplateCall();
		Template template = templateCall.getTemplate(registry);
		if(template != null && template.getBody() instanceof org.topbraid.spin.model.Query) {
			org.topbraid.spin.model.Query spinQuery = (org.topbraid.spin.model.Query) template.getBody();
			if(spinQuery instanceof Ask || spinQuery instanceof Construct) {
				Model model = resource.getModel();
				Query arq = ARQFactory.get().createQuery(spinQuery, registry);
				QueryExecution qexec = ARQFactory.get().createQueryExecution(arq, model);
				setInitialBindings(resource, templateCall, qexec, registry);
				
				if(spinQuery instanceof Ask) {
					if(qexec.execAsk() != matchValue) {
						List<SimplePropertyPath> paths = getPropertyPaths(resource, spinQuery.getWhere(), templateCall.getArgumentsMapByProperties(registry), registry);
						String message = SPINLabels.get().getLabel(templateCall);
						message += "\n(SPIN constraint at " + SPINLabels.get().getLabel(qot.getCls()) + ")";
						results.add(createConstraintViolation(paths, NO_FIXES, resource, message, templateCall));
					}
				}
				else if(spinQuery instanceof Construct) {
					Model cm = qexec.execConstruct();
					qexec.close();
					Resource source = getSource(qot);
					String label = SPINLabels.get().getLabel(templateCall);
					addConstructedProblemReports(cm, results, model, qot.getCls(), resource, label, source, registry);
				}
			}
		}
	}