Discussions related to Visual Prolog
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Updating to VIP 10

Unread post by Martin Meyer »

Hello Thomas,

on updating my code to new VIP 10 the compiler has complained at some surprising places. When I inspected these places in detail, I found that there were bugs in my code which the 9.0.6 compiler (and me) had not noticed before. Apparently the polymorphic type checking has become smarter in VIP 10 and my code now more correct. That's great!

There appeared but one issue in my code at which please have a look:

Code: Select all

interface myObj{@Type}   predicates     doSomething : (@Type Val).   end interface myObj   %---   class myObj{@Type} : myObj{@Type}     where @Type supports unsigned   end class myObj   %---   implement myObj{@Type}   clauses     doSomething(Val) :-         NextVal = Val + 1,         stdIo::write(NextVal).   end implement myObj   %===   implement main   clauses     run() :-         Obj = myObj::new(),         Obj:doSomething(1).   end implement main
The above construction has worked out in VIP 9.0.6 and it also works in VIP 10 in 32-bit mode. Only in 64-bit mode of VIP 10 it rises an access violation.
Regards Martin
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: Updating to VIP 10

Unread post by Thomas Linder Puls »

Thank you we will look at the problem.
Regards Thomas Linder Puls
PDC
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Re: Updating to VIP 10

Unread post by Martin Meyer »

Maybe the access violation in 32-bit mode of VIP 10 in this construction goes back to same cause:

Code: Select all

implement main     open core   class predicates     doNothing : (Type)         where Type supports unsigned16. clauses     doNothing(X) :-         doNothing_1(X, X).   class predicates     doNothing_1 : (Type A, unsigned16 B)         where Type supports unsigned16. clauses     doNothing_1(_A, _B).   clauses     run() :-         doNothing(1).   end implement main
Regards Martin
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: Updating to VIP 10

Unread post by Thomas Linder Puls »

Yes, I think you are right, but we will of course check it.
Regards Thomas Linder Puls
PDC
Post Reply