I encounter a "fatal error : segmentation violation" in the following context :
Environment : a PC under Linux / GNOME, Gnu Prolog 1.2.19
Program : - a predicate gpr(L,R) is defined in a separate (consulted) file. gpr is intended to record the association between a reaction R and L, a list of lists of genes. L can become rather large. The definition of gpr/2 includes *many* (~800) atoms and no clauses, excerpt below.
- A predicate r2G is defined as follows : r2g(R,G):-gpr(GPR,R),flatten(GPR,Geneset),member(G,Geneset). where flatten turns a list of lists into a simple list.
Execution : r2G(g,R) is called at the toplevel. g is a gene that is associated with a large number of gpr clauses.
After the 11th alternative solution, I get a segmentation violation.
I assume this is the consequence of some data structure getting too large. I set the stack sizes at GLOBALSZ = 1000000, LOCALSZ=24000, TRAILSZ=24000.
I have tried a few other manipulations involving the gpr/3 predicate, and they all result in a segmentation violation.
I would welcome any suggestion on what I could do to prevent that.