]> Repositorios git - scryer-prolog.git/commitdiff
FIXED: do not attach constraint if the propagator is already entailed and killed
authorMarkus Triska <[email protected]>
Wed, 2 Aug 2023 22:26:40 +0000 (00:26 +0200)
committerMarkus Triska <[email protected]>
Wed, 2 Aug 2023 22:26:40 +0000 (00:26 +0200)
Example:

    ?- A#=A//A#==>B,A-B=1-1.
       A = 1, B = 1.

This addresses #1941.

src/lib/clpz.pl

index 38e52657e5834d3340d193264cc58256e3caadc4..ed01f079ade8ce9bed17dd9d11d67a35e15e4174 100644 (file)
@@ -3784,8 +3784,11 @@ var_eq(V, N, #V #= N).
 % Match variables to created skeleton.
 
 skeleton(Vs, Vs-Prop) :-
-        maplist(prop_init(Prop), Vs),
-        trigger_once(Prop).
+        (   propagator_state(Prop, State), State == dead ->
+            true
+        ;   maplist(prop_init(Prop), Vs),
+            trigger_once(Prop)
+        ).
 
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    A drep is a user-accessible and visible domain representation. N,