
Daniel W. answered 04/13/22
programming language research & software engineering for over 20 years
the following might be helpful:
here's a prolog file:
a(B) :- B = abc.
a(B) :- B = def.
a(B) :- B = ghi.
after consulting that file,
here's some interactions:
?- a(X).
X = abc ;
X = def ;
X = ghi.
the file says "a(B)" implies either B equals abc or def or ghi.
in the interactions area, i typed "a(X).". this is like asking prolog "what would make 'a(X) true?". and prolog responds "that would be true if X is abc".
and then i typed ';' which is like saying "what other answers are there?" and then prolog replies "that would also be true if X is def".
and finally, prolog tells me that 'a(X)' is true if X is ghi.