bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

system_error(cannot_catch_throw(error(existence_error(procedure, (>)/2),


From: Gustavo Brown - INCO
Subject: system_error(cannot_catch_throw(error(existence_error(procedure, (>)/2), findall/3)))
Date: Tue, 14 Jul 2015 11:34:34 -0300

I am getting the following error when compiling a simple snippet
 
system_error(cannot_catch_throw(error(existence_error(procedure,(>)/2),findall/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,
  !. 
 
findall_bug1(Parms, Att):-
 member( Att, Parms),
 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:
 
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),findall/3)))
 
system_error(cannot_catch_throw(error(existence_error(procedure,(>)/2),findall/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
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]