Compare the Difference Between Similar Terms

Difference Between

Home / Technology / IT / Programming / Difference Between Prolog and Lisp

Difference Between Prolog and Lisp

May 20, 2011 Posted by Indika

Prolog vs Lisp

Prolog and Lisp are two of the most popular AI (Artificial Intelligence) computer programming languages today. They are built with two different programming paradigms. Prolog is a declarative language, while Lisp is a functional language. Both are used for various AI problems but Prolog is used most for logic and reasoning problems, while Lisp is used for problems with rapid prototyping needs.

Prolog

Prolog is an AI programming language. It belongs to the family of logic programming languages. Prolog is a declarative language, in which computations are carried over by running queries over the relations (which represent program logic), which are defined as rules and fact. Developed in 1970, prolog is one of the oldest logic programming languages and one of the most popular AI programming languages today (along with Lisp). It is a free language, but many commercial variants are available. It was first used for natural language processing, but now it is been used for various tasks such as expert systems, automated answering systems, games and advanced control systems. Prolog has only one data type called the term. A Term can be an atom, number, variable or a compound term. Numbers can be float or integers. Prolog supports lists and string as collection of items. Prolog defines relations using clauses. Clauses can be either rules or facts. Prolog allows iteration thorough its recursive predicates.

Lisp

Lisp is a family of computer programming languages. And the most famous Lisp dialects used for general purpose programming today are Common Lisp and Scheme. The name LISP comes from “LISt Processing” and as it hints, Lisp’s major data structure is the linked list. In fact the whole source is written using lists (using prefix notation), or more correctly parenthesized lists (called s-expressions). For example, a function call is written as (f a1 a2 a3), which means function f is called using a1, a2 and a3 as input arguments for the function. Therefore it is called an expression oriented language, where all data and code are written as expressions (there is no distinction between expressions and statements in Lisp). This nice feature is very special to Lisp, where it could be used to extend the language to the problem at hand by writing helpful macros. Although tail-recursion is used by programmers to express loops, all frequently seen Lisp dialects do include control structures like loop. Furthermore, Common Lisp and scheme have mapcar and map that are examples of functions, which provide looping functionality by applying the function successively to all its elements and then collects the results in to a list.

What is the difference between Prolog and Lisp?

Although, Prolog and Lisp are two of the most popular AI programming languages, they have various differences. Lisp is a functional language, while Prolog is a logic programming and declarative languages. Lisp is very flexible due to its fast prototyping and macro features, so it actually allows extending the language to suit the problem at hand. In the areas of AI, graphics and user interfaces, Lisp has been used extensively because of this rapid prototyping ability. However, due to its inbuilt logic programming abilities, Prolog is ideal for AI problems with symbolic reasoning, database and language parsing applications. Choice of one over the other completely depends on the type of AI problem that need to be solved.

Related posts:

Difference Between Compiler and Interpreter Difference Between Strong AI and Weak AI Difference Between Dictionary and Hashtable Difference Between Hashtable and Hashmap Difference Between QTP 9.5 and QTP 10

Filed Under: Programming Tagged With: AI, AI computer programming languages, AI programming languages, artificial intelligence, Common Lisp, declarative language, expression oriented language, functional language, LISP, Lisp dialects, LISt Processing, logic programming languages, programming languages used in advanced control systems, programming languages used in automated answering systems, programming languages used in expert systems, programming languages used in games, Prolog, s-expressions, scheme, tail-recursion

About the Author: Indika

Indika, BSc.Eng, MSECE Computer Engineering, PhD. Computer Science, is an Assistant Professor and has research interests in the areas of Bioinformatics, Computational Biology, and Biomedical Natural Language Processing.

Comments

  1. ChrisDevo says

    March 24, 2013 at 1:08 pm

    “Prolog is a declarative language, while Lisp is a functional language.”

    Functional languages are declarative as well. So both Lisp and Prolog are declarative languages.

    Reply
  2. Masieh Sharifi says

    March 28, 2020 at 5:09 am

    prolog and Lisp are two of the most popular artificial intelligence computer programming languages today.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Request Article

Featured Posts

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and SARS

Difference Between Coronavirus and SARS

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Covid 19

Difference Between Coronavirus and Covid 19

You May Like

Difference Between ROCE and ROE

Difference Between Hiking and Walking

Difference Between Absurdism and Existentialism

Difference Between Mechanical Digestion and Chemical Digestion

Difference Between Mechanical Digestion and Chemical Digestion

What is the Difference Between Neutralizing and Binding Antibodies

What is the Difference Between Neutralizing and Binding Antibodies

Latest Posts

  • What is the Difference Between Diphtheria and Whooping Cough
  • What is the Difference Between Polyester and Satin
  • What is the Difference Between Syphilis and Gonorrhea
  • What is the Difference Between Stainless Steel and Sterling Silver
  • What is the Difference Between Infrared and Induction Cooker
  • What is the Difference Between Polyester and Viscose
  • Home
  • Vacancies
  • About
  • Request Article
  • Contact Us

Copyright © 2010-2018 Difference Between. All rights reserved. Terms of Use and Privacy Policy: Legal.