Why is there a limit in the $VAR translation?

?- L=‘$VAR’(10000000000000000).
L = Q384615384615384.

?- L=‘$VAR’(100000000000000000).
L = ‘$VAR’(100000000000000000).

Why is there a limit in the $VAR translation?

That many variables do not fit in memory, so you never need such high numbers.

2 Likes

I am not really happy with this kind of limitations where it is not really necessary. What if I start the numbervar translation at a higher number for any reason? Then I have still no memory issue.

Well, SWI-Prolog is open source. So, if you miss something you can fix it and send a PR. If reasonably coded I’ll merge it. In my view there are pretty much infinitely things that are more important.

1 Like