system_error(cannot_catch_throw(error(existence_error(procedure, (>)/2), findall/3)))
"Gustavo Brown - INCO" <[email protected]> Tue, 14 Jul 2015 11:34:34 -0300
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <759DF669DCA94C99A66F2D37B24EE28B@VirtualXP99969> |
This is a multi-part message in MIME format. --===============7443831307951246068== Content-Type: multipart/alternative; boundary="----=_NextPart_000_1188_01D0BE29.0EB93620" This is a multi-part message in MIME format. ------=_NextPart_000_1188_01D0BE29.0EB93620 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am getting the following error when compiling a simple snippet=20 system_error(cannot_catch_throw(error(existence_error(procedure,(>)/2),fi= ndall/3))) To reproduce, create a file (test.pl) with this code: :-initialization(findall_bug). findall_bug:- write(findall_bug),nl, findall(Att, (member(Att, [6, 0]), Att > 0), XParmAs), write(XParmAs),nl, findall(Att, findall_bug1([6,0], Att), ParmAs), write(ParmAs),nl, write(done),nl, !. =20 findall_bug1(Parms, Att):- member( Att, Parms),=20 Att > 0. I usually compile the generated assembly file with this two steps: gplc -S test.pl -o test.s mingw-as - o test.obj --32 test.s and link with MSVC linker. However, I can reproduce this using only gplc:=20 gplc --no-top-level --min-pl-bips -o test.exe test.pl Output of execution is: findall_bug system_error(cannot_catch_throw(error(existence_error(procedure,(>)/2),fi= ndall/3))) system_error(cannot_catch_throw(error(existence_error(procedure,(>)/2),fi= ndall/3))) [] [6] done If you compile without --min-pl-bips, the output is right It seems that the compiler treats differently the arithmetic comparison = inside findall, and does not include some library code when using = --min-pl-bips (and also linking directly with MSVC) Using GNU Prolog 1.4.4 Regards, Gustavo ------=_NextPart_000_1188_01D0BE29.0EB93620 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META name=3DGENERATOR content=3D"MSHTML 8.00.6001.23588"> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2 face=3DArial>I am getting the following error when = compiling a=20 simple snippet </FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT><FONT size=3D2 = face=3DArial></FONT> </DIV> <DIV><FONT size=3D2=20 face=3D"Courier = New"><STRONG>system_error(cannot_catch_throw(error(existence_error(proced= ure,(>)/2),findall/3)))</STRONG></FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3DArial>To reproduce, create a file (test.pl) = with this=20 code:</FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3D"Courier = New">:-initialization(findall_bug).</FONT></DIV> <DIV><FONT size=3D2 face=3D"Courier New"></FONT> </DIV> <DIV><FONT size=3D2 face=3D"Courier New">findall_bug:-<BR> =20 write(findall_bug),nl,<BR> findall(Att, (member(Att, [6, 0]), Att = > 0),=20 XParmAs),<BR> write(XParmAs),nl,<BR> findall(Att,=20 findall_bug1([6,0], Att), ParmAs),<BR> write(ParmAs),nl,<BR> = write(done),nl,<BR> !. </FONT></DIV> <DIV><FONT face=3D"Courier New"></FONT> </DIV> <DIV><FONT size=3D2 face=3D"Courier New">findall_bug1(Parms, = Att):-<BR> member(=20 Att, Parms), <BR> Att > 0.</FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3DArial>I usually compile the generated = assembly file with=20 this two steps:</FONT></DIV> <DIV><FONT size=3D2 face=3D"Courier New"> gplc -S test.pl -o=20 test.s</FONT></DIV> <DIV><FONT size=3D2 face=3D"Courier New"> mingw-as - o test.obj = --32=20 test.s</FONT></DIV> <DIV><FONT size=3D2 face=3DArial>and link with MSVC linker.</FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3DArial>However, I can reproduce this using = only gplc:=20 </FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3D"Courier New"><STRONG>gplc --no-top-level = --min-pl-bips=20 -o test.exe test.pl</STRONG></FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3DArial>Output of execution is:</FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3D"Courier New">findall_bug</FONT></DIV> <DIV><FONT face=3D"Courier New"></FONT> </DIV> <DIV><FONT size=3D2=20 face=3D"Courier = New">system_error(cannot_catch_throw(error(existence_error(procedure,(>= ;)/2),findall/3)))</FONT></DIV> <DIV><FONT face=3D"Courier New"></FONT> </DIV> <DIV><FONT size=3D2=20 face=3D"Courier = New">system_error(cannot_catch_throw(error(existence_error(procedure,(>= ;)/2),findall/3)))<BR>[]<BR>[6]<BR>done</FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3DArial>If you compile without <FONT=20 face=3D"Courier New">--min-pl-bips</FONT>, the output is = right</FONT></DIV> <DIV><FONT size=3D2 face=3DArial>It seems that the compiler treats = differently the=20 arithmetic comparison inside findall, and does not include some library = code=20 when using --min-pl-bips (and also linking directly with = MSVC)</FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3DArial>Using GNU Prolog 1.4.4</FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3DArial>Regards,</FONT></DIV> <DIV><FONT size=3D2 face=3DArial> Gustavo</FONT></DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV> <DIV><FONT size=3D2 face=3DArial></FONT> </DIV></BODY></HTML> ------=_NextPart_000_1188_01D0BE29.0EB93620-- --===============7443831307951246068== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-prolog mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-prolog --===============7443831307951246068==--