Segmentation violation problem

"Vincent Schachter" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
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.

Vincent



Excerpt of gpr definition :
gpr([[g]],r0084).

gpr([[g0178,g0180,g0182,g0183,g0184,g0185,g0186,g0187,g0188]],r0128).

gpr([[g1009]],r0129).

gpr([[g]],r0081).

gpr([[g]],r0080).

gpr([[g1447]],r0523).

gpr([[g1726]],r0649).

gpr([[g2314]],r0648).

gpr([[g2983],[g3598]],r0645).

gpr([[g1017,g1018,g1019,g1020]],r0644).

gpr([[g1757,g1756,g1755,g1753,g1754,g1758,g1759]],r0647).

gpr([[g0544]],r0646).

gpr([[g1689],[g1450],[g1706]],r0641).

gpr([[gSPONT]],r0640).

gpr([[g2984]],r0643).

gpr([[g1211]],r0642).

gpr([[g0166]],r0512).

gpr([[g3633]],r0528).

gpr([[g3523]],r0482).

gpr([[g3078,g3079,g3080]],r0010).

gpr([[g3232]],r0011).

gpr([[g3232]],r0012).

_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.