scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

Unclear semantics of module-qualified control constructs

Open triska opened this issue 1 year ago • 6 comments

For instance, consider the following definition:

:- use_module(library(clpz)).

p(1) :- clpz:!.
p(2).

With it, we get:

?- p(X).
   X = 1
;  X = 2.

Since library(clpz) does not (and cannot) export a predicate called !/0, I assume the goal clpz:! invokes the control construct !/0. But then the solution X = 2 is unexpected, is it not?

If clpz:! is made to work exactly as !/0, then https://github.com/mthom/scryer-prolog/pull/2433 seems to expand call(clpz:!) wrongly to a goal equivalent to !.

triska avatar Aug 24 '24 12:08 triska