FIXED: variables in reified propagators must share the same queue

Otherwise, propagation steps may be inadvertently omitted, if
propagators are scheduled in a different queue.

This addresses #2084.
This commit is contained in:
Markus Triska
2023-10-08 09:43:10 +02:00
parent 51c00fce57
commit 4d910f6bfe

View 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) },