Top "Prolog" questions

Do not use this tag like Prologue and Epilogue.

Water jug puzzle in SWI-Prolog

I am an AI and Prolog newbie. I was trying to implement the 2 Water Jug problem in SWI Prolog. However, …

prolog water-jug-problem
Check if string is substring in Prolog

Is there a way to check if a string is a substring of another string in Prolog? I tried converting …

prolog substring dcg subsequence
Simplified Travelling Salesman in Prolog

I've looked through the similar questions but can't find anything that's relevant to my problem. I'm struggling to find an …

prolog backtracking traveling-salesman prolog-dif
What is SML used for?

What are the uses of SML in the real word? Are its practical uses similar to that of Prolog?

prolog sml dcg
Implement a Prolog predicate that say if an element belong to a list. Problems with not numerical lists

I am studying Prolog for an university exam and I have problems with this exercise: Implement the predicate not_member(…

prolog prolog-dif
Python interface with SWI-Prolog

I want to use a Python script as a frontend to a Prolog program that uses the SWI-PL engine. So, …

python prolog swi-prolog
Can you do Logic Programming in Scala?

I read somewhere that Pattern Matching like that supported by the match/case feature in Scala was actually borrowed from …

scala programming-languages prolog language-features logic-programming
How to build with swipl on sublime

I'm trying to compile prolog's code on sublime text 3 but I always get [Errno 2] No such file or directory: 'swipl' […

prolog sublimetext sublimetext3 swi-prolog sublime-build
What does the s() predicate do in Prolog?

I have been trying to learn Prolog, and am totally stumped on what the predicate s() does. I see it …

prolog successor-arithmetics
aggregating predicates in SWI-Prolog

I need to count all X for which some_predicate(X) holds, and there really a lot of such X. …

prolog swi-prolog