We have already seen the difference between a Logic programming language and a traditional functional programming language. Figure 1 summarizes this difference pictorially.

While functional programming requires step-by-step instructions to solve a particular problem, logic programming, on the other hand, uses a knowledge base to find answers to the given questions.
In functional programming, we have to specify the steps to solve a particular problem, but in logic programming, we just have to give the problem. The logic programming automatically finds a suitable solution to solve that problem.

Leave a Reply