UWN
UWN
``` ulrich@gupu:/opt/gupu/scryer-prolog$ sh -c 'ulimit -v 100000; ./target/release/scryer-prolog -f' ?- use_module(library(lists)). true. ?- M is 10^7,length(L,M). memory allocation of 67108864 bytes failed Aborted (core dumped) ``` Who writes this message...
The major source of overflows in Prolog is non-termination of completely correct predicates in certain use cases. So the code is not wrong, just the query is a bit too...
Don't overthink it. I use `ulimit -v` for SICStus. No more options needed.
How to test for this? So far, I compared roughly all permutations of `(=)/2` and `dif/2` goals. They all should produce either the same failure, unconditional success, or conditional success....
It is a toplevel issue only ``` ?- L=[1|L],freeze(V,p(L)). L = [1|L], freeze:freeze(V,user:p([1|1])). ?- L=[1|L],freeze(V,p(L)),copy_term(V,_,Gs). L = [1|L], Gs = [freeze:freeze(_A,user:p([1|1]))], freeze:freeze(V,user:p([1|1])). ?- L=[1|L],freeze(V,p(L)),copy_term(V,_,Gs),acyclic_term(Gs). false. ``` So Gs remains cyclic.
A much cleaner approach would be to first transform the term to a term that contains the atom `...` at certain places and then to display it. There is a...
Is it a good idea that `[...]` stands here for a non-list? The term `A = [A|c]` does not contain any list. `[[...|c]|c]` might be a better abbreviation. (These abbreviations...
It means that one cannot transform a term to an abbreviated term just by replacing in adequate positions some terms by the atom `...`. In stead, much more is happening....
Excellent find! But this is not a problem of the `dif/2` but rather of the projection. ``` ?- dif(W,V),V=[V]. V = [V], dif:dif(W,[[]]), unexpected. ?- dif(W,V),V=[V], W = [[]]. W...
For the `f`, see #2029