What does "Cannot represent due to `predicate references'" mean?

Would it be possibly to change this error message, into
a memory overflow error message. I guess the underlying
problem is just that, i.e. that it cannot complete a clause/2 call?

?- solve(typeof(X, a->a)).
ERROR: Cannot represent due to `predicate references'
ERROR: In:
ERROR: [2,095,163] clause(typeof(_52126464,(_52126470-> ...)),_52126460)

It happens in a meta interpreter. If I run without a meta interpreter,
and thus without clause/2, I see the memory overflow error:

?- typeof(X, a->a).
ERROR: Stack limit (1.0Gb) exceeded

It is not really running out of memory. It runs against the 1M limit for recording open choice points from clause/3 and retract/1. That limit can of course be raised (by recompiling SWI-Prolog with a different setting for the MAX_BLOCKS macro). It is probably hard to find properly working programs that run against this limit. At least, it is the first time I see this :slight_smile:

1 Like