New comment by triska on void-packages repository https://github.com/void-linux/void-packages/pull/23821#issuecomment-665219062 Comment: Thank you a lot @Chocimier for merging this! In several respects, Scryer Prolog is one of the most advanced Prolog systems that currently exists, even though it is still in its early stages of development. For instance, it conforms syntactically to the Prolog ISO standard, it includes extensions for constraint logic programming (CLP), and is the first Prolog system that implements a very compact internal representation of strings as lists of characters. It is an excellent platform to teach Prolog. For your concrete example, try SLG resolution by adding the following two lines at the start of the program:
:- use_module(library(tabling)).

:- table p/2.
We then get for the most general query:
?- p(A, B).
   A = a, B = b
;  A = a, B = c
;  A = b, B = c
;  false.
i.e., all solutions are enumerated, and the query *terminates*. Thank you a again!