Discussions related to Visual Prolog
choibakk
Active Member
Posts: 35
Joined: 5 Sep 2019 19:30

VIP10 - Compiler Core Dump

Unread post by choibakk »

I'm making use of "Object expressions". I ran into the following which causes a compiler core dump. I don't know if this information will be enough. It will take me a bit to isolate this into a separate simple example if it is needed since "movelist_" is a custom highspeed vector{@Type} object. And because this is a new language feature, it could be that I'm doing something wrong. I allowed the IDE to send one of the core dumps to PDC earlier this evening.

Here is the code that causes the compiler dump:

Code: Select all

% -------------------------- PERFT ------------------------------- clauses     get_perft() = Object :-         %if isErroneous(movelist_) then         %    %calc_board()         %end if,         Object =             implement : perft                 clauses                     perft(Depth, Divide) = Count :-                         % COMPILER ERROR MESSAGE: "Database domain expected 'vector{@Type}'"                         if isErroneous(movelist_) then                             %calc_board()                         end if,                         doDivide := Divide,                         Count = 0.                 clauses                     new() :- allmoves := true.             end implement.            
Moving the "isErroneous" call outside of the object expression will resolve the issue:

Code: Select all

% -------------------------- PERFT ------------------------------- clauses     get_perft() = Object :-         if isErroneous(movelist_) then             %calc_board()         end if,         Object =             implement : perft                 clauses                     perft(Depth, Divide) = Count :-                         % COMPILER ERROR MESSAGE: "Database domain expected 'vector{@Type}'"                         %if isErroneous(movelist_) then                         %    %calc_board()                         %end if,                         doDivide := Divide,                         Count = 0.                 clauses                     new() :- allmoves := true.             end implement.            
Thanks,
Craig Hoibakk
User avatar
Thomas Linder Puls
VIP Member
Posts: 1253
Joined: 28 Feb 2000 0:01

Re: VIP10 - Compiler Core Dump

Unread post by Thomas Linder Puls »

Thank you, we will look at it. We will come back to you if we need additional information.
Regards Thomas Linder Puls
PDC
Post Reply