Discussions related to Visual Prolog
sbishop61
Posts: 13
Joined: 9 May 2021 9:55

Non-determ predicates implimented in foreign code

Unread post by sbishop61 »

Is there a way to impliment non-determ predicates in foreign languages?

I imagine it would need some way of informing the foreign languages of Initial call, Redo call and Terminate call; or similar.
User avatar
Thomas Linder Puls
VIP Member
Posts: 1395
Joined: 28 Feb 2000 0:01

Re: Non-determ predicates implimented in foreign code

Unread post by Thomas Linder Puls »

No, that is not supported. Backtracking is done in a rather unique way, that requires a lot of "low-level" activity.

We do not invoke a "redo call", we read certain values in a backtrack point "record" and set various processor registers (Instruction pointer, stack top, frame pointer) and that obviously only makes sense if everything is low-level prepared for exactly that.
Regards Thomas Linder Puls
PDC
Post Reply