Apologies for such a basic question, but what exactly is the definition of an ‘atom’? What is it that I am creating that gprolog does not want to clean up?
Thank you,
David Logan
gprolog does not have an atom garbage collector. So it is important to control the number of created atoms. If this becomes an issue it is better to switch to strings (which are handled as Prolog list of char codes and thus are recovered at backtracking).
Daniel
Well, it doesn’t seem to be sub_atom as far as it goes. I wrote my own left() in order to do the same job, and the new code still fails with atom table full. At this point, I could use some direction as to why this may be happening. I do not see any nesting situation that would cause this. It appears to me that as I backtrack to the repeat clause, it should remove the atoms that are no longer in use.
David Logan
I am trying to use sub_atom to get a substring. It fails with “atom table full.” When I remove that single line and instead hard code some value to “NewPrefix”, it works fine (other than not writing the correct words of course.) Is this a bug, or does anyone know why this would be legitimately failing?
I am not sure how this will arrive at users inboxes, so let me state that I am trying to attach two files: The test prolog file, and the input file I am using.
<test5.pl><wordlist.txt>
_______________________________________________ Users-prolog mailing list address@hiddenhttps://lists.gnu.org/mailman/listinfo/users-prolog
|