Top "Prolog" questions

Do not use this tag like Prologue and Epilogue.

Datalog vs CLIPS vs Prolog

As many programmers I studied Prolog in university, but only very little. I understand that Prolog and Datalog are closely …

prolog logic-programming clips datalog
Matching tuples in Prolog

Why does Prolog match (X, Xs) with a tuple containing more elements? An example: test2((X, Xs)) :- write(X), …

prolog tuples pattern-matching operators associativity
Prolog Arguments are not sufficiently instantiated

I'm trying to match a subset of the facts I'm creating, and my testcase was working great! x([1,2,3,4],'bleah'). x([1,2,4],…

prolog instantiation-error
Knowing when to use cut in prolog

I've took a course in which I learned some prolog. I couldn't figure out how / when to use cuts. Even …

prolog prolog-cut
Prolog - differences between red cut and green cut

I started learning prolog, and wanted to make the whole cuts thing clearer. I have read that "green cut doesnt …

prolog prolog-cut
Prolog - how to clear the memory and start from scratch?

I'm developing an algorithm in a .pl file, and examining it with queries on the command window. I use dynamic …

memory prolog reset prolog-assert
Discontiguous predicate warning from GNU Prolog

For a lark I have started learning Prolog via http://www.learnprolognow.org/. My excuse is that I have only …

prolog
Why is this prolog query both true and false?

My SWI-Prolog knowledge base contains the following two facts: f(a,b). f(a,c). Now if I pose the …

prolog swi-prolog prolog-toplevel
Prolog: check if two lists have the same elements

I am new to Prolog and I am having a problems checking if two lists have exactly the same elements. …

list prolog non-termination failure-slice
Pattern Matching - Prolog vs. Haskell

This is not a homework question, rather an exam study guide question. What is the difference between pattern matching in …

haskell prolog pattern-matching