Prolog : What is Prolog

·

2 min read

As usual, the first article of a language is a introduction article.But I want to say, I like Prolog when I first known this language. It is concise, efficient and logical. I can't wait to use it.

What is Prolog

Prolog is a logic programming language associated with artificial intelligence and computational linguistics.

Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily as a declarative programming language: the program logic is expressed in terms of relations, represented as facts and rules. A computation is initiated by running a query over these relations.

Prolog was one of the first logic programming languages[8] and remains the most popular such language today, with several free and commercial implementations available.

Why it named Prolog

The name Prolog was chosen by Philippe Roussel as an abbreviation for programmation en logique (French for programming in logic).

A short history of Prolog

The language was developed and implemented in Marseille, France, in 1972 by Alain Colmerauer with Philippe Roussel, based on Robert Kowalski's procedural interpretation of Horn clauses at University of Edinburgh.A very fast version was implemented on the DEC-10 computer at the University of Edinburgh, Scotland, by David Warren and his group in 1979.

What is Prolog used for?

The language has been used for theorem proving, expert systems, term rewriting, type systems,and automated planning, as well as its original intended field of use, natural language processing. Modern Prolog environments support the creation of graphical user interfaces, as well as administrative and networked applications. Following are some areas in which prolog is used:

  • intelligent data base retrieval.
  • natural language understanding.
  • expert systems.
  • specification language.
  • machine learning.
  • robot planning.
  • automated reasoning.
  • problem solving.

Features

  1. Prolog is a Declarative Language
  2. Prolog uses the Language of Predicate Calculus
  3. Prolog Handles Lists and Recursion Naturally
  4. Prolog Provides for Very Efficient Coding for Problems Requiring Inference

Disadvantages of Prolog-Programming

  1. LISP in general has better I/O features than does Prolog.
  2. Prolog in general does not support graphics. An exception is the recently released Turbo Prolog.

  3. The order in which rules are entered greatly effects the efficiency of Prolog. The order of LISP functions has minimal effect on LISP efficiency.

  4. Prolog and LISP may be used together. Certain AI applications are more naturally programmed in LISP and others in Prolog. A hybrid system which mixes and merges the two languages may provide the optimum configuration. There are two modes in which this combination may be implemented.

Resources:

Wiki:en.wikipedia.org/wiki/Prolog
Prolog-Programming: Features and Disadvantages :engineeringenotes.com/artificial-intelligen..