I generated a list with 501 items in
it. Each item in the list is a list with the form
[N,LOG_OF_N_FACTORIAL]. N is an integer from 0 to 500.
LOG_OF_N_FACTORIAL is a float and, except for the trivial
cases, all have exactly 15 significant digits. For example,
[2,0.301029995663981] and [500,1134.08640853513]. When I put
it in a file "test.pl" as a predication like
my_log_n_factorial([[0,0.0],[1,0.0],[2,0.301029995663981],...,[500,1134.08640853513]]).
all by itself and try to consult it in the gprolog (1.3.1 or
1.4.1) interpreter, I must increase the GLOBALSZ to a very
large value to get it to successfully consult the file. Both
systems being 64-bit I made GLOBALSZ=1920000. When the
consult('test.pl') is successful I query
"my_log_n_factorial(X)." and the answer is "no". If I cut the
list in half, everything works fine, with either the top half
or the bottom half of the list. Also, if I consult my own
prolog file, which has a lot of predicates defined, and
then paste into the gprolog interpreter "LIST =
[[0,0.0],[1,0.0],[2,0.301029995663981],...,[500,1134.08640853513]],my_prolog_pred(LIST,TREE)."
and then the call succeeds without a problem. Why can't I
consult a file with a predication with a single argument which
is an array of 500 rows by 2 columns? It seems to me I should
be able to do this. Why does the query say "no" if perhaps
there is not enough memory for the query? Also, why does it
take around 20 seconds to compile? The text file which
contains the list is 11560 bytes in size.
Dave