 To run a program in Prolog, a query is posed and based upon the inference engine and the specific facts in the knowledge base, a result is returned.The result can be anything appropriate from a new relation or predicate, to a literal such as a Boolean (true/false), depending on the engine and type system.Category