Bug: Issue with gplc failing to compile large (17,000 line) file of facts

Matthew Carter <[email protected]> Mon, 16 Sep 2013 13:43:12 -0400
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
Hi all,

In a large file (17k lines) of basic facts, such as:

	dep('one', 'two').
	dep('three', 'four').
	
...etc...

gplc fails to compile to an executable with an out of stack space error
(note - there are no predicates in there which should cause an infinite
loop, however there may be circular references in the facts).

The exact file can be viewed here:

https://github.com/ahungry/prolog-package-manager/blob/master/packages.pro

when I attempt to compile via something similar to the following:

	gplc ./packages.pro

I receive an out of GLOBALSZ space error.

Bumping up to

GLOBALSZ=500000 gplc ./packages.pro

Eventually gives a random error message related to invalid syntax in the
file (there are no such syntax errors).

Compiling to byte code works without issue:

	gplc -w ./packages.pro

As well as running this file through gprolog:

	gprolog --consult-file packages

This error does not occur on any other prolog implementation's
compilation technique (works fine on swi-prolog and some others).

Thanks,
-Matt

-- 
Matthew Carter
[email protected]