First, the ISO standard (ISO / IEC 13211-1: 1995) does not define a top-level loop. In 1 Scope:
NOTE - This part of ISO / IEC 13211 does not specify:
...
f) user environment (top-level loop, debugger, library, system, editor, compiler, etc.) of the Prolog processor.
Traditionally, the answer is yes or no. In the case of "yes", answers to the answer were shown, if any.
Today, with more and more restrictions in the answers, the traditional toplevel loop is becoming a bit cumbersome to use. What is the correct answer for ?- dif(X,a). ? It may not be yes , it may be possible , which was first used by Jaffar et al..s CLP (R) . But very often I want to repeat the answer.
?- dif(X,a). dif(X,a). ?- dif(b,a). true. ?- true. true.
The idea in SWI is to output the text as an answer so that you can insert it back to get the same result. Thus, the syntax of the answers is defined to some extent - it must be the actual text of the Prolog.
So, if there is no more yes, why should it not be? For this reason, the SWI gives false. as an answer. Prior to SWI, Prolog IV answered false . Note, for example, the following breakpoint in the SWI:
?- true; false. true ; false.
Thus, even this tiny detail is stored in the answers. If in Prolog IV it crashed to true , because Prolog IV shows all the answers in one fell swoop.
?- true ; false. true.
See answer details for answers.