Re: Segmentation fault

Daniel Diaz <[email protected]> Tue, 5 Jul 2022 09:20:56 +0200
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
--Apple-Mail=_4C93E963-445D-4B4E-80CA-F1ECFC1C7CCD
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi Karel,

Sorry for the late reply.

The source is too large for the compiler. It seems that you pose a set =
of #\=3D constraints between all variables of the list Colors.
For this you can use a Prolog loop (writing a predicate receiving the =
list Colors) or the simply use fd_all_different(Colors).

Daniel


> Le 11 juin 2022 =C3=A0 10:52, Karel Vervaeke <[email protected]> a =
=C3=A9crit :
>=20
> The provided prolog script causes gprolog to segfault for me.
> I have a couple of similar scripts (with smaller graphs) which run =
without problem, I'm including one of them.
>=20
> Usage: gprolog --consult-file solve.pl <http://solve.pl/> --query-goal =
'solve(C,500)'
>=20
> I'm running on a mac, gprolog installed with brew.
>=20
> I hope this is useful to you. Please let me know if you need any other =
information.
>=20
> Regards,
> Karel
>=20
> <solve.pl><solve_working.pl>


--Apple-Mail=_4C93E963-445D-4B4E-80CA-F1ECFC1C7CCD
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><div =
class=3D"">Hi Karel,</div><div class=3D""><br class=3D""></div>Sorry for =
the late reply.<div class=3D""><br class=3D""></div><div class=3D"">The =
source is too large for the compiler. It seems that you pose a set of =
#\=3D constraints between all variables of the list Colors.</div><div =
class=3D"">For this you can use a Prolog loop (writing a predicate =
receiving the list Colors) or the simply use =
fd_all_different(Colors).<br class=3D""><div class=3D""><br =
class=3D""></div><div class=3D"">Daniel</div><div class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">Le 11 juin 2022 =C3=A0 10:52, Karel Vervaeke &lt;<a =
href=3D"mailto:[email protected]" class=3D"">[email protected]</a>&gt;=
 a =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div =
class=3D""><div dir=3D"ltr" class=3D"">The provided prolog script causes =
gprolog to segfault for me.<div class=3D"">I have a couple of similar =
scripts (with smaller graphs) which run without problem, I'm including =
one of them.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Usage: gprolog --consult-file <a href=3D"http://solve.pl/" =
class=3D"">solve.pl</a> --query-goal 'solve(C,500)'</div><div =
class=3D""><br class=3D""></div><div class=3D"">I'm running on a mac, =
gprolog installed with brew.</div><div class=3D""><br =
class=3D""></div><div class=3D"">I hope this is useful to you. Please =
let me know if you need any other information.</div><div class=3D""><br =
class=3D""></div><div class=3D"">Regards,</div><div =
class=3D"">Karel</div><div class=3D""><br class=3D""></div></div>
<span id=3D"cid:f_l49mzkfc0">&lt;solve.pl&gt;</span><span =
id=3D"cid:f_l49n1p1a1">&lt;solve_working.pl&gt;</span></div></blockquote><=
/div><br class=3D""></div></div></body></html>=

--Apple-Mail=_4C93E963-445D-4B4E-80CA-F1ECFC1C7CCD--