I’ve pushed a patch that causes the toplevel to give names to variables other than the variables that appear in the query. These variables are, copying SICStus, names _A, _B, … Unlike SICStus though, variables that appear only once in the answer are written as _
. I think that significantly speeds up understanding an answer as you do not have to scan the answer for the same variable. Naming is controlled by a new flag toplevel_name_variables
. So, we get e.g.:
?- length(L, 5).
L = [_, _, _, _, _].
The downside is that queries that return huge terms with lots of variables print significantly slower.
Comments?