
- Prolog - Home
- Prolog - Introduction
- Prolog - Environment Setup
- Prolog - Hello World
- Prolog - Basics
- Prolog - Relations
- Prolog - Data Objects
- Prolog - Operators
- Loop & Decision Making
- Conjunctions & Disjunctions
Prolog Lists
- Prolog - Lists
- Prolog - Member of List
- Prolog - Length of List
- Prolog - Concatenating Lists
- Prolog - Appending to a List
- Prolog - Deleting from a List
- Prolog - Inserting into a List
- Prolog - Permutation Operation
- Prolog - Combination Operation
- Prolog - Reverse Items of a List
- Prolog - Shift Items of a List
- Prolog - Check Order of a List
- Recursion and Structures
- Prolog - Backtracking
- Prolog - Different and Not
- Prolog - Inputs and Outputs
- Prolog - Built-In Predicates
- Tree Data Structure (Case Study)
- Prolog - Examples
- Prolog - Basic Programs
- Prolog - Examples of Cuts
- Towers of Hanoi Problem
- Prolog - Linked Lists
- Monkey and Banana Problem
- Prolog Useful Resources
- Prolog - Quick Guide
- Prolog - Useful Resources
- Prolog - Discussion

Prolog Tutorial
What is Prolog?
Prolog or PROgramming in LOGics is a logical and declarative programming language. It is one major example of the fourth generation language that supports the declarative programming paradigm. This is particularly suitable for programs that involve symbolic or non-numeric computation. This is the main reason to use Prolog as the programming language in Artificial Intelligence, where symbol manipulation and inference manipulation are the fundamental tasks.
In Prolog, we need not mention the way how one problem can be solved, we just need to mention what the problem is, so that Prolog automatically solves it. However, in Prolog we are supposed to give clues as the solution method.
Online Prolog Editor
We offer a Prolog Online Editor that enables you to edit and execute prolog code directly within your web browser. By clicking on the "Edit & Run" button, you can check its output and edit the code as well.
:- initialization(main). main :- write('Hello World!').
History of Prolog
The heritage of prolog includes the research on theorem provers and some other automated deduction system that were developed in 1960s and 1970s. The Inference mechanism of the Prolog is based on Robinson's Resolution Principle, that was proposed in 1965, and Answer extracting mechanism by Green (1968). These ideas came together forcefully with the advent of linear resolution procedures.
The explicit goal-directed linear resolution procedures, gave impetus to the development of a general purpose logic programming system. The first Prolog was the Marseille Prolog based on the work by Colmerauer in the year 1970. The manual of this Marseille Prolog interpreter (Roussel, 1975) was the first detailed description of the Prolog language.
Prolog is also considered as a fourth generation programming language supporting the declarative programming paradigm. The well-known Japanese Fifth-Generation Computer Project, that was announced in 1981, adopted Prolog as a development language, and thereby grabbed considerable attention on the language and its capabilities.
Applications of Prolog
Prolog is used in various domains. It plays a vital role in automation system. Following are some other important fields where Prolog is used −
Intelligent Database Retrieval
Natural Language Understanding
Specification Language
Machine Learning
Robot Planning
Automation System
Problem Solving
Audience: Who can Learn Prolog?
This HTML tutorial is designed for aspiring developers with a need to understand the Prolog in enough detail along with its simple overview and practical examples. This tutorial will give you enough ingredients to start with Prolog, from where you can take yourself to a higher level of expertise.
Prerequisites to Learn Prolog
Before proceeding with this Prolog you should have a basic working knowledge of the Windows or Linux operating system; additionally, you must be familiar with −
- Experience with any text editor like Notepad, Notepad++, or Edit Plus etc.
- How to create directories and files on your computer.
- How to navigate through different directories.
- How to type content in a file and save it on a computer.
- Basic understanding of coding
Careers in Prolog
Prolog is very useful in automation based projects. Good knowledge of Prolog helps you to build your career in the following fields −
- Robotics
- Natural Language Processing
- Automation developer