Experiment 1
Experiment 1
Symbols
Prolog expressions are composed of the following truth-functional symbols, which have the
same interpretation as in the predicate calculus.
Variables begin with an uppercase letter. Predicate names, function names, and the names for objects
must begin with a lowercase letter. Rules for forming names are the same as for the predicate
calculus.
Facts
A fact is a predicate expression that makes a declarative statement about the problem domain.
Whenever a variable occurs in a Prolog expression, it is assumed to be universally quantified. Note
that all Prolog sentences must end with a period.
Key Features:
1. Unification: The basic idea is, can the given terms be made to represent the same structure.
2. Backtracking: When a task fails, prolog traces backwards and tries to satisfy previous task.
3. Recursion: Recursion is the basis for any search in program.
Prolog is used in various domains. It plays a vital role in the automation system. Following are some
other important fields where Prolog is used −
Disadvantages: