public bool Undefined(PredicateIndicator p)
{
if (PrologPrimitives.IsDefined(p))
return false;
if (CheckForPredicateInfoInThisKB(p) != null)
return false;
foreach (KnowledgeBase import in imports)
if (!import.Undefined(p))
return false;
return true;
}