2. Objective
• Our objective is to make a complete family tree which covers all over the
family and we will define all of the Facts, Rule and Predicates between
them.
• To introduce the basic concepts of prolog.
• To Implement a simple knowledge base i.e. (on a family tree).
• To get familiar with SWI-Prolog working environment.
3. Introduction
• SWI-Prolog is an easy s/w for logical programming. You can
build, compile and apply query on your code to retrieve results.
• Prolog is a logic programming language. It has important role in
artificial intelligence. Unlike many other programming
languages, Prolog is intended primarily as a declarative
programming language. In prolog, logic is expressed as relations
(called as Facts and Rules).
4. Definition
• Prolog stands for “Programming with Logic”. It is different from other
programming languages and used for artificial programming. It’s Declarative,
No Recursion (no “for” or “while” loops), No Relations (no functions), High-
level language and Think declaratively, not procedurally.
• Prolog is referred to as a declarative language because all program statements
are definitional. In particular, a Prolog program consists of facts and rules which
serve to define relations (in the mathematical sense) on sets of values.
5. Some more Definitions
• Knowledge Base is simply a collection of facts. Facts are used to state
things that are unconditionally true of some situation of interest
• Facts and Rules
• Everything in Prolog is defined in terms of two constructs: the fact and the rule
• A Fact states that a certain tuple of values satisfies a predicate unconditionally.
• A Rule, on the other hand, is a Prolog statement which gives conditions under
which tuples satisfy predicate.
6. Applications of PROLOG
• Some applications of Prolog are:
• natural language understanding.
• expert systems.
• specification language.
• machine learning.
• robot planning.
• problem solving.