Logic Programming

Introduction

Artificial Intelligence (AI) is the ability for an artificial machine to act intelligently. Logic Programming is a method that computer scientists are using to try to allow machines to reason because it is useful for knowledge representation. In logic programming, logic is used to represent knowledge and inference is used to manipulate it.

The logic used to represent knowledge in logic programming is clausal form which is a subset of first-order predicate logic. It is used because first-order logic is well understood and able to represent all computational problems. Knowledge is manipulated using the resolution inference system which is required for proving theorems in clausal-form logic. The diagram below shows the essence of logic programming.

Clausal-Form Logic
Clausal-Form Logic

Prolog, PROgramming in LOGic, is a declarative programming language which is based on the ideas of logic programming, such as those discussed above. The idea of Prolog was to make logic look like a programming language and allow it to be controlled by a programmer to advance the research for theorem-proving.