From aa98a7e7d69ec58edac155bf6f8bcf8aeea3c90f Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Tue, 6 Feb 2024 19:05:29 +0100 Subject: [PATCH] ADDED: clpz_t/2, generalizing support for use with library(reif) This was suggested and contributed by @librarianmage in: https://github.com/mthom/scryer-prolog/issues/2225#issuecomment-1890801923 Many thanks! If anyone can find a better predicate name, please let us know any time! --- src/lib/clpz.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/clpz.pl b/src/lib/clpz.pl index 07768da55..6834a3796 100644 --- a/src/lib/clpz.pl +++ b/src/lib/clpz.pl @@ -102,6 +102,7 @@ fd_dom/2, % for use in predicates from library(reif) + clpz_t/2, (#=)/3, (#<)/3 @@ -7981,13 +7982,13 @@ Reified predicates for use with predicates from library(reif). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -#=(X, Y, T) :- - X #= Y #<==> #B, +clpz_t(Expr, T) :- + Expr #<==> #B, zo_t(B, T). -#<(X, Y, T) :- - X #< Y #<==> #B, - zo_t(B, T). +#=(X, Y, T) :- clpz_t(X #= Y, T). + +#<(X, Y, T) :- clpz_t(X #< Y, T). zo_t(0, false). zo_t(1, true).