When query results contain compound functors (e.g. a(b(1), c(1))) pyswip returns them as a quoted string. a(b(1), c(1)) gets returned as a('b(1)', 'c(1)'). This leads to the contained functors being treated as single atoms and not as functors themselves, leading to unexpected behaviour.
A MWE (examples/compound-functor) has also been included to showcase this behaviour. The expected solution f(A):-valid(A) cannot be found since the pyswip query results contain strings, which leads to the examples failing when tested. Popper successfully finds the expected solution after introducing the (admittedly hacky) fix in this commit.
When query results contain compound functors (e.g.
a(b(1), c(1))
)pyswip
returns them as a quoted string.a(b(1), c(1))
gets returned asa('b(1)', 'c(1)')
. This leads to the contained functors being treated as single atoms and not as functors themselves, leading to unexpected behaviour.A MWE (
examples/compound-functor
) has also been included to showcase this behaviour. The expected solutionf(A):-valid(A)
cannot be found since the pyswip query results contain strings, which leads to the examples failing when tested. Popper successfully finds the expected solution after introducing the (admittedly hacky) fix in this commit.