I’m using: SWI-Prolog version 8.0.3
I have a predicate p(B,A), that returns an atom A containing variables
shared with B.
I need all the solutions of p(B,A) where the name of the variables shared by A and B are meaningful.
So I wrote :
q(B) :-
findall(A, p(B,A), L).
where the predicate q(B) is the context from I call p(B,A) through the findall.
Using gtrace I have seen that the variable of each A, are renamed (copied ?) in L. But I strongly need to have the same variables.
Moreover, I cannot use varnumbers(A) or varnumbers(B) because B
is used in another context before and after the call of q(B), and I need
to keep the names of the variables of B unchanged.
How can I have all the solutions such that the names of the variables shared by A and B are not rename (copied) so that B never change ?
Thanks a lot
Dominique