From 2a04d5e799fbb599931b93b25fc9afd4a52ce6da Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Wed, 22 Feb 2023 21:05:31 +0100 Subject: [PATCH 1/2] in projection of residual goals, mark considered propagators as processed This is to avoid duplicated goals with the new projection mechanism. --- src/lib/clpz.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/clpz.pl b/src/lib/clpz.pl index 5823aa42..9404097e 100644 --- a/src/lib/clpz.pl +++ b/src/lib/clpz.pl @@ -7711,7 +7711,7 @@ attributes_goals([]) --> []. attributes_goals([propagator(P, State)|As]) --> ( { ground(State) } -> [] ; { phrase(attribute_goal_(P), Gs) } -> - { % del_attr(State, clpz_aux), State = processed, + { del_attr(State, clpz_aux), State = processed, ( monotonic -> maplist(unwrap_with(bare_integer), Gs, Gs1) ; maplist(unwrap_with(=), Gs, Gs1) @@ -7822,7 +7822,7 @@ conjunction(A, B, G, D) --> original_goal(original_goal(State, Goal)) --> ( { var(State) } -> -% { State = processed }, + { State = processed }, [Goal] ; [] ). From 669242a8ced9ea801a2023115eaa525ce5bb2767 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Thu, 23 Feb 2023 00:10:26 +0100 Subject: [PATCH 2/2] DOC: update residual goals --- src/lib/clpb.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/clpb.pl b/src/lib/clpb.pl index 546286ea..1bdbbefc 100644 --- a/src/lib/clpb.pl +++ b/src/lib/clpb.pl @@ -211,7 +211,7 @@ Here is an example session with a few queries and their answers: T = 1, clpb:sat(X=:=X*Y), clpb:sat(Y=:=Y*Z). ?- sat(1#X#a#b). - sat(X=:=a#b). + clpb:sat(X=:=a#b). ``` The pending residual goals constrain remaining variables to Boolean @@ -348,7 +348,7 @@ does compute =|XOR|= as intended: ``` ?- xor(x, y, Z). -sat(Z=:=x#y). + clpb:sat(Z=:=x#y). ``` ## Acknowledgments