Renamed meta predicate for simplicity.
This commit is contained in:
parent
94b204615b
commit
0a1044743e
@ -114,9 +114,9 @@ void TranslatorASP::translateTypes() const
|
|||||||
<< "(" << typeName << "), " << utils::Keyword("type")
|
<< "(" << typeName << "), " << utils::Keyword("type")
|
||||||
<< "(" << parentTypeName << "))." << std::endl
|
<< "(" << parentTypeName << "))." << std::endl
|
||||||
|
|
||||||
<< utils::Keyword("hasType") << "(" << utils::Variable("X") << ", "
|
<< utils::Keyword("has") << "(" << utils::Variable("X") << ", "
|
||||||
<< utils::Keyword("type") << "(" << parentTypeName << ")) :- "
|
<< utils::Keyword("type") << "(" << parentTypeName << ")) :- "
|
||||||
<< utils::Keyword("hasType") << "(" << utils::Variable("X") << ", "
|
<< utils::Keyword("has") << "(" << utils::Variable("X") << ", "
|
||||||
<< utils::Keyword("type") << "(" << typeName << "))." << std::endl;
|
<< utils::Keyword("type") << "(" << typeName << "))." << std::endl;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -271,13 +271,13 @@ void TranslatorASP::translateConstants(const std::string &heading, const express
|
|||||||
|
|
||||||
if (type != nullptr)
|
if (type != nullptr)
|
||||||
{
|
{
|
||||||
m_outputStream << utils::Keyword("hasType") << "("
|
m_outputStream << utils::Keyword("has") << "("
|
||||||
<< utils::Keyword("constant") << "(" << constantName << "), "
|
<< utils::Keyword("constant") << "(" << constantName << "), "
|
||||||
<< utils::Keyword("type") << "(" << utils::escapeASP(type->name()) << "))." << std::endl;
|
<< utils::Keyword("type") << "(" << utils::escapeASP(type->name()) << "))." << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_outputStream << utils::Keyword("hasType") << "("
|
m_outputStream << utils::Keyword("has") << "("
|
||||||
<< utils::Keyword("constant") << "(" << constantName << "), "
|
<< utils::Keyword("constant") << "(" << constantName << "), "
|
||||||
<< utils::Keyword("type") << "(object))." << std::endl;
|
<< utils::Keyword("type") << "(object))." << std::endl;
|
||||||
}
|
}
|
||||||
@ -329,13 +329,13 @@ void TranslatorASP::translateVariablesBody(const expressions::Variables &variabl
|
|||||||
|
|
||||||
const auto &type = *dynamic_cast<const expressions::PrimitiveType *>(variable.type());
|
const auto &type = *dynamic_cast<const expressions::PrimitiveType *>(variable.type());
|
||||||
|
|
||||||
m_outputStream << utils::Keyword("hasType") << "("
|
m_outputStream << utils::Keyword("has") << "("
|
||||||
<< utils::Variable(utils::escapeASPVariable(variable.name())) << ", "
|
<< utils::Variable(utils::escapeASPVariable(variable.name())) << ", "
|
||||||
<< utils::Keyword("type") << "(" << utils::escapeASP(type.name()) << "))";
|
<< utils::Keyword("type") << "(" << utils::escapeASP(type.name()) << "))";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_outputStream << utils::Keyword("hasType") << "("
|
m_outputStream << utils::Keyword("has") << "("
|
||||||
<< utils::Variable(utils::escapeASPVariable(variable.name())) << ", "
|
<< utils::Variable(utils::escapeASPVariable(variable.name())) << ", "
|
||||||
<< utils::Keyword("type") << "(object))";
|
<< utils::Keyword("type") << "(object))";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user