Saturday, November 3, 2007

Introduction to Prolog (Part 1)

History of Prolog

  • Prolog was developed at the University of Marseilles, France by Alain Colmerauer in the early 1970s as a convenient tool for PROgramming in LOGic.
  • In 1983 Japan chose Prolog as the main language for 5th generation computers.
  • Turbo Prolog was the first implementation of Prolog for IBM PC that came out in 1986.
  • Visual Prolog is developed by PDC in Denmark.

What Can Prolog be Used For?

  • Expert Systems.
  • Artificial Intelligent Systems.
  • Translate languages, either natural human languages or from one programming language to another.
  • Construct Natural Language interfaces to existing software.
  • Control and monitoring of industrial processes.
  • Theorem proving software in which deductive reasoning capabilities are used.
  • Development of Relational Databases.
  • Produce prototypes for virtually any application program.

In what Areas Prolog is Distinctively Better?

  • Prolog is a Descriptive Language.
  • Prolog Uses Facts and Rules.
  • Prolog can make Deductions.
  • Pattern Matching ability.
  • Execution of Prolog Programs is Controlled automatically.
  • Prolog is very User-friendly and has a short and simple syntax.
  • Efficiency of Application Programs is almost as good as for C++ programs.

Glossary of Terms

  • Atom: A relation possibly involving objects or variables.
  • Domain: Specifies the types of values the objects may take in relation.
  • Clause: A fact or rule for a particular predicate, followed by a period.
  • Fact: . Facts declare things that are always true. It is a relation between objects. In the fact;
      • likes(john, mary)
  • likes is the name of the relation and john and mary are objects.
  • Rule: Rules declare things that are true depending on some conditions. It is a relationship between a fact and a list of sub-goals which must be satisfied for that fact to be true.
  • Predicate: Every Prolog fact or rule belongs to some predicate, which specifies the name of the relation involved and the types of objects involved in the relation.
  • Backtracking: The mechanism built into Prolog whereby, when evaluation of a given sub-goal is complete, Prolog returns to the previous sub-goal and tries to satisfy it in a different way.

1 comment:

Unknown said...

A detailed information about Visual Prolog programming language mentioned in the article might be found at Visual Prolog official site.