Prolog, Programming in logic, is a declarative programming language that is based on the ideas of logic programming. Prolog was an idea to make the logic look like a programming language and also the idea of the prolog was to allow the logic to be controlled by a programmer to advance the research for theorem-proving.
Logical paradigm is a programming paradigm that is a road-map to the machine learning languages. It tends to impose a certain view of the world on its user.
When a paradigm is applied in problem domains that deal with the extraction of knowledge from basic relations and facts, the logic paradigm fits extremely well. In the more general areas of computation, the logical paradigm seems less natural. In logic (declarative) paradigm, programmers don’t focus on the development of an algorithm to achieve any goal rather they focus only on the ‘goals of any computation’. They focus only on the logic, the what, that has to be achieved. The technique is referred to as resolution and involves the interpreter that searching through the set of all possible solutions.
Computer scientists are using logic programming method to try to allow machines to reason because this method is useful for knowledge representation. Logic paradigm is based on first order predicate logic.
Two basic terms are used in logical paradigm.
In logic programming, the logic used to represent knowledge is clausal form that is a subset of first-order predicate logic. First order logic is used because of its understandable nature as well as it is able to represent all computational problems. Resolution inference system is used to manipulate the knowledge. It is required for proving theorems in clausal-form logic. The essence of logic programming is shown in the below diagram.
In the logic paradigm, a program consists of a set of predicates and rules of inference. Predicates are fact based statements i.e. water is wet. On other hand, rules of inference are statements such as “if X is human then X is mortal”.