trealla-prolog / trealla

A compact, efficient Prolog interpreter written in plain-old C.
MIT License
252 stars 11 forks source link

op/3 Operator deactivation fault #538

Closed flexoron closed 1 month ago

flexoron commented 1 month ago
$ tpl
?- current_op(X,Y,-).
   X = 500, Y = yfx
;  X = 200, Y = fy.
?- op(0,fy,-).
   true.
?- op(0,yfx,-).
   true.
?- current_op(X,Y,-).
   false.
?- halt.

$ tpl
?- current_op(X,Y,-).
   X = 500, Y = yfx
;  X = 200, Y = fy.
?- op(0,yfx,-).
   true.
?- op(0,fy,-).
   true.
?- current_op(X,Y,-).
   X = 200, Y = fy. % unexpected
?-