public InferenceResult ask(FOLKnowledgeBase KB, Sentence query)
{
// Assertions on the type queries this Inference procedure
// supports
if (!(query is AtomicSentence))
{
throw new ArgumentException(
"Only Atomic Queries are supported.");
}
List<Literal> goals = new List<Literal>();
goals.Add(new Literal((AtomicSentence)query));
BCAskAnswerHandler ansHandler = new BCAskAnswerHandler();
List<List<ProofStepBwChGoal>> allProofSteps = folbcask(KB, ansHandler,
goals, new Dictionary<Variable, Term>());
ansHandler.setAllProofSteps(allProofSteps);
return ansHandler;
}