PROLOG - Part 2

PROLOG was created in 1972 and it has been used since then, mostly in relational databases, natural languages comprehension and automation.

Continuing …

Continuing from the last post, I will again start with some theory before continuing to write our family code.

Logical programming

In logical programming, we are focused on knowledge and not in the algorithms. That is also why the code sometimes looks like a database. This programming paradigm (which one could also include PROLOG) is based on formal logic, more specific based on predicate logic.

This means that PROLOG has a set of sentences in logic form, called clauses. All clauses that we wrote in the last post are facts. They are the simplest type of clauses, also known as Horn clauses.

Read More

PROLOG - Part 1

“Constraint programming represents one of the closest approaches computer science has yet made to the Holy Grail of programming: the user states the problem, the computer solves it.” Eugene C. Freuder, Constraints, April 1997

Introduction to PROLOG - but WHY?

When I started this blog yesterday late in the night, I just knew that I wanted to document what I know and the things that I think are cool. Today I decided to write an introduction to PROLOG. =) It seems just right to start with a programming language that is so fun!

Basic concepts

The name PROLOG comes from PROgramming in LOGic. And that is really all about it. This language is used mostly to solve problems related to objects or facts and their relationships.

In this series, I will go through some basic concepts, such as facts, questions, variables, rules and conjunctions.

Read More