Replies: 3 comments 2 replies
-
Although multi-threading is only one of the possible solutions, it does allow high-level constructs for and-parallelism and competitive or-parallelism. An implementation of these constructs can be found in Logtalk (I can send you some papers on them). Those constructs were later copied under different names by SWI-Prolog and more recently by ECLiPSe. There's also a draft standardization proposal on Prolog threads. Unfortunately, only a few systems follow the proposal with SWI-Prolog being the only system that provides a reliable implementation. XSB abandoned support for threads recently and YAP support for threads have been too buggy to be usable. A few other systems made some implementations attempts (e.g. Ciao Prolog, Qu-Prolog) but don't really follow the proposal. |
Beta Was this translation helpful? Give feedback.
-
Thank you for sharing this! I really wonder how hard it would be to add support for multiple threads to Scryer Prolog. This would be extremely useful for example to implement HTTP and HTTPS servers. I think for a very rudimentary and still useful implementation, there would not even have to be much communication between different threads, only the ability to execute a single goal in its own thread. This would already be enough to spawn a "worker" thread that handles one specific client request. Rust is supposed to be especially well-suited for multithreaded applications. There is also a |
Beta Was this translation helpful? Give feedback.
-
The Joy of Concurrent Logic Programming [1] is somewhat related. It proposes a language based on horn clauses with an execution model where all unification targets are queued up concurrently. http://www.call-with-current-continuation.org/articles/the-joy-of-concurrent-logic-programming.txt |
Beta Was this translation helpful? Give feedback.
-
Under this name, a new survey contains different ideas that have been used to parallelize Prolog and other logic programming language. A very interesting read even if we're still a bit far from having multi threading.
Link: https://arxiv.org/abs/2111.11218
Beta Was this translation helpful? Give feedback.
All reactions