backward chaining for inference in a knowledge base