]> Repositorios git - scryer-prolog.git/commitdiff
FIXED: variables in reified propagators must share the same queue
authorMarkus Triska <[email protected]>
Sun, 8 Oct 2023 07:43:10 +0000 (09:43 +0200)
committerMarkus Triska <[email protected]>
Sun, 8 Oct 2023 07:45:20 +0000 (09:45 +0200)
Otherwise, propagation steps may be inadvertently omitted, if
propagators are scheduled in a different queue.

This addresses #2084.

src/lib/clpz.pl

index 184757215e6fbebe5d2194d7f99d536ba4a8d722..7bace705e82c61afdc9e6e6c5b21cf15b55d5550 100644 (file)
@@ -3625,7 +3625,8 @@ reified_goal(g(Goal), _) --> [{Goal}].
 reified_goal(p(Vs, Prop), _) -->
         [{make_propagator(Prop, P)}],
         parse_init_dcg(Vs, P),
-        [{trigger_once(P)}],
+        [{variables_same_queue(Vs),
+          trigger_once(P)}],
         [( { propagator_state(P, S), S == dead } -> [] ; [p(P)])].
 reified_goal(p(Prop), Ds) -->
         { term_variables(Prop, Vs) },