From 41a751e7f50303ac3a95982110364efa62c82094 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Sun, 8 Nov 2020 09:25:56 +0100 Subject: [PATCH] ADDED: Provisional support for (#=)/3 and (#<)/3. These predicates are intended for constructs from library(reif), such as if_/3. For the time being, they are defined here. If you have any recommendations or comments regarding the best location of these predicates, or need more of them, please file an issue. Suggested by @Qqwy in https://github.com/triska/clpz/issues/12. Many thanks! --- src/lib/clpz.pl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/lib/clpz.pl b/src/lib/clpz.pl index 4fa4b846..a4f66256 100644 --- a/src/lib/clpz.pl +++ b/src/lib/clpz.pl @@ -99,7 +99,11 @@ fd_inf/2, fd_sup/2, fd_size/2, - fd_dom/2 + fd_dom/2, + + % for use in predicates from library(reif) + (#=)/3, + (#<)/3 % called from goal_expansion % clpz_equal/2, @@ -7740,6 +7744,21 @@ plusterm_(CV, T0, T0+T) :- coeff_var_term(CV, T). coeff_var_term(C-V, T) :- ( C =:= 1 -> T = ?(V) ; T = C * ?(V) ). +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Reified predicates for use with predicates from library(reif). +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +#=(X, Y, T) :- + X #= Y #<==> B, + zo_t(B, T). + +#<(X, Y, T) :- + X #< Y #<==> B, + zo_t(B, T). + +zo_t(0, false). +zo_t(1, true). + /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generated predicates - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -- 2.54.0