Articles 16
Tags 19

PROLOG - Part 7

Because proofs are boring. That is a given!

Controlling PROLOG

In my last post I introduced the concept of backtracking and as promised, this time I will be writing about cut, fail and repeat.


There are two main reasons to understand and use the cut feature:

PROLOG - Part 6

“Logic: The art of thinking and reasoning in strict accordance with the limitations and incapacities of the human misunderstanding.” Ambrose Bierce

Power PROLOG \o/

In my last post we finally wrote our “Hello World!” in PROLOG. I hope you all bare with me, so we can finally start to explore the fun and powerful features of PROLOG. In this post, I am going to write about Backtracking.


When PROLOG is looking for instances that satisfies a clause, it will, whenever it is needed, perform what we call Backtrack.

PROLOG - Part 5

Against logic there is no armor like ignorance.


Until the last post, we saw how to build rules and query facts. But all we can see as “answer” until now are some ‘yes’ or ‘false’. Pretty boring hum… But as in other languages, PROLOG also offers I/O support: please meet the methods read() and write().

Finally our PROLOG “Hello world!”