Open stefan-c-kremer opened 4 years ago
Hi @stefan-c-kremer,
I also see only the first two answers: the solver misses X=two, Z=four. swi-prolog does find them:
?- times( two, Y, Z ).
Y = Z, Z = zero ;
Y = one,
Z = two ;
Y = two,
Z = four ;
false.
@robwalton Hi Rob. Thanks for confirming my observation and comparing it to swi-prolog.
So I drafted an interpreter from scratch that finds these solutions but is didn't solve the Einstein problem. My feeling when I was working on this was that the issue with @photonlines code might be with the way variables which have been instantiated with each other are handled. I don't remember why I thought this though!
This project is great. I have been working on some examples and came across what I think may be an issue. I would like some feedback whether I'm wrong in my thinking...
I have the following Prolog code:
I am issuing the query:
times( two, Y, Z )
I was expecting to get:
but only the first two answers appear.
Any ideas why?
Stefan