Prolog Tutorial

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
Advertisements