36 auto&& program = translationUnit.getProgram();
37 auto&& report = translationUnit.getErrorReport();
41 if (isFact(clause)) return;
43 auto isGrounded = analysis::getGroundedTerms(translationUnit, clause);
45 std::set<std::string> reportedVars;
47 for (auto&& cur : getVariables(clause)) {
48 if (!isGrounded[cur] && reportedVars.insert(cur->getName()).second) {
49 report.addError(
"Ungrounded variable " + cur->getName(), cur->getSrcLoc());
55 if (!isGrounded[&record]) {
56 report.addError(
"Ungrounded record", record.getSrcLoc());
62 if (!isGrounded[&adt]) {
63 report.addError(
"Ungrounded ADT branch", adt.getSrcLoc());