> " Don't be bothered with by the fact that the solutions end with "or false" here. It's a function of how the search algorithms work; the solver looked for more solutions, then failed. I'll admit, I don't totally understand why it only sometimes does this, but it's expected. " I think this is explained in The Power of Prolog[1] that the answers coming from Prolog are not printing text to a terminal, they are valid P…
Eh, no, admittedly this is a bit confusing but the ";" at the top-level is not the same as the ;/2 disjunction operator. At the top-level the ";" is just a switch to say "give me more". In most Prolog systems you can also press space for the same thing. Whether a query will end with "false" or "true" really depends entirely on the query, and the predicates it's calling. So it depends on how a predicate is called. You…
I understand that's the experience of using it, but I mean if I open the SWI Prolog toplevel and query:
?- X = 1 ; X = 2.
Then press space, I get: X = 1 ;
X = 2.
which is exactly the same Prolog term, two unifications, each is a solution to the query, a disjunction between them, terminated with a full stop.Is that really not the same semicolon usage/meaning/semantics in the query as in the answers?