Top "Prolog" questions

Do not use this tag like Prologue and Epilogue.

Simple prolog program. Getting error: >/2: Arguments are not sufficiently instantiated

I made a Prolog predicate posAt(List1,P,List2) that tests whether the element at position P of List1 and …

list prolog clpfd instantiation-error
program for finding Gcd in Prolog

I tried to write a code in Prolog for finding GCD (without using modulo) can anyone tell me what's wrong …

prolog greatest-common-divisor
Integrating Prolog with C#

Does anyone know of a nice (and preferably free) way to integrate Prolog and C#? Im looking to create a …

c# prolog integrate
Relational/Logic Programming in Python?

I'm a longtime python developer and recently have been introduced to Prolog. I love the concept of using relationship rules …

python prolog logic-programming
Prolog is vs = with lists

Why does this fail L is [1,2,3,4], and this works: L = [1,2,3]? But L is 1, and L = 1 both work the same.

prolog resolution unification
How to access list permutations in prolog?

I want to access list permutation and pass it as argument to other functions. This is the permutation code: takeout(…

list prolog permutation prolog-dif
Working with list of lists in Prolog

Please help me to solve this problem: I have a list of lists [[1,2],[3,4]] How do I get: [1,3] [1,4] [2,3] [2,4] Or if I …

list prolog cartesian-product cross-product
How to run SWI-Prolog from the command line?

Is there a way to just create a prolog script called hello.pl like this: #!/usr/local/bin/swipl -q …

shell command-line prolog executable swi-prolog
Prolog - Palindrome Functor

I am trying to write a predicate palindrome/1 in Prolog that is true if and only if its list input …

prolog palindrome dcg
How do I include a .pl file in Prolog?

I'd like to include code from another source file. Does anyone know how to do that?

file include prolog